Skip to content
Snippets Groups Projects
Commit e7cde02a authored by Tobias Meisel's avatar Tobias Meisel
Browse files

XdmfDiff Fix bug when data is in separate hdf5 file

extra read call is needed only for hdf5 file
parent 46c8d651
No related branches found
No related tags found
No related merge requests found
...@@ -170,16 +170,19 @@ std::unique_ptr<Grid> readMesh(std::string const& filename, ...@@ -170,16 +170,19 @@ std::unique_ptr<Grid> readMesh(std::string const& filename,
auto const gridcollection = domain->getGridCollection("Collection"); auto const gridcollection = domain->getGridCollection("Collection");
auto const ungrid = gridcollection->getUnstructuredGrid(timestep); auto const ungrid = gridcollection->getUnstructuredGrid(timestep);
auto const geometry = ungrid->getGeometry(); auto const geometry = ungrid->getGeometry();
geometry->read();
int const size_points = geometry->getSize(); int const size_points = geometry->getSize();
std::vector<double> points(size_points); std::vector<double> points(size_points);
geometry->getValues(0, points.data(), size_points); geometry->getValues(0, points.data(), size_points);
auto const topology = ungrid->getTopology(); auto const topology = ungrid->getTopology();
topology->read();
int const size_topology = topology->getSize(); int const size_topology = topology->getSize();
std::vector<int> topology_values(size_topology); std::vector<int> topology_values(size_topology);
topology->getValues(0, topology_values.data(), size_topology); topology->getValues(0, topology_values.data(), size_topology);
auto const attribute = ungrid->getAttribute(attribute_name); auto const attribute = ungrid->getAttribute(attribute_name);
attribute->read();
int const attribute_size = attribute->getSize(); int const attribute_size = attribute->getSize();
std::vector<double> attribute_values(attribute_size); std::vector<double> attribute_values(attribute_size);
attribute->getValues(0, attribute_values.data(), attribute_size); attribute->getValues(0, attribute_values.data(), attribute_size);
......
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