GraviDy
1.0
Gravitational Dynamics N-body integrator
|
General class that define the structure to be follow by any implementation of the integrator (CPU, MPI or GPU). More...
#include <Hermite4.hpp>
Public Member Functions | |
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 | integration () |
Integration virtual method to be implemented. 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 | force_calculation (Predictor pi, Predictor pj, Forces &fi) |
Force 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... | |
Public Attributes | |
NbodySystem * | ns |
NbodySystem object reference. More... | |
Logger * | logger |
Logger object reference. More... | |
NbodyUtils * | nu |
NbodyUtils object reference. More... | |
General class that define the structure to be follow by any implementation of the integrator (CPU, MPI or GPU).
The methods on this class must be implemented to have a proper behaviour of the integrator.
Hermite4::Hermite4 | ( | NbodySystem * | ns, |
Logger * | logger, | ||
NbodyUtils * | nu | ||
) |
Constructor in charge of calling the allocation and initialization methods.
Hermite4::~Hermite4 | ( | ) |
Destructor in charge of calling the method that free the memory.
void Hermite4::alloc_arrays_host | ( | ) |
Method in charge of the memory allocation of all the data structures.
|
inlinevirtual |
Correction virtual method to be implemented.
unsigned int Hermite4::find_particles_to_move | ( | double | ITIME | ) |
Method in charge of finding all the particles that need to be updated on the following integration step.
Since we are using DP, we base the comparison between times and timesteps using the machine epsilon, to avoid overflows.
Force virtual method to be implemented.
Reimplemented in Hermite4GPU, Hermite4MPI, and Hermite4CPU.
void Hermite4::free_arrays_host | ( | ) |
Method in charge of the memory deallocation of all the data structures.
Force initialization virtual method to be implemented.
void Hermite4::init_data | ( | ) |
Method that initialize all the data structures that will be used in the integration of hte system.
void Hermite4::init_dt | ( | double & | CTIME, |
float | ETA, | ||
double | ITIME | ||
) |
Initialization of the timesteps of the system.
This method is based on the Aarseth initial timestep definition and follows a Gaussian distribution.
|
inlinevirtual |
Integration virtual method to be implemented.
Reimplemented in Hermite4GPU, Hermite4MPI, and Hermite4CPU.
void Hermite4::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.
|
inlinevirtual |
Prediction virtual method to be implemented.
void Hermite4::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.
|
inlinevirtual |
Force update virtual method to be implemented.
NbodySystem* Hermite4::ns |
NbodySystem object reference.
NbodyUtils* Hermite4::nu |
NbodyUtils object reference.