OGS
XdmfData.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <optional>
7#include <string>
8#include <vector>
9
10#include "MeshLib/MeshEnums.h"
12
13class XdmfArrayType;
14
15namespace MeshLib::IO
16{
17using XdmfDimType = unsigned int;
18
19struct XdmfData final
20{
41 XdmfData(std::size_t size_partitioned_dim, std::size_t size_tuple,
42 MeshPropertyDataType mesh_property_data_type,
43 std::string const& name,
44 std::optional<MeshLib::MeshItemType> attribute_center,
45 unsigned int n_files,
46 std::optional<ParentDataType> parent_data_type);
47 // a hyperslab is defined by starts and strides see
48 // https://xdmf.org/index.php/XDMF_Model_and_Format#HyperSlab
49 std::vector<XdmfDimType> starts;
50 std::vector<XdmfDimType> strides;
51 std::vector<XdmfDimType> global_block_dims;
54 std::string name;
55 std::optional<MeshLib::MeshItemType> attribute_center;
56 std::optional<ParentDataType> parent_data_type;
57};
58
59} // namespace MeshLib::IO
MeshPropertyDataType
unsigned int XdmfDimType
Definition XdmfData.h:17
MeshPropertyDataType data_type
Definition XdmfData.h:52
std::optional< MeshLib::MeshItemType > attribute_center
Definition XdmfData.h:55
std::vector< XdmfDimType > strides
Definition XdmfData.h:50
std::vector< XdmfDimType > starts
Definition XdmfData.h:49
std::vector< XdmfDimType > global_block_dims
Definition XdmfData.h:51
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 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:14
std::size_t size_partitioned_dim
Definition XdmfData.h:53
std::string name
Definition XdmfData.h:54
std::optional< ParentDataType > parent_data_type
Definition XdmfData.h:56