PeTar
N-body code for collisional gravitational systems
Stability< Tptcl > Class Template Reference

stability checker for binary tree More...

#include <stability.hpp>

Public Types

typedef COMM::BinaryTree< Tptcl, COMM::Binary > BinTree
 
typedef COMM::Binary Bin
 

Public Member Functions

 Stability ()
 
void clear ()
 
void findClosedTree (BinTree &_bin)
 Check binary tree and collect closed systems subtree root. More...
 
void findStableTree (BinTree &_bin)
 Check binary tree and collect stable subtree. More...
 

Static Public Member Functions

static PS::F64 stable3body (const Bin &_bin_in, const Bin &_bin_out, const PS::F64 _incline, const PS::F64 _t_crit, const bool is_cm_in_first)
 Three-body stability function. More...
 
static bool stable2check (const Bin &_bin, const PS::F64 _r_crit, const PS::F64 _t_crit)
 check two-body stability More...
 
static bool stable3check (const Bin &_bin, const Bin &_bout, const PS::F64 _r_crit, const PS::F64 _t_crit, const PS::F64 _is_cm_in_first)
 Three-body (B-S) stability check. More...
 
static bool stable4check (const Bin &_bin1, const Bin &_bin2, const Bin &_bout, const PS::F64 _r_crit, const PS::F64 _t_crit)
 Four-body (B-B) stability check. More...
 
static PS::S32 closedSystemCheckIter (Stability &_stab, const PS::S32 &_stab_res1, const PS::S32 &_stab_res2, BinTree &_bin)
 Closed system check iteration function for BinaryTree. More...
 
static PS::S32 stabilityCheckIter (Stability &_stab, const PS::S32 &_stab_res1, const PS::S32 &_stab_res2, BinTree &_bin)
 Stability check iteraction function for BinaryTree. More...
 

Public Attributes

PS::F64 t_crit
 
PS::ReallocatableArray< BinTree * > stable_binary_tree
 

Detailed Description

template<class Tptcl>
class Stability< Tptcl >

stability checker for binary tree

Member Typedef Documentation

◆ Bin

template<class Tptcl >
typedef COMM::Binary Stability< Tptcl >::Bin

◆ BinTree

template<class Tptcl >
typedef COMM::BinaryTree<Tptcl,COMM::Binary> Stability< Tptcl >::BinTree

Constructor & Destructor Documentation

◆ Stability()

template<class Tptcl >
Stability< Tptcl >::Stability ( )
inline

Member Function Documentation

◆ clear()

template<class Tptcl >
void Stability< Tptcl >::clear ( )
inline

◆ closedSystemCheckIter()

template<class Tptcl >
static PS::S32 Stability< Tptcl >::closedSystemCheckIter ( Stability< Tptcl > &  _stab,
const PS::S32 &  _stab_res1,
const PS::S32 &  _stab_res2,
BinTree _bin 
)
inlinestatic

Closed system check iteration function for BinaryTree.

check whether the orbit is closed system with apo-center distance less than r_group

Parameters
[in,out]_stabstability class
[in]_stab_res1/2results from iteration of two branches. -1: branch is one particle; 0: unstable branch; 1: stable branch
[in]_binsbinary tree data
Here is the caller graph for this function:

◆ findClosedTree()

template<class Tptcl >
void Stability< Tptcl >::findClosedTree ( BinTree _bin)
inline

Check binary tree and collect closed systems subtree root.

Check the orbit of each binary and if apo-center distance is positive and < bin.getRGroup(), selected as candidates. subtrees are stored in stable_binary_tree.

Parameters
[in]_binsbinary tree data
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findStableTree()

template<class Tptcl >
void Stability< Tptcl >::findStableTree ( BinTree _bin)
inline

Check binary tree and collect stable subtree.

Parameters
[in]_binsbinary tree data
Here is the call graph for this function:

◆ stabilityCheckIter()

template<class Tptcl >
static PS::S32 Stability< Tptcl >::stabilityCheckIter ( Stability< Tptcl > &  _stab,
const PS::S32 &  _stab_res1,
const PS::S32 &  _stab_res2,
BinTree _bin 
)
inlinestatic

Stability check iteraction function for BinaryTree.

Check stability of binary, triple and B-B for given binarytree, for sub branch of stable systems, save to stable_binary_tree

Parameters
[in,out]_stabstability class
[in]_stab_res1/2results from iteration of two branches. -1: branch is one particle; 0: unstable branch; 1: stable branch
[in]_binsbinary tree data
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stable2check()

template<class Tptcl >
static bool Stability< Tptcl >::stable2check ( const Bin _bin,
const PS::F64  _r_crit,
const PS::F64  _t_crit 
)
inlinestatic

check two-body stability

Here is the caller graph for this function:

◆ stable3body()

template<class Tptcl >
static PS::F64 Stability< Tptcl >::stable3body ( const Bin _bin_in,
const Bin _bin_out,
const PS::F64  _incline,
const PS::F64  _t_crit,
const bool  is_cm_in_first 
)
inlinestatic

Three-body stability function.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stable3check()

template<class Tptcl >
static bool Stability< Tptcl >::stable3check ( const Bin _bin,
const Bin _bout,
const PS::F64  _r_crit,
const PS::F64  _t_crit,
const PS::F64  _is_cm_in_first 
)
inlinestatic

Three-body (B-S) stability check.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stable4check()

template<class Tptcl >
static bool Stability< Tptcl >::stable4check ( const Bin _bin1,
const Bin _bin2,
const Bin _bout,
const PS::F64  _r_crit,
const PS::F64  _t_crit 
)
inlinestatic

Four-body (B-B) stability check.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ stable_binary_tree

template<class Tptcl >
PS::ReallocatableArray<BinTree*> Stability< Tptcl >::stable_binary_tree

◆ t_crit

template<class Tptcl >
PS::F64 Stability< Tptcl >::t_crit

The documentation for this class was generated from the following file: