12#ifndef DUMUX_PYTHON_IO_VTK_OUTPUTMODULE_HH
13#define DUMUX_PYTHON_IO_VTK_OUTPUTMODULE_HH
17#include <dune/python/pybind11/pybind11.h>
18#include <dune/python/pybind11/stl.h>
25template <
class GridVariables,
class SolutionVector,
class... options>
29 using pybind11::operator
""_a;
33 Dumux::Python::Impl::registerVolumeVariables<VolumeVariables>(scope);
36 cls.def(pybind11::init([](
const GridVariables& gridVariables,
37 const SolutionVector& sol,
38 const std::string& name){
42 using Scalar = double;
44 cls.def(
"addField", [](
VtkOutputModule& self,
const SolutionVector& sol,
const std::string& name){
53 std::function<Scalar(
const VolumeVariables&)>&& f,
54 const std::string& name){
59 cls.def(
"addVelocityOutput", [](
VtkOutputModule& self, std::shared_ptr<VelocityOutputType> velocityOutput){
65template<
class Gr
idVariables,
class SolutionVector>
69 pybind11::class_<VtkOutputModule> cls(scope, clsName);
Velocity output for implicit (porous media) models.
Definition: io/velocityoutput.hh:29
void write(double time, Dune::VTK::OutputType type=Dune::VTK::ascii)
Definition: io/vtkoutputmodule.hh:165
void addField(const Vector &v, const std::string &name, Vtk::FieldType fieldType=Vtk::FieldType::automatic)
Add a scalar or vector valued vtk field.
Definition: io/vtkoutputmodule.hh:92
A VTK output module to simplify writing dumux simulation data to VTK format.
Definition: io/vtkoutputmodule.hh:300
VV VolumeVariables
export type of the volume variables for the outputfields
Definition: io/vtkoutputmodule.hh:330
void addVolumeVariable(std::function< Scalar(const VolumeVariables &)> &&f, const std::string &name)
Definition: io/vtkoutputmodule.hh:364
void addVelocityOutput(std::shared_ptr< VelocityOutputType > velocityOutput)
Add a velocity output policy.
Definition: io/vtkoutputmodule.hh:358
Default velocity output policy for porous media models.
A VTK output module to simplify writing dumux simulation data to VTK format.
Definition: python/assembly/fvassembler.hh:18
void registerVtkOutputModule(pybind11::handle scope, pybind11::class_< VtkOutputModule< GridVariables, SolutionVector >, options... > cls)
Definition: python/io/vtkoutputmodule.hh:26
Python wrapper for volume variables (finite volume schemes)