Swarm-NG
1.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Swarm-NG
Overview
Text Formats
Getting Started with Swarm-NG
Advanced Options for Building Swarm
Configuration Files
Release notes
swarm-query.py command-line interface
Swarm command-line interface
How to Test Swarm
Using Swarm
Examining records from the log file.
Plotting results from a log file
Tutorial on using the Ensemble data structure.
Advanced tutorial for using GPU integrators
Tutorial for implementing an Integrator
Tutorial for making a monitor (stopper/logger)
Tutorial for Making a Propagator
Beginner Python Tutorial
Testing for ejection of planets
Tutorial for generating ensembles
Advanced Python Integration Tutorial
Resume an integration
Extracting statistical information from data files
Beginner tutorial for using the API
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
swarm
py
src
integrators
monitors
plugins
propagators
python
swarm
tutorials
kepler.cpp
kepler.hpp
montecarlo.cpp
montecarlo_ecclimit.cpp
montecarlo_mcmc_outputs.cpp
random.hpp
tutorial_ensemble.cpp
tutorial_gpu.cpp
tutorial_integrator.hpp
tutorial_integrator_plugin.cu
tutorial_monitor.hpp
tutorial_monitor_plugin.cu
tutorial_propagator.hpp
tutorial_propagator_plugin.cu
tutorial_simple.cpp
utils
File Members
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.
9
#include "
tutorial_integrator.hpp
"
10
#include "
monitors/stop_on_ejection.hpp
"
11
#include "
swarm/gpu/gravitation_accjerk.hpp
"
12
13
// Some aliasing and opening namespace can make our code more readable
14
typedef
gpulog::device_log
L
;
15
using namespace
swarm::monitors;
16
using
swarm::integrator_plugin_initializer
;
17
18
// First we have to define implementation for Monitor and Gravitational
19
// force calculation to our integrator to compile.
20
typedef
TutorialIntegrator< stop_on_ejection<L>
,
GravitationAccJerk
>
TutorialIntegrator_Instantiated
;
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
//
27
integrator_plugin_initializer< TutorialIntegrator_Instantiated >
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
swarm
src
tutorials
tutorial_integrator_plugin.cu
Generated on Sun Jul 21 2013 11:11:54 for Swarm-NG by
1.8.4