GraviDy  1.0
Gravitational Dynamics N-body integrator
Public Member Functions | List of all members
Hermite4CPU Class Reference

Class which implements on the CPU the structure of the Hermite4 scheme. More...

#include <Hermite4CPU.hpp>

Inheritance diagram for Hermite4CPU:
Inheritance graph
[legend]
Collaboration diagram for Hermite4CPU:
Collaboration graph
[legend]

Public Member Functions

 Hermite4CPU (NbodySystem *ns, Logger *logger, NbodyUtils *nu)
 Constructor that uses its parent constructor. More...
 
 ~Hermite4CPU ()
 Destructor. More...
 
void force_calculation (Predictor pi, Predictor pj, Forces &fi)
 Method that calculate the gravitational interaction between two particles. More...
 
void init_acc_jrk ()
 Method that initializes the acceleration and it first derivative. More...
 
void update_acc_jrk (unsigned int nact)
 Method that call the force_calculation method for every $i-$ and $j$ particles interaction of the $N_{act}$ ones. More...
 
void predicted_pos_vel (double ITIME)
 Method that predict all the particles to the current integration time. More...
 
void correction_pos_vel (double ITIME, unsigned int nact)
 Method that correct the positions and velocities of the particles at the end of every integration step. More...
 
void integration ()
 Integration virtual method to be implemented. More...
 
- Public Member Functions inherited from Hermite4
 Hermite4 (NbodySystem *ns, Logger *logger, NbodyUtils *nu)
 Constructor in charge of calling the allocation and initialization methods. More...
 
 ~Hermite4 ()
 Destructor in charge of calling the method that free the memory. More...
 
unsigned int find_particles_to_move (double ITIME)
 Method in charge of finding all the particles that need to be updated on the following integration step. More...
 
void next_integration_time (double &ATIME)
 Methods that look for the next integration time, looking for the minimum combination of timestep and current time of all the particles of the system. More...
 
void init_dt (double &ATIME, float ETA, double ITIME)
 Initialization of the timesteps of the system. More...
 
void save_old_acc_jrk (unsigned int nact)
 Method in charge of saving the old values of the acceleration and its first derivative to be use in the Corrector integration step. More...
 
void alloc_arrays_host ()
 Method in charge of the memory allocation of all the data structures. More...
 
void free_arrays_host ()
 Method in charge of the memory deallocation of all the data structures. More...
 
void init_data ()
 Method that initialize all the data structures that will be used in the integration of hte system. More...
 
virtual void predicted_pos_vel (double itime, double *t, double4 *r, double4 *v, Forces *f, Predictor *p)
 Prediction virtual method to be implemented. More...
 
virtual void correction_pos_vel (double itime, unsigned int nact, double *dt, double *t, unsigned int *move, Predictor *p, Forces *f, Forces *old, double3 *a2, double3 *a3, double4 *r, double4 *v)
 Correction virtual method to be implemented. More...
 
virtual void init_acc_jrk (Predictor *p, Forces *f)
 Force initialization virtual method to be implemented. More...
 
virtual void update_acc_jrk (unsigned int nact, unsigned int *move, Predictor *p, Forces *f)
 Force update virtual method to be implemented. More...
 

Additional Inherited Members

- Public Attributes inherited from Hermite4
NbodySystemns
 NbodySystem object reference. More...
 
Loggerlogger
 Logger object reference. More...
 
NbodyUtilsnu
 NbodyUtils object reference. More...
 

Detailed Description

Class which implements on the CPU the structure of the Hermite4 scheme.

This contains all the implementations of the requirements processes to perform the integration, like the initialization of the forces, the prediction, the correction, and the general integration of the system.

Constructor & Destructor Documentation

§ Hermite4CPU()

Hermite4CPU::Hermite4CPU ( NbodySystem ns,
Logger logger,
NbodyUtils nu 
)

Constructor that uses its parent constructor.

§ ~Hermite4CPU()

Hermite4CPU::~Hermite4CPU ( )

Destructor.

Member Function Documentation

§ correction_pos_vel()

void Hermite4CPU::correction_pos_vel ( double  ITIME,
unsigned int  nact 
)

Method that correct the positions and velocities of the particles at the end of every integration step.

§ force_calculation()

void Hermite4CPU::force_calculation ( Predictor  pi,
Predictor  pj,
Forces fi 
)
virtual

Method that calculate the gravitational interaction between two particles.

Reimplemented from Hermite4.

§ init_acc_jrk()

void Hermite4CPU::init_acc_jrk ( )

Method that initializes the acceleration and it first derivative.

§ integration()

void Hermite4CPU::integration ( )
virtual

Integration virtual method to be implemented.

Reimplemented from Hermite4.

§ predicted_pos_vel()

void Hermite4CPU::predicted_pos_vel ( double  ITIME)

Method that predict all the particles to the current integration time.

§ update_acc_jrk()

void Hermite4CPU::update_acc_jrk ( unsigned int  nact)

Method that call the force_calculation method for every $i-$ and $j$ particles interaction of the $N_{act}$ ones.


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