SlowDown Algorithmic Regularization (SDAR)
Algorithmic Regularization with slowdown method for integrating few-body motions
|
Hermite integrator class. More...
#include <hermite_integrator.h>
Public Member Functions | |
bool | checkParams () |
check whether parameters values are correct More... | |
HermiteIntegrator () | |
constructor More... | |
void | clear () |
clear function More... | |
void | reserveIntegratorMem () |
reserve memory for system More... | |
void | initialSystemSingle (const Float _time_sys) |
Initial system array. More... | |
void | addGroups (const int *_particle_index, const int *_n_group_offset, const int _n_group) |
add groups from lists of particle index More... | |
void | readGroupConfigureAscii (std::istream &_fin) |
Add group based on a configure file. More... | |
void | breakGroups (int *_new_group_particle_index_origin, int *_new_n_group_offset, int &_new_n_group, const int *_break_group_index_with_offset, const int _n_break_no_add, const int _n_break) |
break groups More... | |
void | checkBreak (int *_break_group_index_with_offset, int &_n_break, const bool _start_flag) |
Check break condition. More... | |
void | checkNewGroup (int *_new_group_particle_index_origin, int *_new_n_group_offset, int &_new_n_group, int *_break_group_index_with_offset, int &_n_break_no_add, const int _n_break, const bool _start_flag) |
check the pair with distance below r_crit for ptcl in adr_dt_sorted_ More... | |
void | adjustGroups (const bool _start_flag) |
adjust groups More... | |
void | initialIntegration () |
Initial Hermite integrator. More... | |
AR::InterruptBinary< Tparticle > & | integrateGroupsOneStep () |
Integrate groups. More... | |
void | modifySingleParticles () |
modify single particles due to external functions, update energy More... | |
void | integrateSingleOneStepAct () |
Integration single active particles and update steps. More... | |
void | integrateToTimeList (const Float _time_next, const int *_particle_index, const int _n_particle) |
Integration a list of particle to current time (ingore dt) More... | |
void | sortDtAndSelectActParticle () |
sort time step array and select active particles More... | |
void | writeBackGroupMembers () |
write back group members to particles More... | |
void | accumDESlowDownChangeBreakGroup (const int _igroup) |
correct Etot slowdown reference due to the groups change More... | |
void | accumDESlowDownChange () |
correct Etot slowdown reference due to the groups change More... | |
void | calcEnergySlowDown (const bool _initial_flag=false) |
calculate slowdown energy More... | |
Float | getEnergyErrorSlowDown () const |
get slowdown energy error More... | |
Float | getEnergyError () const |
get energy error More... | |
Float | getEtot () const |
Get current total energy from ekin and epot. More... | |
Float | getEtotRef () const |
Get current total integrated energy. More... | |
Float | getEtotSlowDown () const |
Get current total energy with slowdown from ekin_sd and epot_sd. More... | |
Float | getEtotSlowDownRef () const |
Get current total integrated energy with inner slowdown. More... | |
Float | getEkin () const |
Get current kinetic energy. More... | |
Float | getEkinSlowDown () const |
Get current kinetic energy with slowdown. More... | |
Float | getEpot () const |
Get current potential energy. More... | |
Float | getEpotSlowDown () const |
Get current potential energy with slowdown. More... | |
Float | getDESlowDownChangeCum () const |
get cumulative slowdown energy change due to slowdown change More... | |
void | resetDESlowDownChangeCum () |
reset cumulative slowdown energy change due to slowdown change More... | |
Float | getDESlowDownChangeBinaryInterrupt () const |
get cumulative slowdown energy change due to interruption More... | |
void | resetDESlowDownChangeBinaryInterrupt () |
reset cumulative slowdown energy change due to interruption More... | |
Float | getDESlowDownChangeModifySingle () const |
get cumulative slowdown energy change due to modification of one particle More... | |
void | resetDESlowDownChangeModifySingle () |
reset cumulative slowdown energy change due to modification of one particle More... | |
Float | getDEChangeCum () const |
get cumulative energy change More... | |
void | resetDEChangeCum () |
reset cumulative energy change More... | |
Float | getDEChangeBinaryInterrupt () const |
get cumulative energy change due to interruption More... | |
void | resetDEChangeBinaryInterrupt () |
reset cumulative energy change due to interruption More... | |
Float | getDEChangeModifySingle () const |
get cumulative energy change due to modification of one particle More... | |
void | resetDEChangeModifySingle () |
reset cumulative energy change due to modification of one particle More... | |
Float | getNextTime () const |
get next time for intergration More... | |
Float | getTimeInt () const |
get current integration time More... | |
Float | getTime () const |
get current real time More... | |
void | setTimeOffset (const Float &_time_offset) |
set time offset More... | |
int | getInterruptGroupIndex () const |
get interrupt group index More... | |
AR::InterruptBinary< Tparticle > & | getInterruptBinary () |
get interrupt binary (tree) address More... | |
int | getNActSingle () const |
get active number of particles of singles More... | |
int | getNActGroup () const |
get active number of particles of groups More... | |
int | getNInitGroup () const |
get initial number of particles of groups More... | |
int | getNInitSingle () const |
get initial number of particles of singles More... | |
int | getNGroup () const |
get N groups More... | |
int | getNSingle () const |
get N single More... | |
int | getIndexOffsetGroup () const |
get group index offset (group index + N_single_max) More... | |
int * | getSortDtIndexSingle () |
get sorted dt index of singles More... | |
int * | getSortDtIndexGroup () |
get sorted dt index of groups More... | |
void | printColumnTitle (std::ostream &_fout, const int _width, const int _n_sd_list[], const int _n_group, const int _n_sd_tot) |
print titles of class members using column style More... | |
void | printColumn (std::ostream &_fout, const int _width, const int _n_sd_list[], const int _n_group, const int _n_sd_tot) |
print data of class members using column style More... | |
void | printStepHist () |
print step histogram More... | |
Public Attributes | |
BlockTimeStep4th | step |
HermiteManager< Tacc > * | manager |
More... | |
AR::TimeTransformedSymplecticManager< TARacc > * | ar_manager |
integration manager More... | |
COMM::ParticleGroup< H4Ptcl, Tpcm > | particles |
COMM::List< ARSym > | groups |
COMM::List< Neighbor< Tparticle > > | neighbors |
Tpert | perturber |
Tinfo | info |
information of the system More... | |
Profile | profile |
Hermite integrator class.
|
inline |
constructor
|
inline |
correct Etot slowdown reference due to the groups change
|
inline |
correct Etot slowdown reference due to the groups change
[in] | _igroup | group index to accumulative de_sd_change_cum |
|
inline |
add groups from lists of particle index
[in] | _particle_index | particle index |
[in] | _n_group_offset | offset to separate groups in _particle_index |
[in] | _n_group | number of new groups |
|
inline |
adjust groups
|
inline |
break groups
|
inline |
calculate slowdown energy
[in] | _initial_flag | if true, set energy reference |
|
inline |
Check break condition.
Check whether it is necessary to break the chain
[out] | <em>break_group_index_with_offset | group index list to break with an offset of $index_offset_group |
[out] | _n_break | number of groups need to break |
[in] | _start_flag | indicate this is the first adjust of the groups in the integration |
|
inline |
check the pair with distance below r_crit for ptcl in adr_dt_sorted_
First check nearest neighbor distance r_min If r_min<r_crit, check the direction, if income, accept as group
[out] | _new_group_particle_index_origin | particle index (for hermite particle data) of new group members |
[out] | _new_n_group_offset | group member boundary, first value is defined already |
[out] | _new_n_group | number of new group |
[in,out] | _break_group_index_with_offset | break group index in groups |
[out] | _n_break_no_add | number of break groups without adding new particles |
[in] | _n_break | number of break groups |
[in] | _start_flag | indicate this is the first adjust of the groups in the integration |
|
inline |
check whether parameters values are correct
|
inline |
clear function
|
inline |
get cumulative energy change due to interruption
|
inline |
get cumulative energy change
|
inline |
get cumulative energy change due to modification of one particle
|
inline |
get cumulative slowdown energy change due to interruption
|
inline |
get cumulative slowdown energy change due to slowdown change
|
inline |
get cumulative slowdown energy change due to modification of one particle
|
inline |
Get current kinetic energy.
|
inline |
Get current kinetic energy with slowdown.
|
inline |
get energy error
|
inline |
get slowdown energy error
|
inline |
Get current potential energy.
|
inline |
Get current potential energy with slowdown.
|
inline |
Get current total energy from ekin and epot.
|
inline |
Get current total integrated energy.
|
inline |
Get current total energy with slowdown from ekin_sd and epot_sd.
|
inline |
Get current total integrated energy with inner slowdown.
|
inline |
get group index offset (group index + N_single_max)
|
inline |
get interrupt binary (tree) address
if not exist, return NULL
|
inline |
get interrupt group index
if not exist, return -1
|
inline |
get active number of particles of groups
|
inline |
get active number of particles of singles
|
inline |
get next time for intergration
|
inline |
get N groups
|
inline |
get initial number of particles of groups
|
inline |
get initial number of particles of singles
|
inline |
get N single
|
inline |
get sorted dt index of groups
|
inline |
get sorted dt index of singles
|
inline |
get current real time
|
inline |
get current integration time
|
inline |
Initial Hermite integrator.
Initial f, fdot and step for new add/remove particles. If start_flag, the whole system are initialized; else the first n_init_single_ and n_init_group_ of sorted index list will be initialized. The active particle number will be set to the total number of particles
[in] | _start_flag | true: the starting step of integration. |
|
inline |
Initial system array.
[in] | _time_sys | current set time |
|
inline |
Integrate groups.
Integrate all groups to time
|
inline |
Integration single active particles and update steps.
Integrated to next time given by minimum step particle
|
inline |
Integration a list of particle to current time (ingore dt)
Integrate a list of particle to current time.
[in] | _time_next | time to integrate (without offset) |
[in] | _particle_index | particle index to integrate |
[in] | _n_particle | number of particles |
|
inline |
modify single particles due to external functions, update energy
|
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 |
[in] | _n_sd_list | AR inner slowdown numbers per group (list) |
[in] | _n_group | total AR group number |
[in] | _n_sd_tot | total slowdown numbers |
|
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 |
[in] | _n_sd_list | AR inner slowdown numbers per group (list) |
[in] | _n_group | total AR group number |
[in] | _n_sd_tot | total slowdown numbers |
|
inline |
print step histogram
|
inline |
Add group based on a configure file.
[in] | _fin | std::istream IO for read File format: N_group, group_offset_index_lst[N_group number], group_member_particle_index[total group member number] |
|
inline |
reserve memory for system
The memory size depends in the particles and groups memory sizes, thus particles and groups are reserved first
|
inline |
reset cumulative energy change due to interruption
|
inline |
reset cumulative energy change
|
inline |
reset cumulative energy change due to modification of one particle
|
inline |
reset cumulative slowdown energy change due to interruption
|
inline |
reset cumulative slowdown energy change due to slowdown change
|
inline |
reset cumulative slowdown energy change due to modification of one particle
|
inline |
set time offset
|
inline |
sort time step array and select active particles
Make sure time_next_ is updated already
|
inline |
write back group members to particles
AR::TimeTransformedSymplecticManager<TARacc>* H4::HermiteIntegrator< Tparticle, Tpcm, Tpert, TARpert, Tacc, TARacc, Tinfo >::ar_manager |
integration manager
COMM::List<ARSym> H4::HermiteIntegrator< Tparticle, Tpcm, Tpert, TARpert, Tacc, TARacc, Tinfo >::groups |
Tinfo H4::HermiteIntegrator< Tparticle, Tpcm, Tpert, TARpert, Tacc, TARacc, Tinfo >::info |
information of the system
HermiteManager<Tacc>* H4::HermiteIntegrator< Tparticle, Tpcm, Tpert, TARpert, Tacc, TARacc, Tinfo >::manager |
time step calculator
integration manager
COMM::List<Neighbor<Tparticle> > H4::HermiteIntegrator< Tparticle, Tpcm, Tpert, TARpert, Tacc, TARacc, Tinfo >::neighbors |
COMM::ParticleGroup<H4Ptcl, Tpcm> H4::HermiteIntegrator< Tparticle, Tpcm, Tpert, TARpert, Tacc, TARacc, Tinfo >::particles |
Tpert H4::HermiteIntegrator< Tparticle, Tpcm, Tpert, TARpert, Tacc, TARacc, Tinfo >::perturber |
Profile H4::HermiteIntegrator< Tparticle, Tpcm, Tpert, TARpert, Tacc, TARacc, Tinfo >::profile |
BlockTimeStep4th H4::HermiteIntegrator< Tparticle, Tpcm, Tpert, TARpert, Tacc, TARacc, Tinfo >::step |