SlowDown Algorithmic Regularization (SDAR)
Algorithmic Regularization with slowdown method for integrating few-body motions
|
Go to the documentation of this file.
12 template <
class Tparticle>
19 _particles.addMember(*_ptcl);
20 _ptcl = &_particles.getLastMember();
24 struct ParticleIndexAdr{
26 Tparticle* first_particle_index_local_address;
27 int* particle_index_origin_output;
28 const int* particle_index_origin_all;
30 ParticleIndexAdr(Tparticle* _first_adr,
int* _index_output,
const int* _index_org): n_particle(0), first_particle_index_local_address(_first_adr), particle_index_origin_output(_index_output), particle_index_origin_all(_index_org) {}
34 static void calcParticleIndex(ParticleIndexAdr& _index, Tparticle*& _ptcl) {
35 _index.particle_index_origin_output[_index.n_particle++] = _index.particle_index_origin_all[int(_ptcl - _index.first_particle_index_local_address)];
59 _fout<<std::setw(_width)<<
"dt_limit";
101 ASSERT(bin_root.getMemberN() == n_members);
102 bin_root.processLeafIter(_particles, addOneParticleAndReLinkPointer);
114 bin_root.processLeafIter(p_index, calcParticleIndex);
115 if (bin_root.getMemberN()==2)
return 1;
117 if (bin_root.isMemberTree(0))
return bin_root.getLeftMemberAsTree()->getMemberN();
131 const Float* pos1 = _p1.getPos();
132 const Float* pos2 = _p2.getPos();
133 const Float* vel1 = _p1.getVel();
134 const Float* vel2 = _p2.getVel();
135 dx[0] = pos1[0] - pos2[0];
136 dx[1] = pos1[1] - pos2[1];
137 dx[2] = pos1[2] - pos2[2];
139 dv[0] = vel1[0] - vel2[0];
140 dv[1] = vel1[1] - vel2[1];
141 dv[2] = vel1[2] - vel2[2];
143 _dr2 = dx[0]*dx[0] + dx[1]*dx[1] + dx[2]*dx[2];
144 _drdv= dx[0]*dv[0] + dx[1]*dv[1] + dx[2]*dv[2];
Ttype * getDataAddress() const
return member data array address
Definition: list.h:170
void clear()
Clear function.
Definition: list.h:76
const Float NUMERIC_FLOAT_MAX
Definition: Float.h:29
void getherBinaryTreeIter(BinaryTreeLocal _bin[])
collect BinaryTree data iteratively and save to a BinaryTree array
Definition: binary_tree.h:744
particle type for AR integrator, not necessary anymore
Definition: hermite_particle.h:6
Particle group class to store and manage a group of particle.
Definition: particle_group.h:13
int getMemberN() const
get total number of members
Definition: binary_tree.h:801
double Float
Definition: Float.h:25
Binary tree cell.
Definition: binary_tree.h:492
Definition: ar_information.h:9
void setMode(const ListMode _mode)
set mode
Definition: list.h:39
void reserveMem(const int _nmax)
Memory allocation for storing members.
Definition: list.h:48