3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ > Class Template Reference

A C++ wrapper for a Python problem. More...

#include <dumux/python/common/fvproblem.hh>

Inheritance diagram for Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >:

Description

template<class GridGeometry_, class SpatialParams_, class PrimaryVariables, bool enableInternalDirichletConstraints_>
class Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >

A C++ wrapper for a Python problem.

Public Types

using GridGeometry = GridGeometry_
 
using SpatialParams = SpatialParams_
 
using Scalar = typename GridGeometry::GridView::ctype
 
using NumEqVector = Dune::FieldVector< Scalar, PrimaryVariables::dimension >
 
using Element = typename GridGeometry::GridView::template Codim< 0 >::Entity
 
using FVElementGeometry = typename GridGeometry::LocalView
 
using SubControlVolume = typename GridGeometry::SubControlVolume
 
using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace
 
using GlobalPosition = typename Element::Geometry::GlobalCoordinate
 
using BoundaryTypes = Dumux::BoundaryTypes< PrimaryVariables::dimension >
 

Public Member Functions

 FVProblem (std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< const SpatialParams > spatialParams, pybind11::object pyProblem)
 
 FVProblem (std::shared_ptr< const GridGeometry > gridGeometry, pybind11::object pyProblem)
 
const std::string & name () const
 
const std::string & paramGroup () const
 
BoundaryTypes boundaryTypes (const Element &element, const SubControlVolume &scv) const
 
BoundaryTypes boundaryTypes (const Element &element, const SubControlVolumeFace &scvf) const
 
PrimaryVariables dirichlet (const Element &element, const SubControlVolume &scv) const
 
PrimaryVariables dirichlet (const Element &element, const SubControlVolumeFace &scvf) const
 
template<class ElementVolumeVariables , class ElementFluxVariablesCache >
NumEqVector neumann (const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
 
template<class ElementVolumeVariables >
NumEqVector source (const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
 
NumEqVector sourceAtPos (const GlobalPosition &globalPos) const
 
template<class ElementVolumeVariables >
NumEqVector scvPointSources (const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
 
template<class Entity >
PrimaryVariables initial (const Entity &entity) const
 
template<class MatrixBlock , class VolumeVariables >
void addSourceDerivatives (MatrixBlock &block, const Element &element, const FVElementGeometry &fvGeometry, const VolumeVariables &volVars, const SubControlVolume &scv) const
 Add source term derivative to the Jacobian. More...
 
Scalar extrusionFactorAtPos (const GlobalPosition &globalPos, double defaultValue=1.0) const
 
template<class ElementSolution >
Scalar extrusionFactor (const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, double defaultValue=1.0) const
 
Scalar temperatureAtPos (const GlobalPosition &globalPos, int defaultValue=1) const
 
Scalar temperature (int defaultValue=1) const
 
const GridGeometrygridGeometry () const
 
const SpatialParamsspatialParams () const
 Return a reference to the underlying spatial parameters. More...
 

Static Public Member Functions

static constexpr bool enableInternalDirichletConstraints ()
 

Static Public Attributes

static constexpr bool isBox = GridGeometry::discMethod == DiscretizationMethods::box
 
static constexpr std::size_t numEq = static_cast<std::size_t>(PrimaryVariables::dimension)
 

Member Typedef Documentation

◆ BoundaryTypes

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::BoundaryTypes = Dumux::BoundaryTypes<PrimaryVariables::dimension>

◆ Element

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::Element = typename GridGeometry::GridView::template Codim<0>::Entity

◆ FVElementGeometry

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::FVElementGeometry = typename GridGeometry::LocalView

◆ GlobalPosition

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::GlobalPosition = typename Element::Geometry::GlobalCoordinate

◆ GridGeometry

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::GridGeometry = GridGeometry_

◆ NumEqVector

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::NumEqVector = Dune::FieldVector<Scalar, PrimaryVariables::dimension>

◆ Scalar

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::Scalar = typename GridGeometry::GridView::ctype

◆ SpatialParams

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::SpatialParams = SpatialParams_

◆ SubControlVolume

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::SubControlVolume = typename GridGeometry::SubControlVolume

◆ SubControlVolumeFace

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
using Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace

Constructor & Destructor Documentation

◆ FVProblem() [1/2]

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::FVProblem ( std::shared_ptr< const GridGeometry gridGeometry,
std::shared_ptr< const SpatialParams spatialParams,
pybind11::object  pyProblem 
)
inline

◆ FVProblem() [2/2]

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::FVProblem ( std::shared_ptr< const GridGeometry gridGeometry,
pybind11::object  pyProblem 
)
inline

Member Function Documentation

◆ addSourceDerivatives()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
template<class MatrixBlock , class VolumeVariables >
void Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::addSourceDerivatives ( MatrixBlock &  block,
const Element element,
const FVElementGeometry fvGeometry,
const VolumeVariables &  volVars,
const SubControlVolume scv 
) const
inline

Add source term derivative to the Jacobian.

Note
Only needed in case of analytic differentiation and solution dependent sources

◆ boundaryTypes() [1/2]

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
BoundaryTypes Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::boundaryTypes ( const Element element,
const SubControlVolume scv 
) const
inline

◆ boundaryTypes() [2/2]

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
BoundaryTypes Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::boundaryTypes ( const Element element,
const SubControlVolumeFace scvf 
) const
inline

◆ dirichlet() [1/2]

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
PrimaryVariables Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::dirichlet ( const Element element,
const SubControlVolume scv 
) const
inline

◆ dirichlet() [2/2]

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
PrimaryVariables Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::dirichlet ( const Element element,
const SubControlVolumeFace scvf 
) const
inline

◆ enableInternalDirichletConstraints()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
static constexpr bool Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::enableInternalDirichletConstraints ( )
inlinestaticconstexpr

◆ extrusionFactor()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
template<class ElementSolution >
Scalar Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::extrusionFactor ( const Element element,
const SubControlVolume scv,
const ElementSolution &  elemSol,
double  defaultValue = 1.0 
) const
inline

◆ extrusionFactorAtPos()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
Scalar Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::extrusionFactorAtPos ( const GlobalPosition globalPos,
double  defaultValue = 1.0 
) const
inline

◆ gridGeometry()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
const GridGeometry & Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::gridGeometry ( ) const
inline

◆ initial()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
template<class Entity >
PrimaryVariables Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::initial ( const Entity &  entity) const
inline

◆ name()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
const std::string & Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::name ( ) const
inline

◆ neumann()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
template<class ElementVolumeVariables , class ElementFluxVariablesCache >
NumEqVector Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::neumann ( const Element element,
const FVElementGeometry fvGeometry,
const ElementVolumeVariables &  elemVolVars,
const ElementFluxVariablesCache &  elemFluxVarsCache,
const SubControlVolumeFace scvf 
) const
inline

◆ paramGroup()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
const std::string & Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::paramGroup ( ) const
inline

◆ scvPointSources()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
template<class ElementVolumeVariables >
NumEqVector Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::scvPointSources ( const Element element,
const FVElementGeometry fvGeometry,
const ElementVolumeVariables &  elemVolVars,
const SubControlVolume scv 
) const
inline

◆ source()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
template<class ElementVolumeVariables >
NumEqVector Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::source ( const Element element,
const FVElementGeometry fvGeometry,
const ElementVolumeVariables &  elemVolVars,
const SubControlVolume scv 
) const
inline

◆ sourceAtPos()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
NumEqVector Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::sourceAtPos ( const GlobalPosition globalPos) const
inline

◆ spatialParams()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
const SpatialParams & Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::spatialParams ( ) const
inline

Return a reference to the underlying spatial parameters.

◆ temperature()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
Scalar Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::temperature ( int  defaultValue = 1) const
inline

◆ temperatureAtPos()

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
Scalar Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::temperatureAtPos ( const GlobalPosition globalPos,
int  defaultValue = 1 
) const
inline

Member Data Documentation

◆ isBox

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
constexpr bool Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::isBox = GridGeometry::discMethod == DiscretizationMethods::box
staticconstexpr

◆ numEq

template<class GridGeometry_ , class SpatialParams_ , class PrimaryVariables , bool enableInternalDirichletConstraints_>
constexpr std::size_t Dumux::Python::FVProblem< GridGeometry_, SpatialParams_, PrimaryVariables, enableInternalDirichletConstraints_ >::numEq = static_cast<std::size_t>(PrimaryVariables::dimension)
staticconstexpr

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