9#include "HDF5Interface.h"
10#include <dolfinx/common/MPI.h>
11#include <dolfinx/mesh/cell_types.h>
24class CoordinateElement;
70 XDMFFile(MPI_Comm
comm,
const std::filesystem::path& filename,
93 std::string xpath =
"/Xdmf/Domain");
105 std::string xpath =
"/Xdmf/Domain")
const;
111 std::pair<std::vector<std::int64_t>, std::array<std::size_t, 2>>
113 std::string xpath =
"/Xdmf/Domain")
const;
119 std::pair<std::vector<double>, std::array<std::size_t, 2>>
121 std::string xpath =
"/Xdmf/Domain")
const;
126 std::pair<mesh::CellType, int>
127 read_cell_type(std::string grid_name, std::string xpath =
"/Xdmf/Domain");
135 std::string mesh_xpath
136 =
"/Xdmf/Domain/Grid[@GridType='Uniform'][1]");
144 std::string mesh_xpath
145 =
"/Xdmf/Domain/Grid[@GridType='Uniform'][1]");
153 std::string geometry_xpath,
154 std::string xpath =
"/Xdmf/Domain");
161 read_meshtags(std::shared_ptr<const mesh::Mesh> mesh, std::string name,
162 std::string xpath =
"/Xdmf/Domain");
169 std::string xpath =
"/Xdmf/Domain/");
175 std::string xpath =
"/Xdmf/Domain/");
179 MPI_Comm
comm()
const;
186 std::filesystem::path _filename;
189 std::string _file_mode;
196 std::unique_ptr<pugi::xml_document> _xml_doc;
A duplicate MPI communicator and manage lifetime of the communicator.
Definition: MPI.h:42
A CoordinateElement manages coordinate mappings for isoparametric cells.
Definition: CoordinateElement.h:32
This class represents a function in a finite element function space , given by.
Definition: Function.h:43
Read and write mesh::Mesh, fem::Function and other objects in XDMF.
Definition: XDMFFile.h:57
void write_information(std::string name, std::string value, std::string xpath="/Xdmf/Domain/")
Write Information.
Definition: XDMFFile.cpp:390
~XDMFFile()
Destructor.
Definition: XDMFFile.cpp:182
static const Encoding default_encoding
Default encoding type.
Definition: XDMFFile.h:67
void write_mesh(const mesh::Mesh &mesh, std::string xpath="/Xdmf/Domain")
Save Mesh.
Definition: XDMFFile.cpp:191
void close()
Close the file.
Definition: XDMFFile.cpp:184
void write_function(const fem::Function< double > &u, double t, std::string mesh_xpath="/Xdmf/Domain/Grid[@GridType='Uniform'][1]")
Write Function.
Definition: XDMFFile.cpp:281
std::pair< std::vector< double >, std::array< std::size_t, 2 > > read_geometry_data(std::string name, std::string xpath="/Xdmf/Domain") const
Read Geometry data for Mesh.
Definition: XDMFFile.cpp:266
void write_meshtags(const mesh::MeshTags< std::int32_t > &meshtags, std::string geometry_xpath, std::string xpath="/Xdmf/Domain")
Write MeshTags.
Definition: XDMFFile.cpp:293
std::pair< std::vector< std::int64_t >, std::array< std::size_t, 2 > > read_topology_data(std::string name, std::string xpath="/Xdmf/Domain") const
Read Topology data for Mesh.
Definition: XDMFFile.cpp:250
std::pair< mesh::CellType, int > read_cell_type(std::string grid_name, std::string xpath="/Xdmf/Domain")
Read information about cell type.
Definition: XDMFFile.cpp:365
mesh::Mesh read_mesh(const fem::CoordinateElement &element, mesh::GhostMode mode, std::string name, std::string xpath="/Xdmf/Domain") const
Read in Mesh.
Definition: XDMFFile.cpp:227
void write_geometry(const mesh::Geometry &geometry, std::string name, std::string xpath="/Xdmf/Domain")
Save Geometry.
Definition: XDMFFile.cpp:205
mesh::MeshTags< std::int32_t > read_meshtags(std::shared_ptr< const mesh::Mesh > mesh, std::string name, std::string xpath="/Xdmf/Domain")
Read MeshTags.
Definition: XDMFFile.cpp:318
std::string read_information(std::string name, std::string xpath="/Xdmf/Domain/")
Read Information.
Definition: XDMFFile.cpp:407
MPI_Comm comm() const
Get the MPI communicator.
Definition: XDMFFile.cpp:423
Encoding
File encoding type.
Definition: XDMFFile.h:61
Geometry stores the geometry imposed on a mesh.
Definition: Geometry.h:29
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:34
Finite element method functionality.
Definition: assemble_matrix_impl.h:25
Support for file IO.
Definition: ADIOS2Writers.h:39
Mesh data structures and algorithms on meshes.
Definition: DofMap.h:31
GhostMode
Enum for different partitioning ghost modes.
Definition: utils.h:29