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

#include <soft_ptcl.hpp>

Inheritance diagram for FPSoft:
[legend]
Collaboration diagram for FPSoft:
[legend]

Public Member Functions

 FPSoft ()
 
PS::F64vec getPos () const
 Get position (required for ARC::chain) More...
 
PS::F64vec getVel () const
 Get velocity (required for ARC::chain) More...
 
template<class Tptcl >
 FPSoft (const Tptcl &p, const PS::S32 rank_, const PS::S32 adr_)
 
void copyFromForce (const ForceSoft &force)
 
PS::F64 getRSearch () const
 
void writeAscii (FILE *fp) const
 
void writeBinary (FILE *fp) const
 
void readAscii (FILE *fp)
 
void readBinary (FILE *fp)
 
void print (std::ostream &fout)
 
void printColumn (std::ostream &_fout, const int _width=20)
 print data of class members using column style More...
 
template<class Tpcm >
void printColumnWithOffset (Tpcm &_pcm, std::ostream &_fout, const int _width=20)
 print data of class members with pos and vel offset using column style More...
 
void clearForce ()
 clear force More...
 
- Public Member Functions inherited from Ptcl
 Ptcl ()
 
template<class Tptcl >
 Ptcl (const Tptcl &_p)
 
template<class Tptcl >
 Ptcl (const Tptcl &_p, const PS::F64 _r_search, const PS::S64 _id, const GroupDataDeliver &_group_data, const ChangeOver &_co)
 
template<class Tptcl >
void DataCopy (const Tptcl &_p)
 
template<class Tptcl >
Ptcloperator= (const Tptcl &_p)
 
void print (std::ostream &_fout) const
 
void printColumn (std::ostream &_fout, const int _width=20)
 print data of class members using column style More...
 
template<class Tpcm >
void printColumnWithOffset (Tpcm &_pcm, std::ostream &_fout, const int _width=20)
 print data of class members with pos and vel offset using column style More...
 
void writeAscii (FILE *_fout) const
 write class data with ASCII format More...
 
void writeBinary (FILE *_fout) const
 write class data with BINARY format More...
 
void readAscii (FILE *_fin)
 read class data with ASCII format More...
 
void readBinary (FILE *_fin)
 read class data with BINARY format More...
 
void setParticleCMAddress (const PS::S64 _adr)
 set status to c.m. particle address More...
 
PS::S64 getParticleCMAddress () const
 get c.m. particle address More...
 
void calcRSearch (const PS::F64 _dt_tree)
 calculate new rsearch More...
 
PS::F64 getRNeighbor () const
 Get neighbor distance criterion. More...
 
PS::F64 getRGroupCandidate () const
 Get group candidate distance criterion. More...
 
PS::F64 getRGroup () const
 Get group distance criterion. More...
 
- Public Member Functions inherited from ParticleBase
void setBinaryPairID (const PS::S64 _id)
 save pair id in binary_state with shift bit size of BINARY_STATE_ID_SHIFT More...
 
void setBinaryInterruptState (const BinaryInterruptState _state)
 save binary interrupt state in the first BINARY_STATE_ID_SHIFT bit in binary_state More...
 
BinaryInterruptState getBinaryInterruptState () const
 get binary interrupt state from binary_state More...
 
PS::S64 getBinaryPairID () const
 get pair ID from binary_state More...
 
 ParticleBase ()
 defaulted constructor More...
 
template<class Tp >
 ParticleBase (const Tp &p)
 
 ParticleBase (const PS::F64 _mass, const PS::F64vec &_pos, const PS::F64vec &_vel)
 constructor More...
 
 ParticleBase (const PS::F64 _mass, const PS::F64vec &_pos, const PS::F64vec &_vel, const PS::S64 _binary_state)
 constructor More...
 
void writeAscii (FILE *fp) const
 write class data with ASCII format More...
 
void readAscii (FILE *fp)
 read class data with ASCII format More...
 
void writeBinary (FILE *fp) const
 write class data with BINARY format More...
 
void readBinary (FILE *fp)
 read class data with BINARY format More...
 
void print (std::ostream &fout) const
 for print debugging More...
 
void printColumn (std::ostream &_fout, const int _width=20) const
 print data of class members using column style More...
 
template<class Tpcm >
void printColumnWithOffset (Tpcm &_pcm, std::ostream &_fout, const int _width=20) const
 print data of class members with pos and vel offset using column style More...
 
template<class Tp >
void DataCopy (const Tp &din)
 Copy from another ParticleBase. More...
 
PS::F64 getMass ()
 Get mass (required for ARC::chain) More...
 
PS::F64 * getPos ()
 Get position (required for ARC::chain) More...
 
PS::F64 * getVel ()
 Get velocity (required for ARC::chain) More...
 
void setPos (const PS::F64 x, const PS::F64 y, const PS::F64 z)
 Set position (required for ARC::chain) More...
 
void setPos (const PS::F64vec &_pos)
 Set position (used in soft part) More...
 
void setVel (const PS::F64 vx, const PS::F64 vy, const PS::F64 vz)
 Set velocity (required for ARC::chain) More...
 
void setVel (const PS::F64vec &_vel)
 Set velocity. More...
 
void setMass (const PS::F64 m)
 Set mass (required for ARC::chain) More...
 

Static Public Member Functions

static void printColumnTitle (std::ostream &_fout, const int _width=20)
 print titles of class members using column style More...
 
static int printTitleWithMeaning (std::ostream &_fout, const int _counter=0, const int _offset=0)
 print column title with meaning (each line for one column) More...
 
- Static Public Member Functions inherited from Ptcl
static void printColumnTitle (std::ostream &_fout, const int _width=20)
 print titles of class members using column style More...
 
static int printTitleWithMeaning (std::ostream &_fout, const int _counter=0, const int _offset=0)
 print column title with meaning (each line for one column) More...
 
- Static Public Member Functions inherited from ParticleBase
static void printColumnTitle (std::ostream &_fout, const int _width=20)
 print titles of class members using column style More...
 
static int printTitleWithMeaning (std::ostream &_fout, const int _counter=0, const int _offset=0)
 print column title with meaning (each line for one column) More...
 

Public Attributes

PS::F64vec acc
 
PS::F64 pot_tot
 
PS::F64 pot_soft
 
PS::S64 n_ngb
 
PS::S32 rank_org
 
PS::S32 adr
 
- Public Attributes inherited from Ptcl
PS::F64 r_search
 
PS::S64 id
 
GroupDataDeliver group_data
 
ChangeOver changeover
 
- Public Attributes inherited from ParticleBase
PS::F64 mass
 
PS::F64vec pos
 
PS::F64vec vel
 
PS::S64 binary_state
 

Additional Inherited Members

- Static Public Attributes inherited from Ptcl
static PS::F64 search_factor = 0.0
 
static PS::F64 r_search_min = 0.0
 
static PS::F64 r_group_crit_ratio =0.0
 
static PS::F64 mean_mass_inv = 0.0
 
static GroupDataMode group_data_mode = GroupDataMode::none
 

Constructor & Destructor Documentation

◆ FPSoft() [1/2]

FPSoft::FPSoft ( )
inline

◆ FPSoft() [2/2]

template<class Tptcl >
FPSoft::FPSoft ( const Tptcl &  p,
const PS::S32  rank_,
const PS::S32  adr_ 
)
inline
Here is the call graph for this function:

Member Function Documentation

◆ clearForce()

void FPSoft::clearForce ( )
inline

clear force

◆ copyFromForce()

void FPSoft::copyFromForce ( const ForceSoft force)
inline

◆ getPos()

PS::F64vec FPSoft::getPos ( ) const
inline

Get position (required for ARC::chain)

Returns
position vector (PS::F64[3])

◆ getRSearch()

PS::F64 FPSoft::getRSearch ( ) const
inline

◆ getVel()

PS::F64vec FPSoft::getVel ( ) const
inline

Get velocity (required for ARC::chain)

Returns
velocity vector (PS::F64[3])

◆ print()

void FPSoft::print ( std::ostream &  fout)
inline
Here is the call graph for this function:

◆ printColumn()

void FPSoft::printColumn ( std::ostream &  _fout,
const int  _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()

static void FPSoft::printColumnTitle ( std::ostream &  _fout,
const int  _width = 20 
)
inlinestatic

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:

◆ printColumnWithOffset()

template<class Tpcm >
void FPSoft::printColumnWithOffset ( Tpcm &  _pcm,
std::ostream &  _fout,
const int  _width = 20 
)
inline

print data of class members with pos and vel offset using column style

print data of class members in one line for column style. Notice no newline is printed at the end

Parameters
[in]_pcmparticle data with position and velocity offset that are added when print data
[out]_foutstd::ostream output object
[in]_widthprint width (defaulted 20)
Here is the call graph for this function:

◆ printTitleWithMeaning()

static int FPSoft::printTitleWithMeaning ( std::ostream &  _fout,
const int  _counter = 0,
const int  _offset = 0 
)
inlinestatic

print column title with meaning (each line for one column)

Parameters
[out]_foutstd::ostream output object
[in]_counteroffset of the number counter for each line to indicate the column index (defaulted 0)
[in]_offsetthe printing whitespace offset for each line (defaulted 0)
Returns
: the total counter of columns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readAscii()

void FPSoft::readAscii ( FILE *  fp)
inline
Here is the call graph for this function:

◆ readBinary()

void FPSoft::readBinary ( FILE *  fp)
inline
Here is the call graph for this function:

◆ writeAscii()

void FPSoft::writeAscii ( FILE *  fp) const
inline
Here is the call graph for this function:

◆ writeBinary()

void FPSoft::writeBinary ( FILE *  fp) const
inline
Here is the call graph for this function:

Member Data Documentation

◆ acc

PS::F64vec FPSoft::acc

◆ adr

PS::S32 FPSoft::adr

◆ n_ngb

PS::S64 FPSoft::n_ngb

◆ pot_soft

PS::F64 FPSoft::pot_soft

◆ pot_tot

PS::F64 FPSoft::pot_tot

◆ rank_org

PS::S32 FPSoft::rank_org

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