KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
particle_vtk_output.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Nicolò Crescenzio
11 //
12 //
13 
14 #pragma once
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
23 
24 namespace Kratos
25 {
30 class KRATOS_API(PARTICLE_MECHANICS_APPLICATION) ParticleVtkOutput : public VtkOutput
31 {
32 public:
33 
35  using SizeType = std::size_t;
36 
38  using IndexType = std::size_t;
39 
42 
45 
51  explicit ParticleVtkOutput(
52  ModelPart& rModelPart,
53  Parameters ThisParameters = Parameters(R"({})" )
54  );
55 
59 
61 
65  static Parameters GetDefaultParameters();
66 
68  std::string Info() const override
69  {
70  return " ParticleVtkOutput object ";
71  }
72 
77  void PrintInfo(std::ostream& rOStream) const override
78  {
79  rOStream << " ParticleVtkOutput object " << std::endl;
80  }
81 
83  void PrintData(std::ostream& rOStream) const override
84  {
85  }
86 
87 protected:
88 
94  void WriteNodesToFile(
95  const ModelPart& rModelPart,
96  std::ofstream& rFileStream
97  ) const override;
98 
105  template <typename TContainerType>
106  void WriteConnectivity(
107  const TContainerType& rContainer,
108  std::ofstream& rFileStream
109  ) const;
110 
117  template <typename TContainerType>
118  void WriteCellType(
119  const TContainerType& rContainer,
120  std::ofstream& rFileStream
121  ) const;
122 
129  void WriteConditionsAndElementsToFile(
130  const ModelPart& rModelPart,
131  std::ofstream& rFileStream
132  ) const override;
133 
139  void WriteNodalResultsToFile(
140  const ModelPart& rModelPart,
141  std::ofstream& rFileStream
142  ) override;
143 
144 };
145 
146 } // namespace Kratos
std::size_t SizeType
Definition: io.h:97
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
ParticleVtkOutput A simple class that has functionality to write vtk output.
Definition: particle_vtk_output.h:31
std::string Info() const override
Turn back information as a string.
Definition: particle_vtk_output.h:68
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: particle_vtk_output.h:83
KRATOS_CLASS_POINTER_DEFINITION(ParticleVtkOutput)
Pointer definition of ParticleVtkOutput.
void PrintInfo(std::ostream &rOStream) const override
Prints information about the class.
Definition: particle_vtk_output.h:77
VtkOutput A simple class that has functionality to write vtk output.
Definition: vtk_output.h:35
std::size_t IndexType
Definition of the index type.
Definition: vtk_output.h:42
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21