dune-vtk 2.12
Loading...
Searching...
No Matches
Dune::Vtk::PvdWriter< W > Class Template Reference

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

#include <dune/vtk/pvdwriter.hh>

Inheritance diagram for Dune::Vtk::PvdWriter< W >:
Inheritance graph

Public Types

using Writer = W
 Type of the Vtk writer to call on each timestep.
 

Public Member Functions

 PvdWriter (std::shared_ptr< Writer > vtkWriter)
 Constructor. Stores the shared_ptr to the vtk writer.
 
 PvdWriter (Writer &vtkWriter)
 Constructor. Stores the references to the passed vtk writer in a non-destroying shared_ptr.
 
template<class... Args, disableCopyMove< Self, Args... > = 0>
 PvdWriter (Args &&... args)
 Constructor, creates a VtkWriter with constructor arguments forwarded.
 
void writeTimestep (double time, std::string const &fn, std::optional< std::string > dir={}, bool writeCollection=true) const
 Write the attached data to the file.
 
std::string write (std::string const &fn, std::optional< std::string > dir={}) const override
 Writes collection of timesteps to .pvd file.
 
template<class Function , class... Args>
PvdWriter & addPointData (Function const &fct, Args &&... args)
 Attach point data to the writer,.
 
template<class Function , class... Args>
PvdWriter & addCellData (Function const &fct, Args &&... args)
 Attach cell data to the writer,.
 

Protected Member Functions

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

Detailed Description

template<class W>
class Dune::Vtk::PvdWriter< W >

File-Writer for ParaView .pvd files.

Member Typedef Documentation

◆ Writer

template<class W >
using Dune::Vtk::PvdWriter< W >::Writer = W

Type of the Vtk writer to call on each timestep.

Constructor & Destructor Documentation

◆ PvdWriter() [1/3]

template<class W >
Dune::Vtk::PvdWriter< W >::PvdWriter ( std::shared_ptr< Writer >  vtkWriter)
inlineexplicit

Constructor. Stores the shared_ptr to the vtk writer.

◆ PvdWriter() [2/3]

template<class W >
Dune::Vtk::PvdWriter< W >::PvdWriter ( Writer &  vtkWriter)
inlineexplicit

Constructor. Stores the references to the passed vtk writer in a non-destroying shared_ptr.

◆ PvdWriter() [3/3]

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

Constructor, creates a VtkWriter with constructor arguments forwarded.

Member Function Documentation

◆ addCellData()

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

Attach cell data to the writer,.

See also
Vtk::GridFunction for possible arguments

◆ addPointData()

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

Attach point data to the writer,.

See also
Vtk::GridFunction for possible arguments

◆ write()

template<class W >
std::string Dune::Vtk::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::Vtk::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::Vtk::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

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