MolSim
Loading...
Searching...
No Matches
XYZWriter.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "FileWriter.h"
14#include "objects/Particle.h"
15#include <fstream>
16#include <string>
17
19class XYZWriter : public FileWriter {
20 private:
22 std::string m_basename = "MD_xyz";
24 std::string m_dirname = "xyz";
25
26 public:
29
35 explicit XYZWriter(const std::string &basename);
36
43 XYZWriter(const std::string &basename, const std::string &dirname);
44
46 virtual ~XYZWriter();
47
56 void writeParticles(const ParticleContainer &particles, int iteration, int total) override;
57};
General class used to strictly write particle data to some output file. data.
Model of a single particle.
Superclass which implements functionality to output data to a file on disk.
Definition FileWriter.h:16
Class for encapsulating multiple Particle objects..
Definition ParticleContainer.h:17
Class which implements functionality to generate VTK output from particles.
Definition XYZWriter.h:19
virtual ~XYZWriter()
Destroys the current XYZWriter object.
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.
std::string m_basename
The base name of the generated files.
Definition XYZWriter.h:22
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....
std::string m_dirname
The name of the directory in which to store the generated files.
Definition XYZWriter.h:24