diff --git a/MeshLib/IO/XDMF/XdmfHdfWriter.cpp b/MeshLib/IO/XDMF/XdmfHdfWriter.cpp index ad2ffc65650d16a03010fd0f1c01c1d04149f21c..2a88a96364f2e88751ca9a3b7d6dffa9cd2e6d07 100644 --- a/MeshLib/IO/XDMF/XdmfHdfWriter.cpp +++ b/MeshLib/IO/XDMF/XdmfHdfWriter.cpp @@ -108,9 +108,9 @@ XdmfHdfWriter::XdmfHdfWriter( auto const geometry = transformGeometry( mesh, xdmf_conforming_data->flattened_geometry_values.data(), n_files, chunk_size_bytes); - auto const topology = - transformTopology(xdmf_conforming_data->flattened_topology_values, - n_files, chunk_size_bytes); + auto const topology = transformTopology( + xdmf_conforming_data->flattened_topology_values, + xdmf_conforming_data->parent_data_type, n_files, chunk_size_bytes); auto const attributes = transformAttributes(mesh, n_files, chunk_size_bytes); return XdmfHdfMesh{std::move(geometry), std::move(topology), diff --git a/MeshLib/IO/XDMF/transformData.cpp b/MeshLib/IO/XDMF/transformData.cpp index 093eb53f8a3b576fcc17ac72c526f3ac4bd4e7dc..60c43f0a16f371d3311b8875b3a822ee2f116bd8 100644 --- a/MeshLib/IO/XDMF/transformData.cpp +++ b/MeshLib/IO/XDMF/transformData.cpp @@ -353,6 +353,7 @@ std::pair<std::vector<int>, ParentDataType> transformToXDMFTopology( } XdmfHdfData transformTopology(std::vector<int> const& values, + ParentDataType const parent_data_type, unsigned int const n_files, unsigned int const chunk_size_bytes) { @@ -367,7 +368,7 @@ XdmfHdfData transformTopology(std::vector<int> const& values, std::nullopt, 3, n_files, - std::nullopt}; + parent_data_type}; return XdmfHdfData{std::move(hdf), std::move(xdmf)}; } diff --git a/MeshLib/IO/XDMF/transformData.h b/MeshLib/IO/XDMF/transformData.h index 28460d90e698c2ef5f220cb6e51e073604545417..839f84e66fec4b21a56966c413b53ea026a8d7b4 100644 --- a/MeshLib/IO/XDMF/transformData.h +++ b/MeshLib/IO/XDMF/transformData.h @@ -51,13 +51,15 @@ XdmfHdfData transformGeometry(MeshLib::Mesh const& mesh, double const* data_ptr, /** * \brief Create meta data for topology used for HDF5 and XDMF * \param values actual topology values to get size and memory location - * \param n_files specifies the number of files. If greater than 1 it groups the - * data of each process to n_files - * \param chunk_size_bytes Data will be split into chunks. The parameter - * specifies the size (in bytes) of the largest chunk. - * \return Topology meta data + * \param parent_data_type XDMF topological element data types as listed in the + * enum ParentDataTypei + * \param n_files specifies the number of files. If greater + * than 1 it groups the data of each process to n_files \param chunk_size_bytes + * Data will be split into chunks. The parameter specifies the size (in bytes) + * of the largest chunk. \return Topology meta data */ XdmfHdfData transformTopology(std::vector<int> const& values, + ParentDataType const parent_data_type, unsigned int n_files, unsigned int chunk_size_bytes); /**