Molecular Dynamics Simulation  1.0
VTUWriter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "io/output/FileWriter.h"
4 #include "io/xml_schemas/vtu_file/vtu_file_schema.h"
5 #include "particles/Particle.h"
6 
10 class VTUWriter : public FileWriter {
11  public:
21  const std::filesystem::path writeFile(const SimulationParams& params, size_t iteration,
22  const std::vector<Particle>& particles) const override;
23 
24  private:
31  [[nodiscard]] static VTKFile_t initializeOutput(int numParticles);
32 
39  static void plotParticle(VTKFile_t& file, const Particle& p);
40 };
Abstract base class for all file writers.
Definition: FileWriter.h:12
Class to represent a particle.
Definition: Particle.h:26
Contains all parameters needed to run a simulation.
Class to write particle data to a .vtu file.
Definition: VTUWriter.h:10
static void plotParticle(VTKFile_t &file, const Particle &p)
Writes a given particle to the given VTKFile_t object.
Definition: VTUWriter.cpp:41
static VTKFile_t initializeOutput(int numParticles)
Creates a VTKFile_t object with the given number of particles.
Definition: VTUWriter.cpp:7
const std::filesystem::path writeFile(const SimulationParams &params, size_t iteration, const std::vector< Particle > &particles) const override
Writes the data of the given ParticleContainer to a .vtu file.
Definition: VTUWriter.cpp:67