|
Molecular Dynamics
v0.4
Project for the Practical hosted by the Scientific Computing Chair
|
Wrapper class for file handling. More...
#include <FileHandler.h>

Public Types | |
| enum class | outputFormat { vtk , xyz , xml , txt , invalid } |
| Supported output formats. More... | |
| enum class | inputFormat { txt , xml , invalid } |
| Supported input formats. More... | |
Public Member Functions | |
| void | writeToFile (ParticleContainer &particles, int iteration, outputFormat format, std::string &baseName) |
| Write particles to a file. More... | |
Static Public Member Functions | |
| static void | readFile (ParticleContainer &particles, std::string &filePath, inputFormat format) |
| Read particles from a txt-file. More... | |
Private Attributes | |
| outputWriter::VTKWriter | vtkWriter |
| outputWriter::XYZWriter | xyzWriter |
Wrapper class for file handling.
The main goal of this class is to abstract the file handling to make it convenient in the future to add more input and output methods.
|
strong |
|
strong |
|
static |
Read particles from a txt-file.
| particles | Particle container in which the newly read-in particles will be stored. |
| filePath | File path to the input txt-file of the particles to be read. |
| format | Type of the input file. |
Supported txt file formats at the moment: Particle, Cuboid.


| void FileHandler::writeToFile | ( | ParticleContainer & | particles, |
| int | iteration, | ||
| outputFormat | format, | ||
| std::string & | baseName | ||
| ) |
Write particles to a file.
| particles | Particles which will be written to the file. |
| iteration | Current iteration step of the simulation. |
| format | Type of the output file. |
| baseName | Base name of the output file. |
Write particles to a file. You can choose between different output formats. The file will be created in the directory, in which this program was executed.


|
private |
|
private |