8#ifndef GRIDFORMAT_VTK_XML_TIME_SERIES_WRITER_HPP_
9#define GRIDFORMAT_VTK_XML_TIME_SERIES_WRITER_HPP_
24template<
typename VTKWriter>
30 :
ParentType(writer.grid(), writer.writer_options())
31 , _vtk_writer{std::move(writer)}
32 , _base_filename{std::move(base_filename)}
36 std::string _write(
double _time)
override {
37 this->copy_fields(_vtk_writer);
38 _vtk_writer.set_meta_data(
"TimeValue", _time);
39 const auto filename = _vtk_writer.write(_get_filename(this->_step_count));
44 std::string _get_filename(
const std::integral
auto index)
const {
45 return _base_filename +
"-" + _get_file_number_string(index);
48 std::string _get_file_number_string(
const std::integral
auto index)
const {
49 std::ostringstream file_number;
50 file_number << std::setw(5) << std::setfill(
'0') << index;
51 return file_number.str();
54 VTKWriter _vtk_writer;
55 std::string _base_filename;
56 std::string _pvd_filename;
59template<
typename VTKWriter>