#include <hermite_cpu.hpp>

Public Member Functions | |
| hermite_cpu (const config &cfg) | |
| Construct for hermite_cpu class. | |
| virtual void | launch_integrator () |
| Integrater implementation provided by derived instance. | |
| void | calcForces (ensemble::SystemRef &sys, double acc[][3], double jerk[][3]) |
| Calculate the force field. | |
| void | integrate_system (ensemble::SystemRef sys) |
| Integrate ensembles. | |
Static Public Member Functions | |
| static double | inner_product (const double a[3], const double b[3]) |
| defines inner product of two arrays | |
This is used as a reference implementation to test other GPU implementations of other integrators
This integrator can be used as an example of CPU integrator
Definition at line 46 of file hermite_cpu.hpp.
| void swarm::cpu::hermite_cpu< Monitor >::calcForces | ( | ensemble::SystemRef & | sys, | |
| double | acc[][3], | |||
| double | jerk[][3] | |||
| ) | [inline] |
Calculate the force field.
Clear acc and jerk
Loop through all pairs
Calculated the magnitude
Update acc/jerk for i
Update acc/jerk for j
Definition at line 74 of file hermite_cpu.hpp.
References peyton::constants::c, swarm::cpu::hermite_cpu< Monitor >::inner_product(), and swarm::EnsembleBase< _CHUNK_SIZE, _NUM_BODY_ATTRIBUTES, _NUM_SYS_ATTRIBUTES >::SystemRef::nbod().
Referenced by swarm::cpu::hermite_cpu< Monitor >::integrate_system().
| void swarm::cpu::hermite_cpu< Monitor >::integrate_system | ( | ensemble::SystemRef | sys | ) | [inline] |
Integrate ensembles.
Predict
Copy positions
Integrate, Round one
Integrate, Round two
Definition at line 115 of file hermite_cpu.hpp.
References swarm::integrator::_destination_time, swarm::integrator::_log, swarm::integrator::_max_iterations, peyton::constants::c, swarm::cpu::hermite_cpu< Monitor >::calcForces(), swarm::EnsembleBase< _CHUNK_SIZE, _NUM_BODY_ATTRIBUTES, _NUM_SYS_ATTRIBUTES >::SystemRef::is_active(), swarm::EnsembleBase< _CHUNK_SIZE, _NUM_BODY_ATTRIBUTES, _NUM_SYS_ATTRIBUTES >::SystemRef::nbod(), swarm::EnsembleBase< _CHUNK_SIZE, _NUM_BODY_ATTRIBUTES, _NUM_SYS_ATTRIBUTES >::SystemRef::set_inactive(), and swarm::EnsembleBase< _CHUNK_SIZE, _NUM_BODY_ATTRIBUTES, _NUM_SYS_ATTRIBUTES >::SystemRef::time().
Referenced by swarm::cpu::hermite_cpu< Monitor >::launch_integrator().