Manages logging of simulation data to files.
More...
#include <logging.h>
|
| Logging (const std::string &filename_position, const std::string &filename_data) |
| Constructs a Logging object and opens the file for writing.
|
|
| ~Logging () |
| Destructor to close the file when the Logging object is destroyed.
|
|
void | logPositions_xyz (const std::vector< Particle > &particles, const SimulationBox &box, double r2cut) |
| Logs the positions of all particles to the file.
|
|
void | logPositions_dump (const std::vector< Particle > &particles) |
| Logs the positions of all particles to the file.
|
|
void | logSimulationData (const Simulation &sim, int timestep) |
| Logs the simularion data like energy pressure, number of particles of the system to the data file.
|
|
void | close () |
| Closes the log file.
|
|
Manages logging of simulation data to files.
◆ Logging()
Logging::Logging |
( |
const std::string & | filename_position, |
|
|
const std::string & | filename_data ) |
Constructs a Logging object and opens the file for writing.
- Parameters
-
filename | The name of the file where data will be logged. |
◆ ~Logging()
Destructor to close the file when the Logging object is destroyed.
◆ close()
◆ logPositions_dump()
void Logging::logPositions_dump |
( |
const std::vector< Particle > & | particles | ) |
|
Logs the positions of all particles to the file.
- Parameters
-
particles | The vector of particles whose positions will be logged in the dump format. |
◆ logPositions_xyz()
void Logging::logPositions_xyz |
( |
const std::vector< Particle > & | particles, |
|
|
const SimulationBox & | box, |
|
|
double | r2cut ) |
Logs the positions of all particles to the file.
- Parameters
-
particles | The vector of particles whose positions will be logged in the xyz format. |
◆ logSimulationData()
void Logging::logSimulationData |
( |
const Simulation & | sim, |
|
|
int | timestep ) |
Logs the simularion data like energy pressure, number of particles of the system to the data file.
- Parameters
-
energy | The total energy of the system. |
timestep | The current timestep in the simulation. |
The documentation for this class was generated from the following files: