PeTar
N-body code for collisional gravitational systems
Status Class Reference

class for measure the status of the system More...

#include <status.hpp>

Collaboration diagram for Status:
[legend]

Classes

struct  ParticleCM
 

Public Member Functions

 Status ()
 
template<class Tsoft >
void shiftToCenterOfMassFrame (Tsoft *_tsys, const PS::S64 _n)
 shift particle system center to c.m. frame More...
 
template<class Tsoft >
void shiftToOriginFrame (Tsoft *_tsys, const PS::S64 _n)
 shift particle system center back to original frame More...
 
template<class Tsoft >
void calcCenterOfMass (Tsoft *_tsys, const PS::S64 _n, int _mode=3)
 calculate the center of system More...
 
template<class Tsoft >
void calcAndShiftCenterOfMass (Tsoft *_tsys, const PS::S64 _n, const int _mode=3, const bool initial_flag=false)
 calculate the center of system and shift particle systems to center frame More...
 
void printColumnTitle (std::ofstream &_fout, const PS::S32 _width=20)
 print titles of class members using column style More...
 
void printColumn (std::ofstream &_fout, const PS::S32 _width=20)
 print data of class members using column style More...
 
void print (std::ostream &_fout, const PS::S32 _precision=7)
 print title and values in one lines More...
 

Public Attributes

PS::F64 time
 
PS::S64 n_real_loc
 
PS::S64 n_real_glb
 
PS::S64 n_all_loc
 
PS::S64 n_all_glb
 
PS::S32 n_remove_glb
 
PS::S32 n_escape_glb
 
PS::F64 half_mass_radius
 
EnergyAndMomemtum energy
 
struct Status::ParticleCM pcm
 

Detailed Description

class for measure the status of the system

Constructor & Destructor Documentation

◆ Status()

Status::Status ( )
inline

Member Function Documentation

◆ calcAndShiftCenterOfMass()

template<class Tsoft >
void Status::calcAndShiftCenterOfMass ( Tsoft *  _tsys,
const PS::S64  _n,
const int  _mode = 3,
const bool  initial_flag = false 
)
inline

calculate the center of system and shift particle systems to center frame

Parameters
[in]_tsysparticle system
[in]_nnumber of particle
[in]_modecalculation mode, 1: center-of-the-mass; 2: number (no mass) weighted center; 3: soft potential weighted center
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcCenterOfMass()

template<class Tsoft >
void Status::calcCenterOfMass ( Tsoft *  _tsys,
const PS::S64  _n,
int  _mode = 3 
)
inline

calculate the center of system

Parameters
[in]_tsysparticle system
[in]_nnumber of particle
[in]_modecalculation mode, 1: center-of-the-mass; 2: number (no mass) weighted center; 3: soft potential weighted center
Here is the caller graph for this function:

◆ print()

void Status::print ( std::ostream &  _fout,
const PS::S32  _precision = 7 
)
inline

print title and values in one lines

print titles and values in one lines

Parameters
[out]_foutstd::ostream output object
[in]_precisionfloating data precision except time (15 digital)
Here is the call graph for this function:

◆ printColumn()

void Status::printColumn ( std::ofstream &  _fout,
const PS::S32  _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]_foutstd::ostream output object
[in]_widthprint width (defaulted 20)
Here is the call graph for this function:

◆ printColumnTitle()

void Status::printColumnTitle ( std::ofstream &  _fout,
const PS::S32  _width = 20 
)
inline

print titles of class members using column style

print titles of class members in one line for column style

Parameters
[out]_foutstd::ostream output object
[in]_widthprint width (defaulted 20)
Here is the call graph for this function:

◆ shiftToCenterOfMassFrame()

template<class Tsoft >
void Status::shiftToCenterOfMassFrame ( Tsoft *  _tsys,
const PS::S64  _n 
)
inline

shift particle system center to c.m. frame

set is_center_shift_flag to true

Parameters
[in,out]_tsysparticle system
[in]_nnumber of particle

◆ shiftToOriginFrame()

template<class Tsoft >
void Status::shiftToOriginFrame ( Tsoft *  _tsys,
const PS::S64  _n 
)
inline

shift particle system center back to original frame

set is_center_shift_flag to false

Parameters
[in,out]_tsysparticle system
[in]_nnumber of particle

Member Data Documentation

◆ energy

EnergyAndMomemtum Status::energy

◆ half_mass_radius

PS::F64 Status::half_mass_radius

◆ n_all_glb

PS::S64 Status::n_all_glb

◆ n_all_loc

PS::S64 Status::n_all_loc

◆ n_escape_glb

PS::S32 Status::n_escape_glb

◆ n_real_glb

PS::S64 Status::n_real_glb

◆ n_real_loc

PS::S64 Status::n_real_loc

◆ n_remove_glb

PS::S32 Status::n_remove_glb

◆ pcm

struct Status::ParticleCM Status::pcm

◆ time

PS::F64 Status::time

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