23 bool open(std::string path,
bool create=
true);
40 bool saveFrame(
const int neq,
const double &T,
const double* data);
YACTS trajectory file.
Definition trjfile.h:6
int size()
Get number of frames in the file.
int neq
Number of equations in the system solved (frame size).
Definition trjfile.h:9
bool saveFrame(const int neq, const double &T, const double *data)
Saves frame to the file at the current pos, appends if necessary.
bool good()
Checks that trajectory file is opened and properly positioned.
int getNEQ()
Get number of equations.
bool open(std::string path, bool create=true)
Opens/creates trajectory and positions it before the last frame, or right after the header if traject...
bool close()
Closes the trajectory.
std::fstream trj
Opened stream to the underlying file.
Definition trjfile.h:11
trjfile()
Instantiates unopened trajectory file.
void setHeader(int id, int neq)
patch the header with new data
bool toFrame(int frame)
Position the file before the specified frame.
bool loadFrame(double &T, double *data)
Load frame.
std::streampos frame_size()
frame size on disk
bool hasNextFrame()
Checks if the file has next frame stored.
std::streampos header_size()
header size on disk