PeTar
N-body code for collisional gravitational systems
|
A sample particle class. More...
Public Member Functions | |
void | writeBinary (FILE *_fout) const |
write class data to file with binary format More... | |
void | readBinary (FILE *_fin) |
read class data to file with binary format More... | |
void | writeAscii (std::ostream &_fout) const |
write class data to file with ASCII format More... | |
void | readAscii (std::istream &_fin) |
read class data to file with ASCII format More... | |
void | printColumn (std::ostream &_fout, const int _width=20) |
print data of class members using column style More... | |
void | readAscii (FILE *fp) |
void | printColumn (std::ostream &_fout, const int _width=20) const |
print data of class members using column style 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 void | printColumnTitle (std::ostream &_fout, const int _width=20) |
print titles of class members using column style More... | |
Public Attributes | |
long long int | id |
Float | mass |
PS::F64vec3 | pos |
PS::F64vec3 | vel |
double | mass |
double | pos [3] |
double | vel [3] |
double | acc [3] |
double | pot |
A sample particle class.
A particle class should contain public members: Float mass, Float pos[3], Float vel[3],
|
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
[out] | _fout | std::ostream output object |
[in] | _width | print width (defaulted 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
[out] | _fout | std::ostream output object |
[in] | _width | print width (defaulted 20) |
|
inlinestatic |
print titles of class members using column style
print titles of class members in one line for column style
[out] | _fout | std::ostream output object |
[in] | _width | print width (defaulted 20) |
|
inlinestatic |
print titles of class members using column style
print titles of class members in one line for column style
[out] | _fout | std::ostream output object |
[in] | _width | print width (defaulted 20) |
|
inline |
|
inline |
read class data to file with ASCII format
[in] | _fin | std::istream file for input |
|
inline |
read class data to file with binary format
[in] | _fp | FILE type file for reading |
|
inline |
write class data to file with ASCII format
[in] | _fout | std:osteram file for output |
|
inline |
write class data to file with binary format
[in] | _fp | FILE type file for output |
double Particle::acc[3] |
long long int Particle::id |
double Particle::mass |
Float Particle::mass |
double Particle::pos[3] |
PS::F64vec3 Particle::pos |
double Particle::pot |
double Particle::vel[3] |
PS::F64vec3 Particle::vel |