PeTar
N-body code for collisional gravitational systems
|
Hard system. More...
#include <hard.hpp>
Classes | |
struct | GroupIndexInfo |
Public Member Functions | |
bool | checkParams () |
check paramters More... | |
SystemHard () | |
void | allocateHardIntegrator (const PS::S32 _n_hard_int) |
allocate memorgy for HardIntegrator More... | |
~SystemHard () | |
void | initializeForOneCluster (const PS::S32 n) |
template<class Tsys , class Tptcl , class Tmediator > | |
void | setPtclForConnectedCluster (const Tsys &sys, const PS::ReallocatableArray< Tmediator > &med, const PS::ReallocatableArray< Tptcl > &ptcl_recv) |
PS::S32 | getGroupPtclRemoteN () const |
PS::ReallocatableArray< PtclH4 > & | getPtcl () |
PS::S32 | getNumberOfClusters () const |
PS::S32 | getNumberOfInterruptClusters () const |
HardIntegrator * | getInterruptHardIntegrator (const std::size_t i) |
PS::S32 * | getClusterNumberOfMemberList (const std::size_t i=0) const |
PS::S32 * | getClusterNumberOfMemberListOffset (const std::size_t i=0) const |
PS::S32 * | getGroupNumberOfMemberList (const std::size_t i=0) const |
PS::S32 * | getGroupNumberOfMemberListOffset (const std::size_t i=0) const |
PS::S32 * | getAdrPtclArtFirstList (const std::size_t i=0) const |
PS::S32 | getNClusterChangeOverUpdate () const |
void | setTimeOrigin (const PS::F64 _time_origin) |
void | updateTimeWriteBack () |
PS::F64 | getTimeOrigin () const |
template<class Tsys > | |
void | setPtclForOneClusterOMP (const Tsys &sys, const PS::ReallocatableArray< PS::S32 > &adr_array) |
void | driveForOneClusterOMP (const PS::F64 _dt) |
integrate one isolated particle More... | |
template<class Tsys > | |
void | writeBackPtclForOneCluster (Tsys &sys, PS::ReallocatableArray< PS::S32 > &_mass_modify_list) |
write back hard particles to global system, check mass modification and update time of write back More... | |
template<class Tsys > | |
void | writeBackPtclForOneClusterOMP (Tsys &sys, PS::ReallocatableArray< PS::S32 > &_mass_modify_list) |
write back hard particles to global system and update time of write back OMP version More... | |
template<class Tsys > | |
void | writeBackPtclForMultiCluster (Tsys &_sys, PS::ReallocatableArray< PS::S32 > &_mass_modify_list) |
write back hard particles to global system, check mass modification and update time of write back More... | |
template<class Tsys > | |
void | writeBackPtclForMultiClusterOMP (Tsys &_sys, PS::ReallocatableArray< PS::S32 > &_mass_modify_list) |
write back hard particles to global system and update time of write back OMP version More... | |
template<class Tsys > | |
void | setPtclForIsolatedMultiClusterOMP (const Tsys &sys, const PS::ReallocatableArray< PS::S32 > &_adr_array, const PS::ReallocatableArray< PS::S32 > &_n_ptcl_in_cluster) |
template<class Tpsoft > | |
int | driveForMultiClusterOMP (const PS::F64 dt, Tpsoft *_ptcl_soft) |
Hard integration for clusters. More... | |
PS::S32 | finishIntegrateInterruptClustersOMP () |
Finish interrupt integration. More... | |
template<class Tptcl > | |
void | findGroupsAndCreateArtificialParticlesOneCluster (const PS::S32 _i_cluster, Tptcl *_ptcl_in_cluster, const PS::S32 _n_ptcl, PS::ReallocatableArray< Tptcl > &_ptcl_artificial, PS::ReallocatableArray< COMM::BinaryTree< PtclH4, COMM::Binary >> &_binary_table, PS::S32 &_n_groups, PS::ReallocatableArray< GroupIndexInfo > &_n_member_in_group, PS::ReallocatableArray< PS::S32 > &_changeover_update_list, SearchGroupCandidate< Tptcl > &_groups, const PS::F64 _dt_tree) |
generate artificial particles, More... | |
template<class Tsys , class Tptcl > | |
void | findGroupsAndCreateArtificialParticlesOMP (Tsys &_sys, const PS::F64 _dt_tree) |
Find groups and create aritfical particles to sys. More... | |
template<class Tsys > | |
void | correctPotWithCutoffOMP (Tsys &_sys, const PS::ReallocatableArray< PS::S32 > &_ptcl_list) |
potential correction for single cluster More... | |
template<class Tsys , class Tpsoft , class Ttree , class Tepj > | |
void | correctForceWithCutoffTreeNeighborAndClusterOMP (Tsys &_sys, Ttree &_tree, const PS::ReallocatableArray< PS::S32 > &_adr_send, const bool _acorr_flag=false) |
Soft force correction due to different cut-off function. More... | |
template<class Tsys > | |
void | correctForceWithCutoffClusterOMP (Tsys &_sys, const bool _acorr_flag=false) |
Soft force correction due to different cut-off function. More... | |
template<class Tsys , class Ttree , class Tepj > | |
void | correctForceForChangeOverUpdateOMP (Tsys &_sys, Ttree &_tree, const PS::S32 *_adr_send=NULL, const PS::S32 _n_send=0) |
Correct force due to change over factor change. More... | |
Static Public Member Functions | |
template<class Tsys , class Tpsoft , class Ttree , class Tepj > | |
static void | correctForceWithCutoffTreeNeighborOMP (Tsys &_sys, Ttree &_tree, const PS::S32 _adr_ptcl_artificial_start, ArtificialParticleManager &_ap_manager, const bool _acorr_flag=false) |
Soft force correction due to different cut-off function. More... | |
Public Attributes | |
PS::ReallocatableArray< COMM::BinaryTree< PtclH4, COMM::Binary > > | binary_table |
HardManager * | manager |
Hard system.
|
inline |
|
inline |
|
inline |
allocate memorgy for HardIntegrator
For record interrupt clusters. A array of HardIntegrator is allocated
[in] | _n_hard_int | number of HardIntegrator |
|
inline |
check paramters
|
inline |
Correct force due to change over factor change.
[in,out] | _sys | global particle system, acc is updated |
[in] | _tree | tree for force, to get neighbor list |
[in] | _adr_send | for connected case, correct sending list |
[in] | _n_send | sending particle number |
|
inline |
Soft force correction due to different cut-off function.
|
inline |
Soft force correction due to different cut-off function.
Use tree neighbor search
[in] | _sys | global particle system, acc is updated |
[in] | _tree | tree for force |
[in] | _adr_send | particle in sending list of connected clusters |
[in] | _acorr_flag | flag to do acorr for KDKDK_4TH case |
|
inlinestatic |
Soft force correction due to different cut-off function.
Use tree neighbor search for all particles. c.m. force is replaced by the averaged force on orbital particles Tidal tensor particle subtract the c.m. acc
[in] | _sys | global particle system, acc is updated |
[in] | _tree | tree for force |
[in] | _adr_ptcl_artificial_start | start address of artificial particle in _sys |
[in] | _ap_manager | artificial particle manager |
|
inline |
potential correction for single cluster
|
inline |
Hard integration for clusters.
Integrate (drift) all clusters with OpenMP If interrupt integration exist, record in the interrupt_list_;
[in] | _dt | integration ending time (initial time is fixed to 0) |
[in] | _ptcl_soft | global particle array which contains the artificial particles for constructing tidal tensors. |
|
inline |
integrate one isolated particle
integrate one isolated particle and calculate new r_search
[in] | _dt | tree time step |
|
inline |
Find groups and create aritfical particles to sys.
|
inline |
generate artificial particles,
|
inline |
Finish interrupt integration.
Finish interrupted integrations, if new interruption appear, record in the interrupt_list and this function need to be called again after modification of interrupt clusters If no new interrupt cluster appear, update time_origin_ with drift time.
[in] |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
write back hard particles to global system, check mass modification and update time of write back
[in,out] | _sys | particle system |
[out] | _mass_modify_list | address on _sys of particles where mass is modified |
|
inline |
write back hard particles to global system and update time of write back OMP version
[in,out] | _sys | particle system |
[out] | _mass_modify_list | address on _sys of particles where mass is modified |
[out] | _removelist | address on _sys of particles that are need to be removed are stored. |
|
inline |
write back hard particles to global system, check mass modification and update time of write back
[in,out] | _sys | particle system |
[out] | _mass_modify_list | address on _sys of particles where mass is modified |
|
inline |
write back hard particles to global system and update time of write back OMP version
[in,out] | _sys | particle system |
[out] | _mass_modify_list | address on _sys of particles where mass is modified |
PS::ReallocatableArray<COMM::BinaryTree<PtclH4,COMM::Binary> > SystemHard::binary_table |
HardManager* SystemHard::manager |