OGS
XdmfHdfWriter.h
Go to the documentation of this file.
1
14#pragma once
15
16#include <set>
17
18#include "HdfWriter.h"
19#include "MeshLib/Mesh.h"
20#include "XdmfWriter.h"
21
22namespace MeshLib::IO
23{
24class XdmfHdfWriter final
25{
26public:
40 std::vector<std::reference_wrapper<const MeshLib::Mesh>> meshes,
41 std::filesystem::path const& filepath, unsigned long long time_step,
42 double initial_time, std::set<std::string> const& variable_output_names,
43 bool use_compression, unsigned int n_files);
44
49 void writeStep(double time);
50
51private:
52 // hdf_writer must be destructed before xdmf_writer
53 std::unique_ptr<HdfWriter> _hdf_writer;
54 std::vector<std::unique_ptr<XdmfWriter>> _xdmf_writer;
55};
56} // namespace MeshLib::IO
Writes vectorized data to HDF File.
Definition of the Mesh class.
Collects and holds all metadata for writing XDMF file.
XdmfHdfWriter(std::vector< std::reference_wrapper< const MeshLib::Mesh > > meshes, std::filesystem::path const &filepath, unsigned long long time_step, double initial_time, std::set< std::string > const &variable_output_names, bool use_compression, unsigned int n_files)
Write xdmf and h5 file with geometry and topology data.
std::unique_ptr< HdfWriter > _hdf_writer
Definition: XdmfHdfWriter.h:53
std::vector< std::unique_ptr< XdmfWriter > > _xdmf_writer
Definition: XdmfHdfWriter.h:54
void writeStep(double time)
Adds data for either lazy (xdmf) or eager (hdf) writing algorithm.