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{
54 XdmfData(std::size_t size_partitioned_dim, std::size_t size_tuple,
55 MeshPropertyDataType mesh_property_data_type,
56 std::string const& name,
57 std::optional<MeshLib::MeshItemType> attribute_center,
58 unsigned int const index, unsigned int n_files,
59 std::optional<ParentDataType> parent_data_type);
60 // a hyperslab is defined by starts and strides see
61 // https://xdmf.org/index.php/XDMF_Model_and_Format#HyperSlab
62 std::vector<XdmfDimType> starts;
63 std::vector<XdmfDimType> strides;
64 std::vector<XdmfDimType> global_block_dims;
66 std::string name;
67 std::optional<MeshLib::MeshItemType> attribute_center;
68 unsigned int index;
69 std::optional<ParentDataType> parent_data_type;
70};
71
72} // namespace MeshLib::IO
Enum for all propertyVector data types and XDMF ParentDataTypes.
MeshPropertyDataType
unsigned int index
Definition XdmfData.h:68
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, std::optional< ParentDataType > parent_data_type)
XdmfData contains meta data to be passed to the XdmfWriter - it does not contain the actual values!...
Definition XdmfData.cpp:21
MeshPropertyDataType data_type
Definition XdmfData.h:65
std::optional< MeshLib::MeshItemType > attribute_center
Definition XdmfData.h:67
std::vector< XdmfDimType > strides
Definition XdmfData.h:63
std::vector< XdmfDimType > starts
Definition XdmfData.h:62
std::vector< XdmfDimType > global_block_dims
Definition XdmfData.h:64
std::string name
Definition XdmfData.h:66
std::optional< ParentDataType > parent_data_type
Definition XdmfData.h:69
unsigned int XdmfDimType
Definition writeXdmf.h:23