3.5-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::PoreNetwork::VtkOutputModule< GridVariables, FluxVariables, SolutionVector > Class Template Reference

Adds vtk output fields specific to pore-network models. More...

#include <dumux/porenetwork/common/pnmvtkoutputmodule.hh>

Inheritance diagram for Dumux::PoreNetwork::VtkOutputModule< GridVariables, FluxVariables, SolutionVector >:

Description

template<class GridVariables, class FluxVariables, class SolutionVector>
class Dumux::PoreNetwork::VtkOutputModule< GridVariables, FluxVariables, SolutionVector >

Adds vtk output fields specific to pore-network models.

Public Types

using VolumeVariables = VV
 export type of the volume variables for the outputfields More...
 

Public Member Functions

 VtkOutputModule (const GridVariables &gridVariables, const SolutionVector &sol, const std::string &name, const std::string &paramGroup="", Dune::VTK::DataMode dm=Dune::VTK::conforming, bool verbose=true)
 The constructor. More...
 
void addFluxVariable (std::function< Scalar(const FluxVariables &, const FluxVarsCache &)> &&f, const std::string &name)
 
void write (double time, Dune::VTK::OutputType type=Dune::VTK::ascii)
 Gather and process all required data and write them to a vtk file. More...
 
const auto & problem () const
 Return a reference to the problem. 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)
 
const std::string & paramGroup () const
 the parameter group for getting parameter from the parameter tree More...
 
void addField (const Vector &v, const std::string &name, Vtk::FieldType fieldType=Vtk::FieldType::automatic)
 Add a scalar or vector valued vtk field. More...
 
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...
 

Protected Types

using VelocityOutput = VelocityOutputType
 

Protected Member Functions

const GridVariables & gridVariables () const
 
const GridGeometry & gridGeometry () const
 
const SolutionVector & sol () const
 
const std::vector< VolVarScalarDataInfo > & volVarScalarDataInfo () const
 
const std::vector< VolVarVectorDataInfo > & volVarVectorDataInfo () const
 
const VelocityOutputvelocityOutput () 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
 

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

Constructor & Destructor Documentation

◆ VtkOutputModule()

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

The constructor.

Member Function Documentation

◆ addField() [1/2]

void Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::addField ( const Vector &  v,
const std::string &  name,
Dumux::Vtk::Precision  precision,
Vtk::FieldType  fieldType = Vtk::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.
precisionThe output precision of this field (see Dune::VTK::Precision)

◆ addField() [2/2]

void Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::addField ( const Vector &  v,
const std::string &  name,
Vtk::FieldType  fieldType = Vtk::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.

◆ addFluxVariable()

template<class GridVariables , class FluxVariables , class SolutionVector >
void Dumux::PoreNetwork::VtkOutputModule< GridVariables, FluxVariables, SolutionVector >::addFluxVariable ( std::function< Scalar(const FluxVariables &, const FluxVarsCache &)> &&  f,
const std::string &  name 
)
inline

Output a scalar flux variable related to pore throats. This is basically a wrapper for the ParentType's addField method.

Parameters
fA function taking a Problem, FluxVariables and FluxVarsCache object and returning the desired scalar
nameThe name of the vtk field

◆ 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()

Dune::VTK::DataMode Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::dataMode ( ) const
inlineprotectedinherited

◆ fields()

const std::vector< Field > & Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::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()

const std::string & Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::name ( ) const
inlineprotectedinherited

◆ paramGroup()

const std::string & Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::paramGroup ( ) const
inlineinherited

the parameter group for getting parameter from the parameter tree

◆ precision()

Dumux::Vtk::Precision Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::precision ( ) const
inlineprotectedinherited

◆ problem()

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

Return a reference to the problem.

◆ sequenceWriter()

Dune::VTKSequenceWriter< GridView > & Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::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()

bool Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::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 FluxVariables , class SolutionVector >
void Dumux::PoreNetwork::VtkOutputModule< GridVariables, FluxVariables, SolutionVector >::write ( double  time,
Dune::VTK::OutputType  type = Dune::VTK::ascii 
)
inline

Gather and process all required data and write them to a vtk file.

◆ writer()

Dune::VTKWriter< GridView > & Dumux::VtkOutputModuleBase< GridVariables::GridGeometry >::writer ( )
inlineprotectedinherited

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