swarm::cpu::hermite_cpu< Monitor > Class Template Reference
[Integrators]

CPU implementation of PEC2 Hermite integrator. More...

#include <hermite_cpu.hpp>

Inheritance diagram for swarm::cpu::hermite_cpu< Monitor >:

swarm::integrator

List of all members.

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


Detailed Description

template<class Monitor>
class swarm::cpu::hermite_cpu< Monitor >

CPU implementation of PEC2 Hermite integrator.

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.


Member Function Documentation

template<class Monitor >
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().

template<class Monitor >
void swarm::cpu::hermite_cpu< Monitor >::integrate_system ( ensemble::SystemRef  sys  )  [inline]


The documentation for this class was generated from the following file:

doxygen