Swarm-NG  1.1
swarm::gpu::bppt::GravitationAcc_GR< T > Class Template Reference

templatized Class to calculate acceleration and jerk in parallel More...

#include <gravitation_gr_acc.hpp>

Public Member Functions

GENERIC GravitationAcc_GR (ensemble::SystemRef &sys, shared_data &shared)
 Calculate accelerations, including approximation for weak GR currently hardwired for G=M_sol=AU=1, year=2pi. More...
 
GENERIC void operator() (int ij, int b, int c, double &pos, double &vel, double &acc) const
 define the operator () More...
 
GPUAPI double acc_planets (int ij, int b, int c) const
 Different version of acceleration calculation used for MVS integrator. More...
 
GPUAPI double acc (int ij, int b, int c, double &pos, double &vel) const
 Run the complete algorithm for computing acceleration only on all bodies. More...
 

Detailed Description

template<class T>
class swarm::gpu::bppt::GravitationAcc_GR< T >

templatized Class to calculate acceleration and jerk in parallel

Similar to Gravitation, but computes only terms for acceleration and not for jerk To be used with integration aglorithms that don't make use of the jerk, e.g., Runge-Kutta

EXPERIMENTAL: This class is not thoroughly tested.

Definition at line 42 of file gravitation_gr_acc.hpp.

Constructor & Destructor Documentation

template<class T >
GENERIC swarm::gpu::bppt::GravitationAcc_GR< T >::GravitationAcc_GR ( ensemble::SystemRef &  sys,
shared_data &  shared 
)
inline

Calculate accelerations, including approximation for weak GR currently hardwired for G=M_sol=AU=1, year=2pi.

Todo:
read c^2 from parameter file? read from system attribute? set system attribute from parameter file?

Definition at line 63 of file gravitation_gr_acc.hpp.

Member Function Documentation

template<class T >
GPUAPI double swarm::gpu::bppt::GravitationAcc_GR< T >::acc ( int  ij,
int  b,
int  c,
double &  pos,
double &  vel 
) const
inline

Run the complete algorithm for computing acceleration only on all bodies.

This is tightly coupled with the BPPT integrators. ij, b and c are calculated from thread id.

The pair number for this tread. The planet number for this thread. coordinate number x:0,y:1,z:2 position for this planet's coordinate velecotiy for this planet's coordinate

Definition at line 306 of file gravitation_gr_acc.hpp.

References peyton::constants::c.

template<class T >
GPUAPI double swarm::gpu::bppt::GravitationAcc_GR< T >::acc_planets ( int  ij,
int  b,
int  c 
) const
inline

Different version of acceleration calculation used for MVS integrator.

The impact of body 0(sun or star) is ignored because in the integrator it is calculated using keplerian motion. This is tightly coupled with the BPPT integrators. ij, b and c are calculated from thread id.

The pair number for this tread. The planet number for this thread. coordinate number x:0,y:1,z:2 position for this planet's coordinate velecotiy for this planet's coordinate

Definition at line 284 of file gravitation_gr_acc.hpp.

template<class T >
GENERIC void swarm::gpu::bppt::GravitationAcc_GR< T >::operator() ( int  ij,
int  b,
int  c,
double &  pos,
double &  vel,
double &  acc 
) const
inline

define the operator ()

Write positions to shared (global) memory

Definition at line 256 of file gravitation_gr_acc.hpp.

References peyton::constants::c.


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