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.
hdf5_nodal_data_value_io.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // license: HDF5Application/license.txt
9 //
10 // Main author: https://github.com/msandre
11 //
12 
13 #if !defined(KRATOS_HDF5_NODAL_DATA_VALUE_IO_H_INCLUDED)
14 #define KRATOS_HDF5_NODAL_DATA_VALUE_IO_H_INCLUDED
15 
16 // System includes
17 #include <string>
18 #include <vector>
19 
20 // External includes
21 
22 // Project includes
23 #include "includes/define.h"
24 
25 // Application includes
27 #include "custom_io/hdf5_file.h"
29 
30 namespace Kratos
31 {
32 class Parameters;
33 class Communicator;
34 
35 namespace HDF5
36 {
39 
42 
44 class NodalDataValueIO : public ContainerComponentIO<NodesContainerType,
45  NodeType,
46  Variable<array_1d<double, 3>>,
47  Variable<double>,
48  Variable<int>,
49  Variable<Vector<double>>,
50  Variable<Matrix<double>>>
51 {
52 public:
55 
57  NodeType,
63 
66 
70 
72  NodalDataValueIO(Parameters Settings, File::Pointer pFile)
73  : BaseType(Settings, pFile, "/NodalDataValues")
74  {
75  }
76 
80 
82  {
83  this->WriteContainerComponents(rNodes);
84  }
85 
87  {
88  this->ReadContainerComponents(rNodes, rComm);
89  }
90 
92 
93 private:
96 
100 
102 
103 }; // class NodalDataValueIO.
104 
107 } // namespace HDF5.
108 } // namespace Kratos.
109 
110 #endif // KRATOS_HDF5_NODAL_DATA_VALUE_IO_H_INCLUDED defined
The Commmunicator class manages communication for distributed ModelPart instances.
Definition: communicator.h:67
A class for IO of element data in HDF5.
Definition: hdf5_container_component_io.h:45
A class for IO of non-historical nodal values in HDF5.
Definition: hdf5_nodal_data_value_io.h:51
void ReadNodalResults(NodesContainerType &rNodes, Communicator &rComm)
Definition: hdf5_nodal_data_value_io.h:86
KRATOS_CLASS_POINTER_DEFINITION(NodalDataValueIO)
Pointer definition.
void WriteNodalResults(NodesContainerType const &rNodes)
Definition: hdf5_nodal_data_value_io.h:81
NodalDataValueIO(Parameters Settings, File::Pointer pFile)
Constructor.
Definition: hdf5_nodal_data_value_io.h:72
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
IO::MeshType::NodeType NodeType
Definition: hdf5_application_define.h:41
IO::MeshType::NodesContainerType NodesContainerType
Definition: hdf5_application_define.h:49
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21