Skip to content
Snippets Groups Projects
Commit 00e0b543 authored by Tom Fischer's avatar Tom Fischer
Browse files

[MeL/IO/XDMF] Pass parent_data_type (from TransformedMeshData) to transformTopology()

parent 33ebd88a
No related branches found
No related tags found
No related merge requests found
......@@ -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),
......
......@@ -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)};
}
......
......@@ -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);
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment