#include <block_time_step.h>
◆ TimeStep4th()
H4::TimeStep4th::TimeStep4th |
( |
| ) |
|
|
inline |
acceleration offset to avoid too small step when weak acceleration exist
◆ 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] | _mass | mass criterion |
[in] | _r | distance criterion |
[in] | _G | gravitational 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] | acc0 | acceleration |
[in] | acc1 | first order derivative of acc0 |
- Returns
- time step
◆ calcDt4th()
calculate 4th order time step
calculate time step based on Acc and its derivatives
- Parameters
-
[in] | acc0 | acceleration |
[in] | acc1 | first order derivative of acc0 |
[in] | acc2 | second order derivative of acc0 |
[in] | acc3 | thrid order derivative of acc0 |
- Returns
- time step
◆ checkParams()
bool H4::TimeStep4th::checkParams |
( |
| ) |
|
|
inline |
check whether parameters values are correct
- Returns
- true: all correct
◆ print()
void H4::TimeStep4th::print |
( |
std::ostream & |
_fout | ) |
const |
|
inline |
◆ 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] | _fout | std::ostream output object |
[in] | _width | print width (defaulted 20) |
◆ 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] | _fout | std::ostream output object |
[in] | _width | print width (defaulted 20) |
◆ readBinary()
void H4::TimeStep4th::readBinary |
( |
FILE * |
_fin | ) |
|
|
inline |
read class data to file with binary format
- Parameters
-
[in] | _fin | FILE type file for reading |
◆ writeBinary()
void H4::TimeStep4th::writeBinary |
( |
FILE * |
_fp | ) |
const |
|
inline |
write class data to file with binary format
- Parameters
-
[in] | _fp | FILE type file for output |
◆ 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: