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

[MeL/IO/XDMF] Init tuple_size with correct value

parent a7ad7adb
No related branches found
No related tags found
No related merge requests found
......@@ -395,11 +395,16 @@ XdmfHdfData transformTopology(std::vector<std::size_t> const& values,
unsigned int const chunk_size_bytes)
{
std::string const name = "topology";
HdfData const hdf = {
values.data(), values.size(), 1, name, MeshPropertyDataType::uint64,
n_files, chunk_size_bytes};
XdmfData const xdmf{values.size(),
1,
auto const tuple_size = ParentDataType2String(parent_data_type).second;
HdfData const hdf = {values.data(),
values.size() / tuple_size,
tuple_size,
name,
MeshPropertyDataType::uint64,
n_files,
chunk_size_bytes};
XdmfData const xdmf{values.size() / tuple_size,
tuple_size,
MeshPropertyDataType::uint64,
name,
std::nullopt,
......
......@@ -204,12 +204,14 @@ std::function<std::string(std::vector<double>)> write_xdmf(
{
return fmt::format(
fmt::runtime("\n\t<Topology Type=\"{topology_type}\" "
"NodesPerElement=\"{nodes_per_element}\">{dataitem}"
"NodesPerElement=\"{nodes_per_element}\" "
"NumberOfElements=\"{number_of_elements}\">{dataitem}"
"\n\t</Topology>"),
"topology_type"_a =
ParentDataType2String(*topology.parent_data_type),
"dataitem"_a = dataitem_transform(topology),
"nodes_per_element"_a = nodes_per_element);
"nodes_per_element"_a = nodes_per_element,
"number_of_elements"_a = topology.size_partitioned_dim);
};
// Define content of <Topology> in XDMF, same as attribute_transform
......
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