SMILE
v2.5
Schwarzschild Modelling Interactive expLoratory Environment
|
helper class that writes NEMO-compatible snapshot file More...
Public Member Functions | |
CNemoSnapshotWriter (const std::string &filename, bool append=false) | |
create class instance and open file (append if necessary) | |
~CNemoSnapshotWriter () | |
close file | |
template<typename T > | |
char | typeLetter () |
return a letter corresponding to the given type | |
template<typename T > | |
void | putVal (const std::string &name, T val) |
store a named quantity | |
template<typename T > | |
void | putArray (const std::string &name, int ndim, const int dim[], const T *data) |
write array of T; ndim - number of dimensions, dim - length of array for each dimension | |
void | startLevel (const std::string &name) |
begin a new nested array | |
void | endLevel () |
end a nested array | |
void | putString (const std::string &name, const std::string &str) |
store an array of char | |
void | putZString (const std::string &name) |
store a string enclosed by zeros | |
void | writeHistory (const std::string &new_h) |
store history line in header | |
template<typename NumT > | |
void | writePhase (const CPointMassSet< NumT > *points, double time) |
write phase space (positions and velocities) | |
bool | ok () const |
check if any i/o errors occured | |
template<> | |
char | typeLetter () |
template<> | |
char | typeLetter () |
template<> | |
char | typeLetter () |
template<> | |
char | typeLetter () |
Private Attributes | |
std::ofstream | snap |
data stream | |
int | level |
index of current level (root level is 0) | |
helper class that writes NEMO-compatible snapshot file