|
MolSim
|
Class which implements functionality to generate VTK output from particles. More...
#include <XYZWriter.h>
Public Member Functions | |
| XYZWriter () | |
| Creates a new uninitialized XYZWriter. | |
| XYZWriter (const std::string &basename) | |
| Creates a new XYZWriter with the given basename for future file outputs. | |
| XYZWriter (const std::string &basename, const std::string &dirname) | |
| Creates a new XYZWriter with the given basename for future file outputs in the specified directory. | |
| virtual | ~XYZWriter () |
| Destroys the current XYZWriter object. | |
| void | writeParticles (const ParticleContainer &particles, int iteration, int total) override |
| Writes the type, mass, position, velocity and force of a ParticleContainer to a XYZ file. Terminates program execution on error. | |
Public Member Functions inherited from FileWriter | |
| FileWriter () | |
| Creates a new FileWriter with no file initialized. | |
| FileWriter (const std::string &filename) | |
| Creates a new FileWriter and opens the file with the given name. | |
| virtual | ~FileWriter () |
| Closes the opened file and destroys the FileWriter object. | |
| void | openFile (const std::string &filename) |
| Opens / creates the file with the given name. | |
| void | closeFile () |
| Closes the opened file if it exists, otherwise does nothing. | |
| void | writeFile (const std::string &content, const std::string &filename="", int iteration=-1, int total=-1) |
| Overwrites the contents of the file opened in m_file with a given string. On error, the program will terminate. | |
Private Attributes | |
| std::string | m_basename = "MD_xyz" |
| The base name of the generated files. | |
| std::string | m_dirname = "xyz" |
| The name of the directory in which to store the generated files. | |
Additional Inherited Members | |
Static Public Member Functions inherited from FileWriter | |
| static void | initializeFolder (const std::string &dirname) |
| (Re)initializes the output directory. | |
Protected Attributes inherited from FileWriter | |
| std::ofstream | m_file |
| Output stream containing the file to write contents to. | |
Class which implements functionality to generate VTK output from particles.
| XYZWriter::XYZWriter | ( | ) |
Creates a new uninitialized XYZWriter.
|
explicit |
Creates a new XYZWriter with the given basename for future file outputs.
| basename | The base name of the generated files. |
| XYZWriter::XYZWriter | ( | const std::string & | basename, |
| const std::string & | dirname | ||
| ) |
Creates a new XYZWriter with the given basename for future file outputs in the specified directory.
| basename | The base name of the generated files. |
| dirname | The directory name of the generated files. |
|
virtual |
Destroys the current XYZWriter object.
|
overridevirtual |
Writes the type, mass, position, velocity and force of a ParticleContainer to a XYZ file. Terminates program execution on error.
| particles | The ParticleContainer. |
| iteration | The number of the current iteration, used to generate a unique filename. |
| total | The total number of iterations, used to display the current percentage. |
Implements FileWriter.
|
private |
The base name of the generated files.
|
private |
The name of the directory in which to store the generated files.