XDMF meets HighFive: Write XDMF files to interpret HDF5 files.
To get started consider the examples:
Interpret a DataSet as a Geometry (a.k.a. nodal-coordinates or vertices).
Interpret a DataSet as a Topology (a.k.a. connectivity).
Interpret a DataSet as an Attribute.
Interpret a DataSets as Unstructured. The call
Structured(file, "/path/to/geometry", "/path/to/topology", type);
Is simply short for
concatenate({
Geometry(file, "/path/to/geometry"), // nodal-coordinates / vertices
Topology(file, "/path/to/topology", type) // connectivity
});
Interpret a DataSets as Structured (individual points).
Use is made of a mock Topology arange(N)
, with N
the number of nodes (vertices).
The call
Structured(file, "/path/to/geometry", "/path/to/topology");
Is simply short for
concatenate({
Geometry(file, "/path/to/geometry"), // nodal-coordinates / vertices
Topology(file, "/path/to/topology", ElementType::Polyvertex) // mock connectivity
});
Combine fields (e.g. Geometry, Topology, and Attribute) to a single grid.
Combine a series of fields (e.g. Geometry, Topology, and Attribute) to a time-series. The syntax is as follows:
TimeSeries series;
series.push_back(...);
series.push_back(...);
To then write a file simply pass series
to write
.
To alternatively get the sequence of strings of TimeSeries use series.get()
.
Write a complete XDMF-file, e.g. from Grid or TimeSeries.
Join a sequence of strings:
std::vector<std::string> lines = {"foo", "bar"};
std::string single = join(lines);
std::cout << single << std::endl;
Concatenate an arbitrary number of vectors:
concatenate({...});
The indentation can be changed by specifying
#define XDMFWRITE_HIGHFIVE_INDENT 4
before
#include <XDMFWrite_HighFive.hpp>