22 template <
class VtkWriter>
28 using pos_type =
typename std::ostream::pos_type;
40 template <
class... Args,
41 disableCopyMove<
Self, Args...> = 0>
46 std::srand(std::time(
nullptr));
67 std::optional<std::string> tmpDir = {},
68 bool writeCollection =
true)
const;
80 virtual std::string
write (std::string
const& fn, std::optional<std::string> dir = {})
const override;
83 template <
class Function,
class... Args>
91 template <
class Function,
class... Args>
108 mutable std::vector<std::pair<double, std::string>>
timesteps_;
std::string uid(std::size_t len=8)
Definition: uid.hh:12
Definition: filewriter.hh:11
Definition: filesystem.hh:15
File-Writer for Vtk timeseries .vtu files.
Definition: vtktimeserieswriter.hh:25
std::string filenameMesh_
Definition: vtktimeserieswriter.hh:107
std::vector< std::uint64_t > blocks_
Definition: vtktimeserieswriter.hh:105
decltype(&W::writeTimeseriesParallelFile) HasWriteTimeseriesParallelFile
Definition: vtktimeserieswriter.hh:35
VtkTimeseriesWriter(Args &&... args)
Constructor, stores the gridView.
Definition: vtktimeserieswriter.hh:42
void writeTimestep(double time, std::string const &fn, std::optional< std::string > tmpDir={}, bool writeCollection=true) const
Write the attached data to the file.
Definition: vtktimeserieswriter.impl.hh:42
Vtk::Path tmpDir_
Definition: vtktimeserieswriter.hh:100
virtual std::string write(std::string const &fn, std::optional< std::string > dir={}) const override
Writes all timesteps to single timeseries file.
Definition: vtktimeserieswriter.impl.hh:78
typename std::ostream::pos_type pos_type
Definition: vtktimeserieswriter.hh:28
decltype(&W::writeTimeseriesSerialFile) HasWriteTimeseriesSerialFile
Definition: vtktimeserieswriter.hh:31
VtkWriter vtkWriter_
Definition: vtktimeserieswriter.hh:99
VtkTimeseriesWriter & addPointData(Function const &fct, Args &&... args)
Attach point data to the writer,.
Definition: vtktimeserieswriter.hh:84
VtkTimeseriesWriter Self
Definition: vtktimeserieswriter.hh:27
bool initialized_
Definition: vtktimeserieswriter.hh:102
std::vector< std::pair< double, std::string > > timesteps_
Definition: vtktimeserieswriter.hh:108
VtkTimeseriesWriter & addCellData(Function const &fct, Args &&... args)
Attach cell data to the writer,.
Definition: vtktimeserieswriter.hh:92
~VtkTimeseriesWriter()
Remove all written intermediate files and remove temporary directory.
Definition: vtktimeserieswriter.impl.hh:26
Default choice of VTK Writer for several grid types.
Definition: vtkwriter.hh:40
VtkWriterInterface & addPointData(Function &&fct, Args &&... args)
Attach point data to the writer.
Definition: vtkwriterinterface.hh:106
VtkWriterInterface & addCellData(Function &&fct, Args &&... args)
Attach cell data to the writer.
Definition: vtkwriterinterface.hh:124