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_flag_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_FLAG_VALUE_IO_H_INCLUDED)
14 #define KRATOS_HDF5_NODAL_FLAG_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 NodalFlagValueIO : public ContainerComponentIO<NodesContainerType, NodeType, Flags>
45 {
46 public:
49 
51 
54 
58 
60  NodalFlagValueIO(Parameters Settings, File::Pointer pFile)
61  : BaseType(Settings, pFile, "/NodalFlagValues")
62  {
63  }
64 
68 
69  void WriteNodalFlags(NodesContainerType const& rNodes)
70  {
71  this->WriteContainerComponents(rNodes);
72  }
73 
75  {
76  this->ReadContainerComponents(rNodes, rComm);
77  rComm.SynchronizeNodalFlags();
78  }
79 
81 
82 private:
85 
89 
91 
92 }; // class NodalFlagValueIO.
93 
96 } // namespace HDF5.
97 } // namespace Kratos.
98 
99 #endif // KRATOS_HDF5_NODAL_FLAG_VALUE_IO_H_INCLUDED defined
The Commmunicator class manages communication for distributed ModelPart instances.
Definition: communicator.h:67
virtual bool SynchronizeNodalFlags()
Definition: communicator.cpp:633
A class for IO of element data in HDF5.
Definition: hdf5_container_component_io.h:45
void WriteContainerComponents(NodesContainerType const &rContainerItems)
Definition: hdf5_container_component_io.cpp:597
void ReadContainerComponents(NodesContainerType &rContainerItems, Communicator &rCommunicator)
Definition: hdf5_container_component_io.cpp:621
A class for IO of non-historical nodal values in HDF5.
Definition: hdf5_nodal_flag_value_io.h:45
NodalFlagValueIO(Parameters Settings, File::Pointer pFile)
Constructor.
Definition: hdf5_nodal_flag_value_io.h:60
KRATOS_CLASS_POINTER_DEFINITION(NodalFlagValueIO)
Pointer definition.
void ReadNodalFlags(NodesContainerType &rNodes, Communicator &rComm)
Definition: hdf5_nodal_flag_value_io.h:74
void WriteNodalFlags(NodesContainerType const &rNodes)
Definition: hdf5_nodal_flag_value_io.h:69
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21