Dune Core Modules (2.9.0)
Writer for the ouput of grid functions in the vtk format. More...
#include <dune/grid/io/file/vtk/vtksequencewriter.hh>
Public Member Functions | |
VTKSequenceWriter (std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name) | |
Constructor with a given VTKWriter or SubsamplingVTKWriter. More... | |
VTKSequenceWriter (std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name, const std::string &path, const std::string &extendpath) | |
Constructor with a given VTKWriter or SubsamplingVTKWriter. More... | |
VTKSequenceWriter (const GridView &gridView, const std::string &name, const std::string &path, const std::string &extendpath, VTK::DataMode dm=VTK::conforming) | |
Constructor creating its own VTKWriter object. More... | |
const std::shared_ptr< VTKWriter< GridView > > & | vtkWriter () const |
void | addCellData (const std::shared_ptr< const typename VTKWriter< GridView >::VTKFunction > &p) |
Adds a field of cell data to the VTK file. | |
template<class V > | |
void | addCellData (const V &v, const std::string &name, int ncomps=1) |
Adds a field of cell data to the VTK file. More... | |
void | addVertexData (const std::shared_ptr< const typename VTKWriter< GridView >::VTKFunction > &p) |
Adds a field of vertex data to the VTK file. | |
template<class V > | |
void | addVertexData (const V &v, const std::string &name, int ncomps=1) |
Adds a field of vertex data to the VTK file. More... | |
void | write (double time, VTK::OutputType type=VTK::ascii) |
Writes VTK data for the given time,. More... | |
void | clear () |
Clears all VTK data added to the VTK writer. | |
const std::vector< double > & | getTimeSteps () const |
Retrieve the current list of time steps. | |
void | setTimeSteps (const std::vector< double > ×teps) |
Set the current list of time steps. More... | |
Detailed Description
class Dune::VTKSequenceWriter< GridView >
Writer for the ouput of grid functions in the vtk format.
Writes arbitrary grid functions (living on cells or vertices of a grid) to a file suitable for easy visualization with The Visualization Toolkit (VTK).
Constructor & Destructor Documentation
◆ VTKSequenceWriter() [1/3]
|
inline |
Constructor with a given VTKWriter or SubsamplingVTKWriter.
At each time step, the VTKSequenceWriter writes the grid and data currently attached to the vtkWriter object. All calls to the addCellData and addVertexData methods of the VTKSequenceWriter class are forwarded to the vtkWriter, but we propose that you call the corresponding methods on the vtkWriter directly.
- Parameters
-
name Base name of the output files. This should not contain any directory part and not filename extensions. It will be used both for each processes piece as well as the parallel collection file.
◆ VTKSequenceWriter() [2/3]
|
inline |
Constructor with a given VTKWriter or SubsamplingVTKWriter.
At each time step, the VTKSequenceWriter writes the grid and data currently attached to the vtkWriter object. All calls to the addCellData and addVertexData methods of the VTKSequenceWriter class are forwarded to the vtkWriter, but we propose that you call the corresponding methods on the vtkWriter directly.
- Parameters
-
name Base name of the output files. This should not contain any directory part and not filename extensions. It will be used both for each processes piece as well as the parallel collection file. path Directory where to put the parallel collection (.pvtu/.pvtp) files. If it is relative, it is taken relative to the current directory. extendpath Directory where to put the piece files (.vtu/.vtp) of this process. If it is relative, it is taken relative to the directory denoted by path.
◆ VTKSequenceWriter() [3/3]
|
inlineexplicit |
Constructor creating its own VTKWriter object.
At each time step, the VTKSequenceWriter writes the grid and data currently attached to the vtkWriter object. All calls to the addCellData and addVertexData methods of the VTKSequenceWriter class are forwarded to the vtkWriter.
Member Function Documentation
◆ addCellData()
|
inlineinherited |
Adds a field of cell data to the VTK file.
- Parameters
-
v The container with the values of the grid function for each cell name A name to identify the grid function ncomps Number of components (default is 1)
◆ addVertexData()
|
inlineinherited |
Adds a field of vertex data to the VTK file.
- Parameters
-
v The container with the values of the grid function for each vertex name A name to identify the grid function ncomps Number of components (default is 1)
◆ setTimeSteps()
|
inlineinherited |
Set the current list of time steps.
- Note
- This makes it possible to serialize the sequence writers state. Can be used to continue writing a VTK sequence after a restart of the program.
◆ vtkWriter()
|
inlineinherited |
accessor for the underlying VTKWriter instance
◆ write()
|
inlineinherited |
Writes VTK data for the given time,.
- Parameters
-
time The time(step) for the data to be written. type VTK output type.
The documentation for this class was generated from the following file:
- dune/grid/io/file/vtk/vtksequencewriter.hh