dune-vtk 2.8
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dune::PvdWriter< VtkWriter > Class Template Reference

File-Writer for ParaView .pvd files. More...

#include <dune/vtk/pvdwriter.hh>

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

Public Member Functions

template<class... Args, disableCopyMove< Self, Args... > = 0>
 PvdWriter (Args &&... args)
 Constructor, creates a VtkWriter with constructor arguments forwarded. More...
 
void writeTimestep (double time, std::string const &fn, std::optional< std::string > dir={}, bool writeCollection=true) const
 Write the attached data to the file. More...
 
virtual std::string write (std::string const &fn, std::optional< std::string > dir={}) const override
 Writes collection of timesteps to .pvd file. More...
 
template<class Function , class... Args>
PvdWriteraddPointData (Function const &fct, Args &&... args)
 Attach point data to the writer,. More...
 
template<class Function , class... Args>
PvdWriteraddCellData (Function const &fct, Args &&... args)
 Attach cell data to the writer,. More...
 

Protected Member Functions

void writeFile (std::ofstream &out) const
 Write a series of vtk files in a .pvd ParaView Data file. More...
 

Protected Attributes

VtkWriter vtkWriter_
 
Vtk::FormatTypes format_
 
Vtk::DataTypes datatype_
 
std::vector< std::pair< double, std::string > > timesteps_
 

Detailed Description

template<class VtkWriter>
class Dune::PvdWriter< VtkWriter >

File-Writer for ParaView .pvd files.

Constructor & Destructor Documentation

◆ PvdWriter()

template<class VtkWriter >
template<class... Args, disableCopyMove< Self, Args... > = 0>
Dune::PvdWriter< VtkWriter >::PvdWriter ( Args &&...  args)
inlineexplicit

Constructor, creates a VtkWriter with constructor arguments forwarded.

Member Function Documentation

◆ addCellData()

template<class VtkWriter >
template<class Function , class... Args>
PvdWriter & Dune::PvdWriter< VtkWriter >::addCellData ( Function const &  fct,
Args &&...  args 
)
inline

Attach cell data to the writer,.

See also
Vtk::Function for possible arguments

◆ addPointData()

template<class VtkWriter >
template<class Function , class... Args>
PvdWriter & Dune::PvdWriter< VtkWriter >::addPointData ( Function const &  fct,
Args &&...  args 
)
inline

Attach point data to the writer,.

See also
Vtk::Function for possible arguments

◆ write()

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

Writes collection of timesteps to .pvd file.

Parameters
fnThe filename of the PVD file. May contain directory and any filename extension.
dir(Ignored) Timestep files are already written and their filenames are stored in timesteps_.

Implements Dune::Vtk::FileWriter.

◆ writeFile()

template<class W >
void Dune::PvdWriter< W >::writeFile ( std::ofstream &  out) const
protected

Write a series of vtk files in a .pvd ParaView Data file.

◆ writeTimestep()

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

Write the attached data to the file.

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

Parameters
timeThe time value of the written data
fnFilename of the PVD file to write to. The base part is used to create filenames for the timestep files that are stored in timesteps_. May contain directory and any filename extension.
dirSpecifies where to write the timestep files.
writeCollectionCreate a collection .pvd file directly

Member Data Documentation

◆ datatype_

template<class VtkWriter >
Vtk::DataTypes Dune::PvdWriter< VtkWriter >::datatype_
protected

◆ format_

template<class VtkWriter >
Vtk::FormatTypes Dune::PvdWriter< VtkWriter >::format_
protected

◆ timesteps_

template<class VtkWriter >
std::vector<std::pair<double, std::string> > Dune::PvdWriter< VtkWriter >::timesteps_
mutableprotected

◆ vtkWriter_

template<class VtkWriter >
VtkWriter Dune::PvdWriter< VtkWriter >::vtkWriter_
protected

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