class to store necessary information for using artificial particles
More...
#include <artificial_particles.hpp>
|
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...
|
|
class to store necessary information for using artificial particles
single c.m. members initial artificial
mass_backup 0 mass (+) mass (+) -LARGE default is 0.0 / data stored (-/0) status 0 n_members (+) c.m. adr (-) -LARGE position in artificial particle array / data stored (+)
◆ ArtificialParticleInformation()
ArtificialParticleInformation::ArtificialParticleInformation |
( |
| ) |
|
|
inline |
◆ getData()
PS::F64 ArtificialParticleInformation::getData |
( |
const bool |
is_positive | ) |
const |
|
inline |
get stored data (only in artificial particles)
- Parameters
-
[in] | is_positive | indicate whether stored data is positive (true) or negative (false) |
◆ getMassBackup()
PS::F64 ArtificialParticleInformation::getMassBackup |
( |
| ) |
const |
|
inline |
◆ getStatus()
PS::F64 ArtificialParticleInformation::getStatus |
( |
| ) |
const |
|
inline |
◆ isArtificial()
bool ArtificialParticleInformation::isArtificial |
( |
| ) |
const |
|
inline |
return whether the particle type is artificial
◆ isCM()
bool ArtificialParticleInformation::isCM |
( |
| ) |
const |
|
inline |
return whether the particle type is c.m.
◆ isMember()
bool ArtificialParticleInformation::isMember |
( |
| ) |
const |
|
inline |
return whether the particle type is member
◆ isSingle()
bool ArtificialParticleInformation::isSingle |
( |
| ) |
const |
|
inline |
return whether the particle type is single
◆ isUnused()
bool ArtificialParticleInformation::isUnused |
( |
| ) |
const |
|
inline |
return whether the particle is unused
◆ print()
void ArtificialParticleInformation::print |
( |
std::ostream & |
_fout | ) |
const |
|
inline |
◆ printColumn()
void ArtificialParticleInformation::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] | _fout | std::ostream output object |
[in] | _width | print width (defaulted 20) |
◆ printColumnTitle()
static void ArtificialParticleInformation::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] | _fout | std::ostream output object |
[in] | _width | print width (defaulted 20) |
◆ printTitleWithMeaning()
static int ArtificialParticleInformation::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] | _fout | std::ostream output object |
[in] | _counter | offset of the number counter for each line to indicate the column index (defaulted 0) |
[in] | _offset | the printing whitespace offset for each line (defaulted 0) |
- Returns
- : the total counter of columns
◆ readAscii()
void ArtificialParticleInformation::readAscii |
( |
FILE * |
_fin | ) |
|
|
inline |
read class data with ASCII format
- Parameters
-
◆ readBinary()
void ArtificialParticleInformation::readBinary |
( |
FILE * |
_fin | ) |
|
|
inline |
read class data with BINARY format
- Parameters
-
◆ setMassBackup()
void ArtificialParticleInformation::setMassBackup |
( |
const PS::F64 |
_mass | ) |
|
|
inline |
◆ setParticleTypeToArtificial()
void ArtificialParticleInformation::setParticleTypeToArtificial |
( |
const PS::F64 |
_status = PS::LARGE_FLOAT , |
|
|
const PS::F64 |
_mass_backup = 0.0 |
|
) |
| |
|
inline |
set particle type to artificial
- Parameters
-
[in] | _status | status to save |
◆ setParticleTypeToCM()
void ArtificialParticleInformation::setParticleTypeToCM |
( |
const PS::F64 |
_mass_backup = PS::LARGE_FLOAT , |
|
|
const PS::F64 |
_status = PS::LARGE_FLOAT |
|
) |
| |
|
inline |
set particle type to artificial
- Parameters
-
[in] | _status | status to save |
◆ setParticleTypeToMember()
void ArtificialParticleInformation::setParticleTypeToMember |
( |
const PS::F64 |
_mass = PS::LARGE_FLOAT , |
|
|
const PS::F64 |
_status = -PS::LARGE_FLOAT |
|
) |
| |
|
inline |
set particle type to member
- Parameters
-
◆ setParticleTypeToSingle()
void ArtificialParticleInformation::setParticleTypeToSingle |
( |
| ) |
|
|
inline |
set particle type to single
◆ setParticleTypeToUnused()
void ArtificialParticleInformation::setParticleTypeToUnused |
( |
| ) |
|
|
inline |
set particle type to unused
◆ setStatus()
void ArtificialParticleInformation::setStatus |
( |
const PS::F64 |
_status | ) |
|
|
inline |
◆ storeData()
void ArtificialParticleInformation::storeData |
( |
const PS::F64 |
_data | ) |
|
|
inline |
store one data (only in artificial particles)
positive data stored in status, otherwise in mass_backup;
◆ writeAscii()
void ArtificialParticleInformation::writeAscii |
( |
FILE * |
_fout | ) |
const |
|
inline |
write class data with ASCII format
- Parameters
-
[in] | _fout | file IO for write |
◆ writeBinary()
void ArtificialParticleInformation::writeBinary |
( |
FILE * |
_fin | ) |
const |
|
inline |
write class data with BINARY format
- Parameters
-
[in] | _fout | file IO for write |
The documentation for this class was generated from the following file: