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

General class that define the structure to be follow by any implementation of the integrator (CPU, MPI or GPU). More...

#include <Hermite4.hpp>

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

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

NbodySystemns
 NbodySystem object reference. More...
 
Loggerlogger
 Logger object reference. More...
 
NbodyUtilsnu
 NbodyUtils object reference. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

§ Hermite4()

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

Constructor in charge of calling the allocation and initialization methods.

§ ~Hermite4()

Hermite4::~Hermite4 ( )

Destructor in charge of calling the method that free the memory.

Member Function Documentation

§ alloc_arrays_host()

void Hermite4::alloc_arrays_host ( )

Method in charge of the memory allocation of all the data structures.

§ correction_pos_vel()

virtual void Hermite4::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 
)
inlinevirtual

Correction virtual method to be implemented.

§ find_particles_to_move()

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_calculation()

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

Force virtual method to be implemented.

Reimplemented in Hermite4GPU, Hermite4MPI, and Hermite4CPU.

§ free_arrays_host()

void Hermite4::free_arrays_host ( )

Method in charge of the memory deallocation of all the data structures.

§ init_acc_jrk()

virtual void Hermite4::init_acc_jrk ( Predictor p,
Forces f 
)
inlinevirtual

Force initialization virtual method to be implemented.

§ init_data()

void Hermite4::init_data ( )

Method that initialize all the data structures that will be used in the integration of hte system.

§ init_dt()

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.

§ integration()

virtual void Hermite4::integration ( )
inlinevirtual

Integration virtual method to be implemented.

Reimplemented in Hermite4GPU, Hermite4MPI, and Hermite4CPU.

§ next_integration_time()

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.

§ predicted_pos_vel()

virtual void Hermite4::predicted_pos_vel ( double  itime,
double *  t,
double4 r,
double4 v,
Forces f,
Predictor p 
)
inlinevirtual

Prediction virtual method to be implemented.

§ save_old_acc_jrk()

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.

§ update_acc_jrk()

virtual void Hermite4::update_acc_jrk ( unsigned int  nact,
unsigned int *  move,
Predictor p,
Forces f 
)
inlinevirtual

Force update virtual method to be implemented.

Member Data Documentation

§ logger

Logger* Hermite4::logger

Logger object reference.

§ ns

NbodySystem* Hermite4::ns

NbodySystem object reference.

§ nu

NbodyUtils* Hermite4::nu

NbodyUtils object reference.


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