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_xdmf_connectivities_writer_process.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: Michael Andre, https://github.com/msandre
11 //
12 
13 #if !defined(KRATOS_HDF5_XDMF_CONNECTIVITIES_WRITER_PROCESS_H_INCLUDED)
14 #define KRATOS_HDF5_XDMF_CONNECTIVITIES_WRITER_PROCESS_H_INCLUDED
15 
16 // System includes
17 #include <string>
18 #include <unordered_map>
19 
20 // External includes
21 
22 // Project includes
23 #include "includes/define.h"
24 #include "processes/process.h"
25 
26 // Application includes
28 #include "custom_io/hdf5_file.h"
29 
30 namespace Kratos
31 {
32 namespace HDF5
33 {
38 
40 
47 class KRATOS_API(HDF5_APPLICATION) XdmfConnectivitiesWriterProcess : public Process
48 {
49 public:
54  typedef std::unordered_map<int, int> IdMapType;
58  XdmfConnectivitiesWriterProcess(const std::string& rFileName, const std::string& rPrefix);
59 
63 
64  void Execute() override;
65 
67 private:
70 
71  DataCommunicator mSerialDataCommunicator;
72  File::Pointer mpFile;
73  std::string mPrefix;
74  IdMapType mKratosToXdmfIdMap;
75 
79 
80  void CreateXdmfPoints(const std::string& rKratosNodeIdsPath, const std::string& rXdmfNodeIdsPath) const;
81 
82  void CreateXdmfConnectivities(const std::string& rKratosConnectivitiesPath, const std::string& rXdmfConnectivitiesPath) const;
83 
84  void CreateXdmfConnectivitiesForSubModelParts(const std::string& rPath, const std::string& rDestinationPrefix) const;
85 
87 
88 }; // class XdmfConnectivitiesWriterProcess
89 
92 } // namespace HDF5.
93 } // namespace Kratos.
94 
95 #endif // KRATOS_HDF5_XDMF_CONNECTIVITIES_WRITER_PROCESS_H_INCLUDED defined
Serial (do-nothing) version of a wrapper class for MPI communication.
Definition: data_communicator.h:318
Writes Xdmf connectivities.
Definition: hdf5_xdmf_connectivities_writer_process.h:48
std::unordered_map< int, int > IdMapType
Definition: hdf5_xdmf_connectivities_writer_process.h:54
KRATOS_CLASS_POINTER_DEFINITION(XdmfConnectivitiesWriterProcess)
The base class for all processes in Kratos.
Definition: process.h:49
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21