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:
42 std::vector<std::reference_wrapper<const MeshLib::Mesh>> const& meshes,
43 std::filesystem::path const& filepath, unsigned long long time_step,
44 double initial_time, std::set<std::string> const& variable_output_names,
45 bool use_compression, unsigned int n_files,
46 unsigned int chunk_size_bytes);
47
52 void writeStep(double time);
53
54private:
55 // hdf_writer must be destructed before xdmf_writer
56 std::unique_ptr<HdfWriter> _hdf_writer;
57 std::vector<std::unique_ptr<XdmfWriter>> _xdmf_writer;
58};
59} // 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 > > const &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, unsigned int chunk_size_bytes)
Write xdmf and h5 file with geometry and topology data.
std::unique_ptr< HdfWriter > _hdf_writer
std::vector< std::unique_ptr< XdmfWriter > > _xdmf_writer
void writeStep(double time)
Adds data for either lazy (xdmf) or eager (hdf) writing algorithm.