SlowDown Algorithmic Regularization (SDAR)
Algorithmic Regularization with slowdown method for integrating few-body motions
H4::TimeStep4th Class Reference

#include <block_time_step.h>

Inheritance diagram for H4::TimeStep4th:
[legend]

Public Member Functions

 TimeStep4th ()
 

acceleration offset to avoid too small step when weak acceleration exist

More...
 
bool checkParams ()
 check whether parameters values are correct More...
 
void calcAcc0OffsetSq (const Float _mass, const Float _r, const Float _G)
 calculate a0_offset_sq More...
 
Float calcDt2nd (const Float *acc0, const Float *acc1) const
 calculate 2nd order time step More...
 
Float calcDt4th (const Float *acc0, const Float *acc1, const Float *acc2, const Float *acc3) const
 calculate 4th order time step More...
 
void print (std::ostream &_fout) const
 
void printColumnTitle (std::ostream &_fout, const int _width=20)
 print titles of class members using column style More...
 
void printColumn (std::ostream &_fout, const int _width=20)
 print data of class members using column style More...
 
void writeBinary (FILE *_fp) const
 write class data to file with binary format More...
 
void readBinary (FILE *_fin)
 read class data to file with binary format More...
 

Public Attributes

Float eta_4th
 
Float eta_2nd
 

time step coefficient (outside sqrt) for forth order

More...
 
Float acc0_offset_sq
 

time step coefficient (outside sqrt) for second order

More...
 

Constructor & Destructor Documentation

◆ TimeStep4th()

H4::TimeStep4th::TimeStep4th ( )
inline

acceleration offset to avoid too small step when weak acceleration exist

Member Function Documentation

◆ calcAcc0OffsetSq()

void H4::TimeStep4th::calcAcc0OffsetSq ( const Float  _mass,
const Float  _r,
const Float  _G 
)
inline

calculate a0_offset_sq

calculate a0_offset_sq for timestep determination: (G*_mass/_r^2)^2

Parameters
[in]_massmass criterion
[in]_rdistance criterion
[in]_Ggravitational constant

◆ calcDt2nd()

Float H4::TimeStep4th::calcDt2nd ( const Float acc0,
const Float acc1 
) const
inline

calculate 2nd order time step

calculate time step based on Acc and its derivatives

Parameters
[in]acc0acceleration
[in]acc1first order derivative of acc0
Returns
time step
Here is the caller graph for this function:

◆ calcDt4th()

Float H4::TimeStep4th::calcDt4th ( const Float acc0,
const Float acc1,
const Float acc2,
const Float acc3 
) const
inline

calculate 4th order time step

calculate time step based on Acc and its derivatives

Parameters
[in]acc0acceleration
[in]acc1first order derivative of acc0
[in]acc2second order derivative of acc0
[in]acc3thrid order derivative of acc0
Returns
time step
Here is the caller graph for this function:

◆ checkParams()

bool H4::TimeStep4th::checkParams ( )
inline

check whether parameters values are correct

Returns
true: all correct
Here is the caller graph for this function:

◆ print()

void H4::TimeStep4th::print ( std::ostream &  _fout) const
inline
Here is the caller graph for this function:

◆ printColumn()

void H4::TimeStep4th::printColumn ( std::ostream &  _fout,
const int  _width = 20 
)
inline

print data of class members using column style

print data of class members in one line for column style. Notice no newline is printed at the end

Parameters
[out]_foutstd::ostream output object
[in]_widthprint width (defaulted 20)
Here is the caller graph for this function:

◆ printColumnTitle()

void H4::TimeStep4th::printColumnTitle ( std::ostream &  _fout,
const int  _width = 20 
)
inline

print titles of class members using column style

print titles of class members in one line for column style

Parameters
[out]_foutstd::ostream output object
[in]_widthprint width (defaulted 20)
Here is the caller graph for this function:

◆ readBinary()

void H4::TimeStep4th::readBinary ( FILE *  _fin)
inline

read class data to file with binary format

Parameters
[in]_finFILE type file for reading

◆ writeBinary()

void H4::TimeStep4th::writeBinary ( FILE *  _fp) const
inline

write class data to file with binary format

Parameters
[in]_fpFILE type file for output

Member Data Documentation

◆ acc0_offset_sq

Float H4::TimeStep4th::acc0_offset_sq

time step coefficient (outside sqrt) for second order

◆ eta_2nd

Float H4::TimeStep4th::eta_2nd

time step coefficient (outside sqrt) for forth order

◆ eta_4th

Float H4::TimeStep4th::eta_4th

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