OGS
XdmfWriter.h
Go to the documentation of this file.
1
13#pragma once
14
15#include <functional>
16#include <string>
17#include <vector>
18
19namespace MeshLib::IO
20{
21class XdmfWriter final
22{
23public:
29 XdmfWriter(std::string xdmf_filename,
30 std::function<std::string(std::vector<double>)>
31 xdmf_writer_fn);
32 XdmfWriter(XdmfWriter&&) = default;
34 XdmfWriter(XdmfWriter const&) = delete;
35 XdmfWriter& operator=(XdmfWriter const&) = delete;
37
42 void addTimeStep(double const& time_step);
43
44private:
45 std::string filename;
46 std::vector<double> times;
47 std::function<std::string(std::vector<double>)> xdmf_writer;
48};
49} // namespace MeshLib::IO
std::function< std::string(std::vector< double >)> xdmf_writer
Definition XdmfWriter.h:47
std::vector< double > times
Definition XdmfWriter.h:46
XdmfWriter(std::string xdmf_filename, std::function< std::string(std::vector< double >)> xdmf_writer_fn)
Writes xdmf string into file on class destruction.
XdmfWriter(XdmfWriter const &)=delete
XdmfWriter(XdmfWriter &&)=default
void addTimeStep(double const &time_step)
Adds data for lazy (xdmf) writing algorithm.
XdmfWriter & operator=(XdmfWriter &&)=default
XdmfWriter & operator=(XdmfWriter const &)=delete