GraviDy
1.0
Gravitational Dynamics N-body integrator
|
Class which implements on the CPU the structure of the Hermite4 scheme. More...
#include <Hermite4CPU.hpp>
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 ![]() ![]() ![]() | |
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... | |
![]() | |
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 | |
![]() | |
NbodySystem * | ns |
NbodySystem object reference. More... | |
Logger * | logger |
Logger object reference. More... | |
NbodyUtils * | nu |
NbodyUtils object reference. More... | |
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.
Hermite4CPU::Hermite4CPU | ( | NbodySystem * | ns, |
Logger * | logger, | ||
NbodyUtils * | nu | ||
) |
Constructor that uses its parent constructor.
Hermite4CPU::~Hermite4CPU | ( | ) |
Destructor.
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.
Method that calculate the gravitational interaction between two particles.
Reimplemented from Hermite4.
void Hermite4CPU::init_acc_jrk | ( | ) |
Method that initializes the acceleration and it first derivative.
|
virtual |
Integration virtual method to be implemented.
Reimplemented from Hermite4.
void Hermite4CPU::predicted_pos_vel | ( | double | ITIME | ) |
Method that predict all the particles to the current integration time.
void Hermite4CPU::update_acc_jrk | ( | unsigned int | nact | ) |
Method that call the force_calculation method for every and
particles interaction of the
ones.