A VTK output module to simplify writing dumux simulation data to VTK format. More...
#include <dumux/porousmediumflow/boxdfm/vtkoutputmodule.hh>
A VTK output module to simplify writing dumux simulation data to VTK format.
This output module is specialized for writing out data obtained by the box-dfm scheme. It writes out separate vtk files for the solution on the fracture. For this, a grid type to be used the fracture-conforming lower-dimensional grid has to be provided.
TypeTag | The TypeTag of the problem implementation |
FractureGrid | The Type used for the lower-dimensional grid |
Handles the output of scalar and vector fields to VTK formatted file for multiple variables and time steps. Certain predefined fields can be registered on initialization and/or be turned on/off using the designated properties. Additionally non-standardized scalar and vector fields can be added to the writer manually.
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 FractureGridAdapter > | |
BoxDfmVtkOutputModule (const GridVariables &gridVariables, const SolutionVector &sol, const std::string &name, const FractureGridAdapter &fractureGridAdapter, const std::string ¶mGroup="", Dune::VTK::DataMode dm=Dune::VTK::conforming, bool verbose=true) | |
The constructor. More... | |
void | write (double time, Dune::VTK::OutputType type=Dune::VTK::ascii) |
Writing data. More... | |
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 VelocityOutput & | velocityOutput () const |
|
protectedinherited |
|
inherited |
export type of the volume variables for the outputfields
|
stronginherited |
|
inline |
The constructor.
|
inlineinherited |
Add a scalar or vector valued vtk field
v | The field to be added. Can be any indexable container. Its value type can be a number or itself an indexable container. |
name | The name of the field |
fieldType | The 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. |
|
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
velocityOutput | the output policy |
|
inlineinherited |
Output a scalar volume variable
name | The name of the vtk field |
f | A function taking a VolumeVariables object and returning the desired scalar |
|
inlineinherited |
Add a vector-valued variable
f | A function taking a VolumeVariables object and returning the desired vector |
name | The name of the vtk field |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineinherited |
the parameter group for getting parameter from the parameter tree
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inline |
Writing data.
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
|
inlineprotectedinherited |