24#ifndef DUMUX_PYTHON_IO_VTK_OUTPUTMODULE_HH
25#define DUMUX_PYTHON_IO_VTK_OUTPUTMODULE_HH
29#include <dune/python/pybind11/pybind11.h>
30#include <dune/python/pybind11/stl.h>
37template <
class GridVariables,
class SolutionVector,
class... options>
41 using pybind11::operator
""_a;
45 Dumux::Python::Impl::registerVolumeVariables<VolumeVariables>(scope);
48 cls.def(pybind11::init([](
const GridVariables& gridVariables,
49 const SolutionVector& sol,
50 const std::string& name){
54 using Scalar = double;
56 cls.def(
"addField", [](
VtkOutputModule& self,
const SolutionVector& sol,
const std::string& name){
65 std::function<Scalar(
const VolumeVariables&)>&& f,
66 const std::string& name){
71 cls.def(
"addVelocityOutput", [](
VtkOutputModule& self, std::shared_ptr<VelocityOutputType> velocityOutput){
77template<
class Gr
idVariables,
class SolutionVector>
81 pybind11::class_<VtkOutputModule> cls(scope, clsName);
Definition: python/assembly/fvassembler.hh:30
void registerVtkOutputModule(pybind11::handle scope, pybind11::class_< VtkOutputModule< GridVariables, SolutionVector >, options... > cls)
Definition: python/io/vtkoutputmodule.hh:38
Velocity output for implicit (porous media) models.
Definition: io/velocityoutput.hh:41
void write(double time, Dune::VTK::OutputType type=Dune::VTK::ascii)
Definition: io/vtkoutputmodule.hh:174
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:110
A VTK output module to simplify writing dumux simulation data to VTK format.
Definition: io/vtkoutputmodule.hh:309
VV VolumeVariables
export type of the volume variables for the outputfields
Definition: io/vtkoutputmodule.hh:337
void addVolumeVariable(std::function< Scalar(const VolumeVariables &)> &&f, const std::string &name)
Definition: io/vtkoutputmodule.hh:371
void addVelocityOutput(std::shared_ptr< VelocityOutputType > velocityOutput)
Add a velocity output policy.
Definition: io/vtkoutputmodule.hh:365
Default velocity output policy for porous media models.
A VTK output module to simplify writing dumux simulation data to VTK format.