67 VTKWriter(
const std::string &basename,
const std::string &dirname);
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
Particle class modeling a particle's position, velocity, force, mass and type.
Definition Particle.h:46
Class corresponding to the VTKFile_t schema type.
Definition vtk-unstructured.h:1771
Class which implements functionality to generate VTK output from particles.
Definition VTKWriter.h:19
VTKWriter(const std::string &basename, const std::string &dirname)
Creates a new VTKWriter with the given basename for future file outputs in the specified directory.
VTKWriter(const std::string &basename)
Creates a new VTKWriter with the given basename for future file outputs.
void writeFile(int iteration, int total)
Writes the contents of m_vtkFile into a given VTK file. Terminates program execution on error.
VTKFile_t * m_vtkFile
The VTK file instance containing particle data.
Definition VTKWriter.h:22
void initializeOutput(int numParticles)
Initializes m_vtkFile with necessary metadata for writing purposes. Terminates program execution on e...
void writeParticles(const ParticleContainer &particles, int iteration, int total) override
Writes the type, mass, position, velocity and force of a ParticleContainer to a VTK file....
std::string m_basename
The base name of the generated files.
Definition VTKWriter.h:24
void plotParticle(const Particle &p)
Plots a single particle to m_vtkFile. Terminates program execution on error.
std::string m_dirname
The name of the directory in which to store the generated files.
Definition VTKWriter.h:26
VTKWriter()
Creates a new uninitialized VTKWriter.
virtual ~VTKWriter()
Destroys the current VTKWriter object.
Generated from vtk-unstructured.xsd.