dune-vtk 2.12
Loading...
Searching...
No Matches
Dune::VtkTimeseriesWriter< VtkWriter > Class Template Reference

#include <dune/vtk/vtktimeserieswriter.hh>

Inheritance diagram for Dune::VtkTimeseriesWriter< VtkWriter >:
Inheritance graph

Public Member Functions

void writeTimestep (double time, std::string const &fn, std::optional< std::string > tmpDir={}, bool writeCollection=true) const
 Write the attached data to the file.
 
virtual std::string write (std::string const &fn, std::optional< std::string > dir={}) const override
 Writes all timesteps to single timeseries file.
 
template<class Function , class... Args>
TimeseriesWriter & addPointData (Function const &fct, Args &&... args)
 Attach point data to the writer,.
 
template<class Function , class... Args>
TimeseriesWriter & addCellData (Function const &fct, Args &&... args)
 Attach cell data to the writer,.
 

Protected Types

using Self = TimeseriesWriter
 
using pos_type = typename std::ostream::pos_type
 
template<class W >
using HasWriteTimeseriesSerialFile = decltype(&W::writeTimeseriesSerialFile)
 
template<class W >
using HasWriteTimeseriesParallelFile = decltype(&W::writeTimeseriesParallelFile)
 

Protected Attributes

VtkWriter vtkWriter_
 
Vtk::Path tmpDir_
 
bool initialized_ = false
 
std::vector< std::uint64_t > blocks_
 
std::string filenameMesh_
 
std::vector< std::pair< double, std::string > > timesteps_
 

Member Typedef Documentation

◆ HasWriteTimeseriesParallelFile

template<class VtkWriter >
template<class W >
using Dune::Vtk::TimeseriesWriter< VtkWriter >::HasWriteTimeseriesParallelFile = decltype(&W::writeTimeseriesParallelFile)
protectedinherited

◆ HasWriteTimeseriesSerialFile

template<class VtkWriter >
template<class W >
using Dune::Vtk::TimeseriesWriter< VtkWriter >::HasWriteTimeseriesSerialFile = decltype(&W::writeTimeseriesSerialFile)
protectedinherited

◆ pos_type

template<class VtkWriter >
using Dune::Vtk::TimeseriesWriter< VtkWriter >::pos_type = typename std::ostream::pos_type
protectedinherited

◆ Self

template<class VtkWriter >
using Dune::Vtk::TimeseriesWriter< VtkWriter >::Self = TimeseriesWriter
protectedinherited

Member Function Documentation

◆ addCellData()

template<class VtkWriter >
template<class Function , class... Args>
TimeseriesWriter & Dune::Vtk::TimeseriesWriter< VtkWriter >::addCellData ( Function const &  fct,
Args &&...  args 
)
inlineinherited

Attach cell data to the writer,.

See also
Vtk::GridFunction for possible arguments

◆ addPointData()

template<class VtkWriter >
template<class Function , class... Args>
TimeseriesWriter & Dune::Vtk::TimeseriesWriter< VtkWriter >::addPointData ( Function const &  fct,
Args &&...  args 
)
inlineinherited

Attach point data to the writer,.

See also
Vtk::GridFunction for possible arguments

◆ write()

template<class W >
std::string Dune::Vtk::TimeseriesWriter< W >::write ( std::string const &  fn,
std::optional< std::string >  dir = {} 
) const
overridevirtualinherited

Writes all timesteps to single timeseries file.

Create a timeseries file with all timesteps written by writeTimestep.

Parameters
fnFilename of the Timeseries file. May contain a directory and any file extension.
dirThe optional parameter specifies the directory of the partition files.
Returns
File name of the actual written file

Implements Dune::Vtk::FileWriter.

◆ writeTimestep()

template<class W >
void Dune::Vtk::TimeseriesWriter< W >::writeTimestep ( double  time,
std::string const &  fn,
std::optional< std::string >  tmpDir = {},
bool  writeCollection = true 
) const
inherited

Write the attached data to the file.

Create intermediate files for the data associated to the current timestep time.

Parameters
timeThe time value of the written data
fnFilename of the file to write to. Only the base part (without dir and extentsion) is used to write the intermediate file into a tmp directory.
tmpDirIf the directory is given, it is used as tmp dir, otherwise /tmp.
writeCollectionCreate a timeseries file directly

Member Data Documentation

◆ blocks_

template<class VtkWriter >
std::vector<std::uint64_t> Dune::Vtk::TimeseriesWriter< VtkWriter >::blocks_
mutableprotectedinherited

◆ filenameMesh_

template<class VtkWriter >
std::string Dune::Vtk::TimeseriesWriter< VtkWriter >::filenameMesh_
mutableprotectedinherited

◆ initialized_

template<class VtkWriter >
bool Dune::Vtk::TimeseriesWriter< VtkWriter >::initialized_ = false
mutableprotectedinherited

◆ timesteps_

template<class VtkWriter >
std::vector<std::pair<double, std::string> > Dune::Vtk::TimeseriesWriter< VtkWriter >::timesteps_
mutableprotectedinherited

◆ tmpDir_

template<class VtkWriter >
Vtk::Path Dune::Vtk::TimeseriesWriter< VtkWriter >::tmpDir_
protectedinherited

◆ vtkWriter_

template<class VtkWriter >
VtkWriter Dune::Vtk::TimeseriesWriter< VtkWriter >::vtkWriter_
protectedinherited

The documentation for this class was generated from the following file: