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

A VTK output module to simplify writing dumux simulation data to VTK format Specialization for staggered grids with dofs on faces. More...

#include <dumux/io/staggeredvtkoutputmodule.hh>

Inheritance diagram for Dumux::StaggeredVtkOutputModule< GridVariables, SolutionVector >:
Inheritance graph

Description

template<class GridVariables, class SolutionVector>
class Dumux::StaggeredVtkOutputModule< GridVariables, SolutionVector >

A VTK output module to simplify writing dumux simulation data to VTK format Specialization for staggered grids with dofs on faces.

Template Parameters
GridVariablesThe grid variables
SolutionVectorThe solution vector

Public Types

enum class  FieldType : unsigned int { element , vertex , automatic }
 export field type More...
 
using VolumeVariables = VV
 export type of the volume variables for the outputfields More...
 

Public Member Functions

template<class Sol >
 StaggeredVtkOutputModule (const GridVariables &gridVariables, const Sol &sol, const std::string &name, const std::string &paramGroup="", Dune::VTK::DataMode dm=Dune::VTK::conforming, bool verbose=true)
 
void addFaceField (const std::vector< Scalar > &v, const std::string &name)
 
void addFaceField (const std::vector< GlobalPosition > &v, const std::string &name)
 
void addFaceVariable (std::function< Scalar(const FaceVariables &)> &&f, const std::string &name)
 
void addFaceVariable (std::function< GlobalPosition(const SubControlVolumeFace &scvf, const FaceVariables &)> &&f, const std::string &name)
 
void write (double time, Dune::VTK::OutputType type=Dune::VTK::ascii)
 
const std::string & paramGroup () const
 the parameter group for getting parameter from the parameter tree More...
 
void addVelocityOutput (std::shared_ptr< VelocityOutputType > velocityOutput)
 Add a velocity output policy. More...
 
void addVolumeVariable (std::function< Scalar(const VolumeVariables &)> &&f, const std::string &name)
 
template<class VVV = VolVarsVector, typename std::enable_if_t<(VVV::dimension > 1), int > = 0>
void addVolumeVariable (std::function< VolVarsVector(const VolumeVariables &)> &&f, const std::string &name)
 
template<typename Vector >
void addField (const Vector &v, const std::string &name, FieldType fieldType=FieldType::automatic)
 

Protected Types

using VelocityOutput = VelocityOutputType
 

Protected Member Functions

const auto & problem () const
 
const GridGeometry & gridGeometry () const
 
const GridVariables & gridVariables () const
 
const SolutionVector & sol () const
 
bool verbose () const
 
const std::string & name () const
 
Dune::VTK::DataMode dataMode () const
 
Dune::VTKWriter< GridView > & writer ()
 
Dune::VTKSequenceWriter< GridView > & sequenceWriter ()
 
const std::vector< VolVarScalarDataInfo > & volVarScalarDataInfo () const
 
const std::vector< VolVarVectorDataInfo > & volVarVectorDataInfo () const
 
const std::vector< Field > & fields () const
 
const VelocityOutputvelocityOutput () const
 

Member Typedef Documentation

◆ VelocityOutput

template<class GridVariables , class SolutionVector >
using Dumux::VtkOutputModule< GridVariables, SolutionVector >::VelocityOutput = VelocityOutputType
protectedinherited

◆ VolumeVariables

template<class GridVariables , class SolutionVector >
using Dumux::VtkOutputModule< GridVariables, SolutionVector >::VolumeVariables = VV
inherited

export type of the volume variables for the outputfields

Member Enumeration Documentation

◆ FieldType

template<class GridVariables , class SolutionVector >
enum class Dumux::VtkOutputModule::FieldType : unsigned int
stronginherited

export field type

Enumerator
element 
vertex 
automatic 

Constructor & Destructor Documentation

◆ StaggeredVtkOutputModule()

template<class GridVariables , class SolutionVector >
template<class Sol >
Dumux::StaggeredVtkOutputModule< GridVariables, SolutionVector >::StaggeredVtkOutputModule ( const GridVariables &  gridVariables,
const Sol &  sol,
const std::string &  name,
const std::string &  paramGroup = "",
Dune::VTK::DataMode  dm = Dune::VTK::conforming,
bool  verbose = true 
)
inline

Member Function Documentation

◆ addFaceField() [1/2]

template<class GridVariables , class SolutionVector >
void Dumux::StaggeredVtkOutputModule< GridVariables, SolutionVector >::addFaceField ( const std::vector< GlobalPosition > &  v,
const std::string &  name 
)
inline

Add a vector valued field

Parameters
vThe field to be added
nameThe name of the vtk field

◆ addFaceField() [2/2]

template<class GridVariables , class SolutionVector >
void Dumux::StaggeredVtkOutputModule< GridVariables, SolutionVector >::addFaceField ( const std::vector< Scalar > &  v,
const std::string &  name 
)
inline

Methods to conveniently add face variables Do not call these methods after initialization Add a scalar valued field

Parameters
vThe field to be added
nameThe name of the vtk field

◆ addFaceVariable() [1/2]

template<class GridVariables , class SolutionVector >
void Dumux::StaggeredVtkOutputModule< GridVariables, SolutionVector >::addFaceVariable ( std::function< GlobalPosition(const SubControlVolumeFace &scvf, const FaceVariables &)> &&  f,
const std::string &  name 
)
inline

Add a vector-valued faceVarible

Parameters
fA function taking a SubControlVolumeFace and FaceVariables object and returning the desired vector
nameThe name of the vtk field

◆ addFaceVariable() [2/2]

template<class GridVariables , class SolutionVector >
void Dumux::StaggeredVtkOutputModule< GridVariables, SolutionVector >::addFaceVariable ( std::function< Scalar(const FaceVariables &)> &&  f,
const std::string &  name 
)
inline

Add a scalar-valued faceVarible

Parameters
fA function taking a FaceVariables object and returning the desired scalar
nameThe name of the vtk field

◆ addField()

template<class GridVariables , class SolutionVector >
template<typename Vector >
void Dumux::VtkOutputModule< GridVariables, SolutionVector >::addField ( const Vector &  v,
const std::string &  name,
FieldType  fieldType = FieldType::automatic 
)
inlineinherited

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.

◆ addVelocityOutput()

template<class GridVariables , class SolutionVector >
void Dumux::VtkOutputModule< GridVariables, SolutionVector >::addVelocityOutput ( std::shared_ptr< VelocityOutputType velocityOutput)
inlineinherited

Add a velocity output policy.

Methods to conveniently add primary and secondary variables upon initialization Do not call these methods after initialization i.e. not within the time loop

Parameters
velocityOutputthe output policy
Note
the default policy does not add any velocity output

◆ addVolumeVariable() [1/2]

template<class GridVariables , class SolutionVector >
void Dumux::VtkOutputModule< GridVariables, SolutionVector >::addVolumeVariable ( std::function< Scalar(const VolumeVariables &)> &&  f,
const std::string &  name 
)
inlineinherited

Output a scalar volume variable

Parameters
nameThe name of the vtk field
fA function taking a VolumeVariables object and returning the desired scalar

◆ addVolumeVariable() [2/2]

template<class GridVariables , class SolutionVector >
template<class VVV = VolVarsVector, typename std::enable_if_t<(VVV::dimension > 1), int > = 0>
void Dumux::VtkOutputModule< GridVariables, SolutionVector >::addVolumeVariable ( std::function< VolVarsVector(const VolumeVariables &)> &&  f,
const std::string &  name 
)
inlineinherited

Add a vector-valued variable

Parameters
fA function taking a VolumeVariables object and returning the desired vector
nameThe name of the vtk field
Note
This method is only available for dimWorld > 1. For 1-D problems, the overload for volVar methods returning a Scalar will be used.

◆ dataMode()

template<class GridVariables , class SolutionVector >
Dune::VTK::DataMode Dumux::VtkOutputModule< GridVariables, SolutionVector >::dataMode ( ) const
inlineprotectedinherited

◆ fields()

template<class GridVariables , class SolutionVector >
const std::vector< Field > & Dumux::VtkOutputModule< GridVariables, SolutionVector >::fields ( ) const
inlineprotectedinherited

◆ gridGeometry()

template<class GridVariables , class SolutionVector >
const GridGeometry & Dumux::VtkOutputModule< GridVariables, SolutionVector >::gridGeometry ( ) const
inlineprotectedinherited

◆ gridVariables()

template<class GridVariables , class SolutionVector >
const GridVariables & Dumux::VtkOutputModule< GridVariables, SolutionVector >::gridVariables ( ) const
inlineprotectedinherited

◆ name()

template<class GridVariables , class SolutionVector >
const std::string & Dumux::VtkOutputModule< GridVariables, SolutionVector >::name ( ) const
inlineprotectedinherited

◆ paramGroup()

template<class GridVariables , class SolutionVector >
const std::string & Dumux::VtkOutputModule< GridVariables, SolutionVector >::paramGroup ( ) const
inlineinherited

the parameter group for getting parameter from the parameter tree

◆ problem()

template<class GridVariables , class SolutionVector >
const auto & Dumux::VtkOutputModule< GridVariables, SolutionVector >::problem ( ) const
inlineprotectedinherited

◆ sequenceWriter()

template<class GridVariables , class SolutionVector >
Dune::VTKSequenceWriter< GridView > & Dumux::VtkOutputModule< GridVariables, SolutionVector >::sequenceWriter ( )
inlineprotectedinherited

◆ sol()

template<class GridVariables , class SolutionVector >
const SolutionVector & Dumux::VtkOutputModule< GridVariables, SolutionVector >::sol ( ) const
inlineprotectedinherited

◆ velocityOutput()

template<class GridVariables , class SolutionVector >
const VelocityOutput & Dumux::VtkOutputModule< GridVariables, SolutionVector >::velocityOutput ( ) const
inlineprotectedinherited

◆ verbose()

template<class GridVariables , class SolutionVector >
bool Dumux::VtkOutputModule< GridVariables, SolutionVector >::verbose ( ) const
inlineprotectedinherited

◆ volVarScalarDataInfo()

template<class GridVariables , class SolutionVector >
const std::vector< VolVarScalarDataInfo > & Dumux::VtkOutputModule< GridVariables, SolutionVector >::volVarScalarDataInfo ( ) const
inlineprotectedinherited

◆ volVarVectorDataInfo()

template<class GridVariables , class SolutionVector >
const std::vector< VolVarVectorDataInfo > & Dumux::VtkOutputModule< GridVariables, SolutionVector >::volVarVectorDataInfo ( ) const
inlineprotectedinherited

◆ write()

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

Write the values to vtp files

Parameters
timeThe current time
typeThe output type

◆ writer()

template<class GridVariables , class SolutionVector >
Dune::VTKWriter< GridView > & Dumux::VtkOutputModule< GridVariables, SolutionVector >::writer ( )
inlineprotectedinherited

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