OGS
XdmfHdfWriter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <set>
7
8#include "HdfWriter.h"
9#include "MeshLib/Mesh.h"
10#include "XdmfWriter.h"
11
12namespace MeshLib::IO
13{
14class XdmfHdfWriter final
15{
16public:
32 std::vector<std::reference_wrapper<const MeshLib::Mesh>> const& meshes,
33 std::filesystem::path const& filepath, unsigned long long time_step,
34 double initial_time, std::set<std::string> const& variable_output_names,
35 bool use_compression, unsigned int n_files,
36 unsigned int chunk_size_bytes);
37
42 void writeStep(double time);
43
44private:
45 // hdf_writer must be destructed before xdmf_writer
46 std::unique_ptr<HdfWriter> _hdf_writer;
47 std::vector<std::unique_ptr<XdmfWriter>> _xdmf_writer;
48};
49} // namespace MeshLib::IO
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.