Swarm-NG  1.1
tutorial_integrator_plugin.cu
1 // That was the definition of the plugin. Now we need to intantiate it as a
2 // plugin so it is compiled and can be referenced in Swarm.
3 //
4 // For that we create a file with "cu" extension (for a GPU integrator). and
5 // include the definition of our integrator as well as plugin creating
6 // API.
7 //
8 // Here are the includes.
12 
13 // Some aliasing and opening namespace can make our code more readable
14 typedef gpulog::device_log L;
15 using namespace swarm::monitors;
17 
18 // First we have to define implementation for Monitor and Gravitational
19 // force calculation to our integrator to compile.
21 
22 // Now that we have our integrator class, we use the Plug-in API to
23 // register our class with the name "tutorial_integrator" in the Swarm
24 // plugin system. You can use the name "tutorial_integrator" in the
25 // config files to use the class e.g. integrator=tutorial_integrator
26 //
28  tutorial_integ_plugin("tutorial_integrator"
29  ,"This is the integrator based on tutorial integrator");
30 
31 //
32 //
33 // For complete listing of these two files look at \ref src/tutorials/tutorial_integrator.hpp and \ref src/tutorials/tutorial_integrator_plugin.cu
34