OGS
XdmfData.h
Go to the documentation of this file.
1
13#pragma once
14
15#include <boost/shared_ptr.hpp>
16#include <optional>
17#include <string>
18#include <vector>
19
20#include "MeshLib/Location.h"
22
23class XdmfArrayType;
24
25namespace MeshLib::IO
26{
27using XdmfDimType = unsigned int;
28
29struct XdmfData final
30{
53 XdmfData(std::size_t size_partitioned_dim, std::size_t size_tuple,
54 MeshPropertyDataType mesh_property_data_type,
55 std::string const& name,
56 std::optional<MeshLib::MeshItemType> attribute_center,
57 unsigned int const index, unsigned int n_files);
58 // a hyperslab is defined by starts and strides see
59 // https://xdmf.org/index.php/XDMF_Model_and_Format#HyperSlab
60 std::vector<XdmfDimType> starts;
61 std::vector<XdmfDimType> strides;
62 std::vector<XdmfDimType> global_block_dims;
64 std::string name;
65 std::optional<MeshLib::MeshItemType> attribute_center;
66 unsigned int index;
67};
68
69} // namespace MeshLib::IO
Enum for all propertyVector data types.
MeshPropertyDataType
unsigned int XdmfDimType
Definition XdmfData.h:27
unsigned int index
Definition XdmfData.h:66
MeshPropertyDataType data_type
Definition XdmfData.h:63
std::optional< MeshLib::MeshItemType > attribute_center
Definition XdmfData.h:65
std::vector< XdmfDimType > strides
Definition XdmfData.h:61
std::vector< XdmfDimType > starts
Definition XdmfData.h:60
std::vector< XdmfDimType > global_block_dims
Definition XdmfData.h:62
std::string name
Definition XdmfData.h:64
XdmfData(std::size_t size_partitioned_dim, std::size_t size_tuple, MeshPropertyDataType mesh_property_data_type, std::string const &name, std::optional< MeshLib::MeshItemType > attribute_center, unsigned int const index, unsigned int n_files)
XdmfData contains meta data to be passed to the XdmfWriter - it does not contain the actual values!...
Definition XdmfData.cpp:21