SphericalParticleVtkWriter.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef MERCURYDPM_SPHERICALPARTICLEVTKWRITER_H
6 #define MERCURYDPM_SPHERICALPARTICLEVTKWRITER_H
7 
8 
10 
12  : public ParticleVtkWriter
13 {
14 
15 public:
16 
17  explicit SphericalParticleVtkWriter(ParticleHandler& particleHandler) : ParticleVtkWriter(particleHandler)
18  {}
19 
20  ~SphericalParticleVtkWriter() override = default;
21 
26  void writeVTK() const override;
27 
28  std::string getName() const override
29  {
30  return "SphericalParticleVtkWriter";
31  }
32 
33 
34 private:
35  void writeVTKVelocity(std::fstream& file) const;
36 
37  void writeVTKAngularVelocity(std::fstream& file) const;
38 
39  void writeVTKRadius(std::fstream& file) const;
40 
44  void writeVTKId(std::fstream& file) const;
45 };
46 
47 #endif //MERCURYDPM_SPHERICALPARTICLEVTKWRITER_H
Container to store pointers to all particles.
Definition: ParticleHandler.h:28
Definition: ParticleVtkWriter.h:12
Definition: SphericalParticleVtkWriter.h:13
std::string getName() const override
Definition: SphericalParticleVtkWriter.h:28
void writeVTKId(std::fstream &file) const
Writes the id (unique integer) of the particles to the vtu file.
Definition: SphericalParticleVtkWriter.cc:98
void writeVTKAngularVelocity(std::fstream &file) const
Definition: SphericalParticleVtkWriter.cc:50
void writeVTKRadius(std::fstream &file) const
Definition: SphericalParticleVtkWriter.cc:74
void writeVTK() const override
Writes all particles into a vtk file format (unstructured grid), consisting of particle positions,...
Definition: SphericalParticleVtkWriter.cc:14
SphericalParticleVtkWriter(ParticleHandler &particleHandler)
Definition: SphericalParticleVtkWriter.h:17
~SphericalParticleVtkWriter() override=default
void writeVTKVelocity(std::fstream &file) const
Definition: SphericalParticleVtkWriter.cc:33
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286