3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Public Member Functions | Protected Member Functions | List of all members
Dumux::VtkOutputModuleBase< GridGeometry > Class Template Reference

A VTK output module to simplify writing dumux simulation data to VTK format. More...

#include <dumux/io/vtkoutputmodule.hh>

Inheritance diagram for Dumux::VtkOutputModuleBase< GridGeometry >:

Description

template<class GridGeometry>
class Dumux::VtkOutputModuleBase< GridGeometry >

A VTK output module to simplify writing dumux simulation data to VTK format.

Note
This is a base class providing only rudimentary features

Classes

struct  FieldType
 export field type More...
 

Public Member Functions

 VtkOutputModuleBase (const GridGeometry &gridGeometry, const std::string &name, const std::string &paramGroup="", Dune::VTK::DataMode dm=Dune::VTK::conforming, bool verbose=true)
 
virtual ~VtkOutputModuleBase ()=default
 
const std::string & paramGroup () const
 the parameter group for getting parameter from the parameter tree More...
 
template<typename Vector >
void addField (const Vector &v, const std::string &name, Vtk::FieldType fieldType=Vtk::FieldType::automatic)
 Add a scalar or vector valued vtk field. More...
 
template<typename Vector >
void addField (const Vector &v, const std::string &name, Dumux::Vtk::Precision precision, Vtk::FieldType fieldType=Vtk::FieldType::automatic)
 Add a scalar or vector valued vtk field. More...
 
void write (double time, Dune::VTK::OutputType type=Dune::VTK::ascii)
 

Protected Member Functions

const GridGeometry & gridGeometry () const
 
bool verbose () const
 
const std::string & name () const
 
Dune::VTK::DataMode dataMode () const
 
Dumux::Vtk::Precision precision () const
 
Dune::VTKWriter< GridView > & writer ()
 
Dune::VTKSequenceWriter< GridView > & sequenceWriter ()
 
const std::vector< Field > & fields () const
 

Constructor & Destructor Documentation

◆ VtkOutputModuleBase()

template<class GridGeometry >
Dumux::VtkOutputModuleBase< GridGeometry >::VtkOutputModuleBase ( const GridGeometry &  gridGeometry,
const std::string &  name,
const std::string &  paramGroup = "",
Dune::VTK::DataMode  dm = Dune::VTK::conforming,
bool  verbose = true 
)
inline

◆ ~VtkOutputModuleBase()

template<class GridGeometry >
virtual Dumux::VtkOutputModuleBase< GridGeometry >::~VtkOutputModuleBase ( )
virtualdefault

Member Function Documentation

◆ addField() [1/2]

template<class GridGeometry >
template<typename Vector >
void Dumux::VtkOutputModuleBase< GridGeometry >::addField ( const Vector &  v,
const std::string &  name,
Dumux::Vtk::Precision  precision,
Vtk::FieldType  fieldType = Vtk::FieldType::automatic 
)
inline

Add a scalar or vector valued vtk field.

Parameters
vThe field to be added. Can be any indexable container. Its value type can be a number or itself an indexable container.
nameThe name of the field
fieldTypeThe type of the field. This determines whether the values are associated with vertices or elements. By default, the method automatically deduces the correct type for the given input.
precisionThe output precision of this field (see Dune::VTK::Precision)

◆ addField() [2/2]

template<class GridGeometry >
template<typename Vector >
void Dumux::VtkOutputModuleBase< GridGeometry >::addField ( const Vector &  v,
const std::string &  name,
Vtk::FieldType  fieldType = Vtk::FieldType::automatic 
)
inline

Add a scalar or vector valued vtk field.

Parameters
vThe field to be added. Can be any indexable container. Its value type can be a number or itself an indexable container.
nameThe name of the field
fieldTypeThe type of the field. This determines whether the values are associated with vertices or elements. By default, the method automatically deduces the correct type for the given input.

◆ dataMode()

template<class GridGeometry >
Dune::VTK::DataMode Dumux::VtkOutputModuleBase< GridGeometry >::dataMode ( ) const
inlineprotected

◆ fields()

template<class GridGeometry >
const std::vector< Field > & Dumux::VtkOutputModuleBase< GridGeometry >::fields ( ) const
inlineprotected

◆ gridGeometry()

template<class GridGeometry >
const GridGeometry & Dumux::VtkOutputModuleBase< GridGeometry >::gridGeometry ( ) const
inlineprotected

◆ name()

template<class GridGeometry >
const std::string & Dumux::VtkOutputModuleBase< GridGeometry >::name ( ) const
inlineprotected

◆ paramGroup()

template<class GridGeometry >
const std::string & Dumux::VtkOutputModuleBase< GridGeometry >::paramGroup ( ) const
inline

the parameter group for getting parameter from the parameter tree

◆ precision()

template<class GridGeometry >
Dumux::Vtk::Precision Dumux::VtkOutputModuleBase< GridGeometry >::precision ( ) const
inlineprotected

◆ sequenceWriter()

template<class GridGeometry >
Dune::VTKSequenceWriter< GridView > & Dumux::VtkOutputModuleBase< GridGeometry >::sequenceWriter ( )
inlineprotected

◆ verbose()

template<class GridGeometry >
bool Dumux::VtkOutputModuleBase< GridGeometry >::verbose ( ) const
inlineprotected

◆ write()

template<class GridGeometry >
void Dumux::VtkOutputModuleBase< GridGeometry >::write ( double  time,
Dune::VTK::OutputType  type = Dune::VTK::ascii 
)
inline

Write the data for this timestep to file in four steps (1) We assemble all registered variable fields (2) We register them with the vtk writer (3) The writer writes the output for us (4) Clear the writer for the next time step

output

◆ writer()

template<class GridGeometry >
Dune::VTKWriter< GridView > & Dumux::VtkOutputModuleBase< GridGeometry >::writer ( )
inlineprotected

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