12#ifndef DUMUX_PYTHON_COMMON_FVASSEMBLER_HH
13#define DUMUX_PYTHON_COMMON_FVASSEMBLER_HH
15#include <dune/python/pybind11/pybind11.h>
16#include <dune/python/pybind11/stl.h>
24 using pybind11::operator
""_a;
31 static_assert(std::is_same_v<GridGeometry, typename Problem::GridGeometry>);
32 cls.def(pybind11::init([](std::shared_ptr<const Problem> problem,
33 std::shared_ptr<const GridGeometry> gridGeometry,
34 std::shared_ptr<GridVariables> gridVariables){
35 return std::make_shared<FVAssembler>(problem, gridGeometry, gridVariables);
50 cls.def(
"assembleResidual", [](
FVAssembler& self,
const SolutionVector& curSol){
54 cls.def(
"assembleJacobianAndResidual", [](
FVAssembler& self,
const SolutionVector& curSol){
A linear system assembler (residual and Jacobian) for finite volume schemes (box, tpfa,...
Definition: assembly/fvassembler.hh:93
ResidualType & residual()
The residual vector (rhs)
Definition: assembly/fvassembler.hh:293
const GridView & gridView() const
The gridview.
Definition: assembly/fvassembler.hh:277
const Problem & problem() const
The problem.
Definition: assembly/fvassembler.hh:269
bool isStationaryProblem() const
Whether we are assembling a stationary or instationary problem.
Definition: assembly/fvassembler.hh:317
GetPropType< TypeTag, Properties::SolutionVector > SolutionVector
Definition: assembly/fvassembler.hh:109
std::size_t numDofs() const
Returns the number of degrees of freedom.
Definition: assembly/fvassembler.hh:265
GridVariables & gridVariables()
The global grid variables.
Definition: assembly/fvassembler.hh:281
JacobianMatrix & jacobian()
The jacobian matrix.
Definition: assembly/fvassembler.hh:289
GetPropType< TypeTag, Properties::Problem > Problem
Definition: assembly/fvassembler.hh:115
void assembleResidual(const SolutionVector &curSol)
compute the residuals using the internal residual
Definition: assembly/fvassembler.hh:201
GetPropType< TypeTag, Properties::GridVariables > GridVariables
Definition: assembly/fvassembler.hh:112
const GridGeometry & gridGeometry() const
The global finite volume geometry.
Definition: assembly/fvassembler.hh:273
void assembleJacobianAndResidual(const SolutionVector &curSol, const PartialReassembler *partialReassembler=nullptr)
Assembles the global Jacobian of the residual and the residual for the current solution.
Definition: assembly/fvassembler.hh:170
GridGeo GridGeometry
Definition: assembly/fvassembler.hh:114
const SolutionVector & prevSol() const
The solution of the previous time step.
Definition: assembly/fvassembler.hh:297
Definition: python/assembly/fvassembler.hh:18
void registerFVAssembler(pybind11::handle scope, pybind11::class_< FVAssembler, options... > cls)
Definition: python/assembly/fvassembler.hh:22