|
SlowDown Algorithmic Regularization (SDAR)
Algorithmic Regularization with slowdown method for integrating few-body motions
|
#include <block_time_step.h>
Public Member Functions | |
| BlockTimeStep4th () | |
| contructor More... | |
| void | setDtRange (const Float _dt_max, const int _pow_index_min) |
| set dt limit (max and min) More... | |
| Float | getDtMax () const |
| get maximum time step More... | |
| Float | getDtMin () const |
| get minimum time step More... | |
| Float | calcNextDtLimit (const Float _time) |
| calculate the maximum time step limit for next block step based on the input (current) time More... | |
| Float | calcBlockDt2nd (const Float *_acc0, const Float *_acc1, const Float _dt_limit) const |
| Calculate 2nd order block time step. More... | |
| Float | calcBlockDt4th (const Float *acc0, const Float *acc1, const Float *acc2, const Float *acc3, const Float _dt_limit) const |
| Calculate 4th order block 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 Member Functions inherited from H4::TimeStep4th | |
| TimeStep4th () | |
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... | |
Additional Inherited Members | |
Public Attributes inherited from H4::TimeStep4th | |
| Float | eta_4th |
| Float | eta_2nd |
More... | |
| Float | acc0_offset_sq |
More... | |
|
inline |
contructor
|
inline |
Calculate 2nd order block time step.
calculate block time step based on Acc and its derivatives
| [in] | _acc0 | acceleration |
| [in] | _acc1 | first order derivative of acc0 |
| [in] | _dt_limit | maximum step limit |
|
inline |
Calculate 4th order block time step.
calculate 4th order block time step based on Acc and its derivatives
| [in] | acc0 | acceleration |
| [in] | acc1 | first order derivative of acc0 |
| [in] | acc2 | second order derivative of acc0 |
| [in] | acc3 | thrid order derivative of acc0 |
| [in] | _dt_limit | maximum step limit |
calculate the maximum time step limit for next block step based on the input (current) time
Basic algorithm: the integer of time/dt_min is the binary tree for block step, counting from the minimum digital, the last zero indicate the maximum block step level allown for next step
| [in] | _time | current time |
|
inline |
get maximum time step
|
inline |
get minimum time step
|
inline |
|
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
| [out] | _fout | std::ostream output object |
| [in] | _width | print width (defaulted 20) |
|
inline |
print titles of class members using column style
print titles of class members in one line for column style
| [out] | _fout | std::ostream output object |
| [in] | _width | print width (defaulted 20) |
|
inline |
read class data to file with binary format
| [in] | _fin | FILE type file for reading |
|
inline |
set dt limit (max and min)
| [in] | _dt_max | maximum step size |
| [in] | _pow_index_min | the power index (k) to set the minimum step size: _dt_max*(0.5^k) |
|
inline |
write class data to file with binary format
| [in] | _fp | FILE type file for output |