version 3.11-dev
Loading...
Searching...
No Matches
Discretization schemes

The discretization schemes available in DuMux. More...

Description

Topics

 Cell-centered Finite Volume Methods
 Finite volume schemes with degrees of freedom located at grid cell centers.
 Control-volume Finite Element Methods
 Control-volume finite element schemes (e.g. box method) Control-volume finite element schemes are based on finite element basis functions for interpolation but define control volumes to construct a finite volume scheme. They can be interpreted both as finite volume or as (Petrov-Galerkin) finite element scheme.
 Staggered Grid Finite Volume Method
 Discretization for the momentum balance of the Navier-Stokes equations. Can be used to build a marker-and-cell scheme (MAC) together with Tpfa for the discretization of the mass balance equation.
 Staggered FV scheme
 A staggered finite volume scheme with degrees of freedom at cell-centers and facets. In this implementation, momentum control volumes do not explicitly exist, but the implementation uses workarounds.
 Finite Element Methods
 The finite element method.
 Pore-network Models
 The pore-network model discretization.

Classes

class  Dumux::BaseGridGeometry< GV, Traits >
 Base class for all grid geometries. More...
class  Dumux::BasicGridGeometry< GV, EM, VM >
 An implementation of a grid geometry with some basic features. More...
struct  Dumux::Experimental::DefaultBoundaryFaceGeometryTraits< GridView >
 Default traits class to be used for the boundary faces. More...
class  Dumux::Experimental::BoundaryFace< GV, T >
 Class for a boundary face related to primary grid elements (dune intersections). More...
struct  Dumux::CheckOverlapSize< DiscretizationMethod >
 Check if the overlap size is valid for a given discretization method. More...
struct  Dumux::CVFE::InterpolationPolicy::DofPositionEvaluation
 Interpolation policy that evaluates a function at the dof positions. More...
struct  Dumux::CVFE::InterpolationPolicy::L2Projection
 Interpolation policy that uses an L2 projection. More...
class  Dumux::QuadraturePointData< IpData >
 Quadrature point data with weight and interpolation point info. More...
struct  Dumux::QuadratureRules::MidpointQuadrature
 Midpoint quadrature rule that uses scv/scvf centers. More...
struct  Dumux::QuadratureRules::DuneQuadrature< order >
 Dune-based quadrature rule with specified order. More...
struct  Dumux::CVFE::DefaultQuadratureTraits< GridView, ScvRule, ScvfRule, ElementRule, IntersectionRule, BoundaryFaceRule >
 Quadrature rule traits for discretization schemes. More...
class  Dumux::ElementIntersectionBoundaryTypes< BTypes >
 This class stores an array of BoundaryTypes objects. This class is not dependent on the used discretization method It only requires the function fvGeometry.intersectionIndex(scvf). More...
struct  Dumux::NoExtrusion
 Default implementation that performs no extrusion (extrusion with identity). More...
struct  Dumux::RotationalExtrusion< radAx >
 Rotation symmetric extrusion policy for rotating about an external axis. More...
struct  Dumux::SphericalExtrusion
 Rotation symmetric extrusion policy for spherical rotation. More...
class  Dumux::FVFacetGridMapper< FacetGridView, GG >
 Maps between entities of finite-volume discretizations and a grid defined on the facets of the discretization. More...
class  Dumux::FluxStencil< FVElementGeometry, DiscretizationMethod >
 The flux stencil specialized for different discretization schemes. More...
class  Dumux::FVGridVariables< GG, GVV, GFVC >
 The grid variable class for finite volume schemes storing variables on scv and scvf (volume and flux variables). More...
class  Dumux::Experimental::GridVariables< GG, GVC >
 The grid variables class for general schemes, storing variables and data. More...
class  Dumux::FEBasisFromCVFEGridDiscretization< GridDiscretization >
 Wraps a CVFE grid discretization to expose the FE basis interface expected by L2Projection. More...
class  Dumux::Projector< ScalarType >
 Does an L2-projection from one discrete function space into another. The convenience functions makeProjectorPair or makeProjector can be used to create such a projection. More...
class  Dumux::ScvIterator< SubControlVolume, Vector, FVElementGeometry >
 Iterators over sub control volumes. More...
class  Dumux::ScvfIterator< SubControlVolumeFace, Vector, FVElementGeometry >
 Iterators over sub control volume faces of an fv geometry. More...
class  Dumux::SkippingScvfIterator< SubControlVolumeFace, Vector, FVElementGeometry >
 Iterators over sub control volume faces of an fv geometry and a given sub control volume. More...
class  Dumux::SubControlVolumeBase< Imp, ScvGeometryTraits >
 Base class for a sub control volume, i.e a part of the control volume we are making the balance for. Defines the general interface. More...
class  Dumux::SubControlVolumeFaceBase< Imp, ScvfGeometryTraits >
 Base class for a sub control volume face, i.e a part of the boundary of a sub control volume we computing a flux on. More...
class  Dumux::WallDistance< GridGeometry, DistanceField >
 Class to calculate the wall distance at every element or vertex of a grid. More...
class  Dumux::Experimental::FVGridVariablesLocalView< GV >
 Finite volume-specific local view on grid variables. More...
class  Dumux::Experimental::FVGridVariables< GVV, GFVC, X >
 The grid variable class for finite volume schemes, storing variables on scv and scvf (volume and flux variables). More...

Typedefs

template<class GV, class T>
using Dumux::BasicGridGeometry_t
 Type of the basic grid geometry implementation used as backend.
template<class GridDiscretization, class Problem, class Variables, bool enableCache, class InterpolationPointData = Dumux::CVFE::LocalBasisInterpolationPointData<GridDiscretization>>
using Dumux::Experimental::DefaultGridVariablesCache
 The grid variables cache selected depending on the element discretization.
template<class TypeTag, class Variables = typename Dumux::Detail::DefaultVariables<TypeTag>::type>
using Dumux::Experimental::DefaultGridVariables
 The grid variables of a model whose variables are defined per local degree of freedom.
template<class TypeTag>
using Dumux::Detail::CVFEGridVariables_t = typename CVFEGridVariables<TypeTag>::type
 The grid variables of a control-volume finite element type tag: Experimental::DefaultGridVariables if usesVariables<TypeTag>(), otherwise FVGridVariables with the volume variables.

Functions

 Dumux::BaseGridGeometry< GV, Traits >::BaseGridGeometry (std::shared_ptr< BaseImplementation > impl)
 Constructor from a BaseImplementation.
 Dumux::BaseGridGeometry< GV, Traits >::BaseGridGeometry (const GridView &gridView)
 Constructor from a grid view.
 Dumux::BasicGridGeometry< GV, EM, VM >::BasicGridGeometry (const GridView &gridView)
 Constructor computes the bounding box of the entire domain, for e.g. setting boundary conditions.
template<class Element, class SolutionVector, class GridGeometry>
auto Dumux::elementSolution (const Element &element, const SolutionVector &sol, const GridGeometry &gg) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethods::cctpfa||GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >
 Make an element solution for cell-centered schemes.
template<class Element, class ElementVolumeVariables, class FVElementGeometry>
auto Dumux::elementSolution (const Element &element, const ElementVolumeVariables &elemVolVars, const FVElementGeometry &gg) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::cctpfa||FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< FVElementGeometry, typename ElementVolumeVariables::VolumeVariables::PrimaryVariables > >
 Make an element solution for cell-centered schemes.
template<class FVElementGeometry, class PrimaryVariables>
auto Dumux::elementSolution (PrimaryVariables &&priVars) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::cctpfa||FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< FVElementGeometry, PrimaryVariables > >
 Make an element solution for cell-centered schemes.
template<class FVElementGeometry, class PrimaryVariables>
auto Dumux::elementSolution (const PrimaryVariables &priVars) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::cctpfa||FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< FVElementGeometry, PrimaryVariables > >
 Make an element solution for cell-centered schemes.
template<class GridDiscretization, class CoefficientVector, class Function>
requires (Detail::InterpolatableAtElemDiscIpData<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type> || Detail::InterpolatableAtElemDiscGlobalPos<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type> || Detail::InterpolatableAtGlobalPos<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type>)
void Dumux::CVFE::interpolate (const GridDiscretization &gridDisc, CoefficientVector &coeffs, Function &&function, InterpolationPolicy::DofPositionEvaluation={})
 Interpolate a function into a coefficient vector by evaluating it at the dof positions.
template<class GridDiscretization, class CoefficientVector, class Function>
requires (Detail::InterpolatableAtGlobalPos<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type> || Detail::InterpolatableAtElemDiscGlobalPos<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type>)
void Dumux::CVFE::interpolate (const GridDiscretization &gridDisc, CoefficientVector &coeffs, Function &&function, InterpolationPolicy::L2Projection policy)
 Interpolate a function into a coefficient vector using an L2 projection.
template<class TypeTag>
constexpr bool Dumux::Detail::usesVariables ()
 Whether a type tag assembles with the variables per local degree of freedom.
template<class Constraint, class GridDiscretization, class ConstraintInfoFunc, class ValuesFunc>
void Dumux::appendBoundaryDirichletConstraints (std::vector< Constraint > &constraints, const GridDiscretization &gridDiscretization, const ConstraintInfoFunc &constraintInfo, const ValuesFunc &values)
 Append the Dirichlet constraints of the local dofs on the boundary faces of a grid discretization.
template<class Element, class GridGeometry, class CVFEElemSol>
auto Dumux::Detail::evalCVFEGradientsAtLocalPos (const Element &element, const typename Element::Geometry &geometry, const GridGeometry &gridGeometry, const CVFEElemSol &elemSol, const typename Element::Geometry::LocalCoordinate &localPos, bool ignoreState=false)
 Evaluates the gradient of a control-volume finite element solution to a given global position.
template<class Element, class FVElementGeometry, class PrimaryVariables>
auto Dumux::evalGradientsAtLocalPos (const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const CVFEElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::LocalCoordinate &localPos, bool ignoreState=false)
 Evaluates the gradient of a given CVFE element solution to a given global position.
template<class Element, class FVElementGeometry, class PrimaryVariables>
auto Dumux::evalGradients (const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const CVFEElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::GlobalCoordinate &globalPos, bool ignoreState=false)
 Evaluates the gradient of a given CVFE element solution to a given global position.
template<class Element, class FVElementGeometry, class PrimaryVariables>
Dune::FieldVector< typename Element::Geometry::GlobalCoordinate, PrimaryVariables::dimension > Dumux::evalGradients (const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const CCElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::GlobalCoordinate &globalPos)
 Evaluates the gradient of a given CCElementSolution to a given global position. This function is only here for (compilation) compatibility reasons with the box scheme. The solution within the control volumes is constant and thus gradients are zero. One can compute gradients towards the sub-control volume faces after reconstructing the solution on the faces.
template<class Element, class GridGeometry, class CVFEElemSol>
CVFEElemSol::PrimaryVariables Dumux::Detail::evalCVFESolutionAtLocalPos (const Element &element, const typename Element::Geometry &geometry, const GridGeometry &gridGeometry, const CVFEElemSol &elemSol, const typename Element::Geometry::LocalCoordinate &localPos, bool ignoreState=false)
 Interpolates a given control-volume finite element solution at a given global position. Uses the finite element cache of the grid geometry.
template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolutionAtLocalPos (const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const CVFEElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::LocalCoordinate &localPos, bool ignoreState=false)
 Interpolates a given cvfe element solution at a given local position. Uses the finite element cache of the grid geometry.
template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolution (const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const CVFEElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::GlobalCoordinate &globalPos, bool ignoreState=false)
 Interpolates a given box element solution at a given global position. Uses the finite element cache of the grid geometry.
template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolution (const Element &element, const typename Element::Geometry &geometry, const CVFEElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::GlobalCoordinate &globalPos, bool ignoreState=false)
 Interpolates a given box element solution at a given global position.
template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolution (const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const CCElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::GlobalCoordinate &globalPos, bool ignoreState=false)
 Interpolates a given cell-centered element solution at a given global position.
template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolutionAtLocalPos (const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const CCElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::LocalCoordinate &localPos, bool ignoreState=false)
 Interpolates a given cell-centered element solution at a given local position.
template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolution (const Element &element, const typename Element::Geometry &geometry, const CCElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::GlobalCoordinate &globalPos, bool ignoreState=false)
 Interpolates a given cell-centered element solution at a given global position. Overload of the above evalSolution() function without a given gridGeometry. For compatibility reasons with the box scheme.
template<class Element, class SolutionVector, class GridGeometry>
auto Dumux::elementSolution (const Element &element, const SolutionVector &sol, const GridGeometry &gg) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethods::fcstaggered, FaceCenteredStaggeredElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >
 Make an element solution for face-centered staggered schemes.
template<class Element, class ElementVolumeVariables, class FVElementGeometry>
auto Dumux::elementSolution (const Element &element, const ElementVolumeVariables &elemVolVars, const FVElementGeometry &gg) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::fcstaggered, FaceCenteredStaggeredElementSolution< FVElementGeometry, typename ElementVolumeVariables::VolumeVariables::PrimaryVariables > >
 Make an element solution for face-centered staggered schemes.
template<class FVElementGeometry, class PrimaryVariables>
auto Dumux::elementSolution (PrimaryVariables &&priVars) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::fcstaggered, FaceCenteredStaggeredElementSolution< FVElementGeometry, std::decay_t< PrimaryVariables > > >
 Make an element solution for face-centered staggered schemes.
template<class GridCache>
GridCache::LocalView Dumux::localView (const GridCache &gridCache)
 Free function to get the local view of a grid cache object.
template<class Index>
void Dumux::Detail::addPeriodicallyMappedDof (std::unordered_map< Index, std::vector< Index > > &periodicDofMap, std::type_identity_t< Index > dofIdx, std::type_identity_t< Index > periodicDofIdx)
 Register a degree of freedom as periodically mapped to another one.
template<class Index>
void Dumux::Detail::closePeriodicDofMap (std::unordered_map< Index, std::vector< Index > > &periodicDofMap)
 Map every degree of freedom to all others it is identified with.
template<class FEBasisDomain, class FEBasisTarget, class GlueType>
auto Dumux::makeProjectorPair (const FEBasisDomain &feBasisDomain, const FEBasisTarget &feBasisTarget, GlueType glue, std::optional< int > quadratureOrder={})
 Creates a pair of projectors between the space with basis feBasisDomain to the space with basis feBasisTarget.
template<class FEBasisDomain, class FEBasisTarget, class GlueType>
auto Dumux::makeProjector (const FEBasisDomain &feBasisDomain, const FEBasisTarget &feBasisTarget, GlueType glue, std::optional< int > quadratureOrder={})
 Creates a forward projector from the space feBasisDomain to the space with basis feBasisTarget.
template<class ElementGeometry, class CornerStorage>
auto Dumux::Detail::scvfUnitNormal (const ElementGeometry &geo, const CornerStorage &corners)
 Unit normal of an interior sub-control volume face, up to sign.

Files

file  basegridgeometry.hh
 Base class for grid geometries.
file  basicgridgeometry.hh
 A basic implementation of a grid geometry with some common interfaces.
file  boundaryface.hh
 Implementation of a boundary face related to primary grid elements (dune intersections).
file  box.hh
 Defines a type tag and some properties for models using the box scheme.
file  ccmpfa.hh
 Properties for all models using cell-centered finite volume scheme with mpfa.
file  cctpfa.hh
 Properties for all models using cell-centered finite volume scheme with TPFA.
file  checkoverlapsize.hh
 Check the overlap size for different discretization methods.
file  concepts.hh
 Concepts for discretization types.
file  interpolate.hh
 Interpolate a given function into the function space of the discretization.
file  quadraturerules.hh
 Quadrature rules over sub-control volumes and sub-control volume faces.
file  defaultgridvariables.hh
 Grid variables with the variables cache selected depending on the element discretization.
file  defaultlocaloperator.hh
 The default local operator than can be specialized for each discretization scheme.
file  dirichletconstraints.hh
 Constraints related to Dirichlet boundaries.
file  elementboundarytypes.hh
 Boundary types gathered on an element.
file  elementsolution.hh
 Element solution classes and factory functions.
file  evalgradients.hh
 free functions for the evaluation of primary variable gradients inside elements.
file  evalsolution.hh
 free functions for the evaluation of primary variables inside elements.
file  extrusion.hh
 Helper classes to compute the integration elements.
file  facetgridmapper.hh
 Maps between entities of a discretization and grids defined on its facets.
file  fcdiamond.hh
 Defines a type tag and some properties for models using the diamond scheme. This scheme features degrees of freedom at the elements' centers and intersections (faces).
file  fcstaggered.hh
 Defines a type tag and some properties for models using the staggered scheme. This scheme features degrees of freedom at the elements' centers and intersections (faces). TODO: detailed documentation and figures.
file  fluxstencil.hh
 The flux stencil specialized for different discretization schemes.
file  functionspacebasis.hh
 Provides helper aliases and functionality to obtain the types and instances of Dune::Functions function space bases that underlie different discretization schemes.
file  fvgridvariables.hh
 The grid variable class for finite volume schemes, storing variables on scv and scvf (volume and flux variables).
file  fvproperties.hh
 Declares properties required for finite-volume models models.
file  gridvariables.hh
 The grid variables class for general schemes, storing variables and data.
file  localview.hh
 Free function to get the local view of a grid cache object.
file  method.hh
 The available discretization methods in Dumux.
file  nonconformingfecache.hh
 A finite element cache for the non-conforming FE spaces RT and CR.
file  periodicdofmap.hh
 Helpers for maps between degrees of freedom identified across periodic boundaries.
file  pq1.hh
 Defines a type tag and some properties for models using pq1 discretization scheme.
file  pq1bubble.hh
 Defines a type tag and some properties for models using the pq1bubble scheme.
file  pq1nonconforming.hh
 Defines type tags and properties for models using the diamond scheme, in both finite-volume (FV) and finite-element (FE) variants. This scheme features degrees of freedom at the intersections (faces).
file  pq2.hh
 Defines a type tag and some properties for models using the pq2 scheme.
file  pq3.hh
 Defines a type tag and some properties for models using the pq3 scheme.
file  l2_projection.hh
 L2-projections of analytic functions into a given function space.
file  projector.hh
 Contains functionality for L2-projections from one function space into another, which can live both on the same or different grids of potentially different dimensionality.
file  scvandscvfiterators.hh
 Class providing iterators over sub control volumes and sub control volume faces of an element.
file  scvfnormal.hh
 Normal vector of a sub-control volume face of an element-local dual grid.
file  subcontrolvolumebase.hh
 Base class for a sub control volume.
file  subcontrolvolumefacebase.hh
 Base class for a sub control volume face.
file  walldistance.hh
 Class to calculate the wall distance at every element or vertex of a grid.
file  fvgridvariables.hh
 The grid variable class for finite volume schemes, storing variables on scv and scvf (volume and flux variables).

Typedef Documentation

◆ BasicGridGeometry_t

template<class GV, class T>
using Dumux::BasicGridGeometry_t
Initial value:
Dune::Std::detected_or_t<
T
>
An implementation of a grid geometry with some basic features.
Definition basicgridgeometry.hh:37
typename T::BasicGridGeometry SpecifiesBaseGridGeometry
Definition basegridgeometry.hh:27

◆ CVFEGridVariables_t

template<class TypeTag>
using Dumux::Detail::CVFEGridVariables_t = typename CVFEGridVariables<TypeTag>::type

◆ DefaultGridVariables

template<class TypeTag, class Variables = typename Dumux::Detail::DefaultVariables<TypeTag>::type>
using Dumux::Experimental::DefaultGridVariables
Initial value:
>
>
The grid variables class for general schemes, storing variables and data.
Definition discretization/gridvariables.hh:27
Class that represents the variables of a model. We assume that models are formulated on the basis of ...
Definition experimental/common/variables.hh:41
std::conditional_t< Concepts::FEElementDiscretization< typename GridDiscretization::LocalView >, FEGridVariablesCache< FEDefaultGridVariablesCacheTraits< Problem, Variables, InterpolationPointData >, enableCache >, std::conditional_t< Concepts::HybridElementDiscretization< typename GridDiscretization::LocalView >, CVFE::HybridCVFEGridVariablesCache< CVFE::HybridCVFEDefaultGridVariablesCacheTraits< Problem, Variables, InterpolationPointData >, enableCache >, CVFE::CVFEGridVariablesCache< CVFE::CVFEDefaultGridVariablesCacheTraits< Problem, Variables, InterpolationPointData >, enableCache > > > DefaultGridVariablesCache
The grid variables cache selected depending on the element discretization.
Definition defaultgridvariables.hh:59
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:310
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:296

The grid discretization, the problem and the caching policy (EnableGridVolumeVariablesCache) are taken from the type tag.

Template Parameters
TypeTagThe type tag of the model
VariablesThe variables per local degree of freedom, by default the property Variables or, for models that do not define it, the volume variables

◆ DefaultGridVariablesCache

template<class GridDiscretization, class Problem, class Variables, bool enableCache, class InterpolationPointData = Dumux::CVFE::LocalBasisInterpolationPointData<GridDiscretization>>
using Dumux::Experimental::DefaultGridVariablesCache
Initial value:
std::conditional_t<
std::conditional_t<
CVFE::CVFEGridVariablesCache<CVFE::CVFEDefaultGridVariablesCacheTraits<Problem, Variables, InterpolationPointData>, enableCache>
>
>
The grid variables cache class for hybrid control-volume finite element methods.
Definition cvfe/hybrid/gridvariablescache.hh:51
Base class for the grid local variables.
Definition fem/gridvariablescache.hh:52
Concept for pure finite-element discretizations (no FV structure).
Definition concepts.hh:50
Concept for hybrid finite-element/finite-volume discretizations.
Definition concepts.hh:39

Element discretizations with sub-control volumes only get the control-volume cache, those with additional degrees of freedom without control volume the hybrid cache, and those without sub-control volumes the finite element cache.

Template Parameters
GridDiscretizationThe grid discretization
ProblemThe problem
VariablesThe variables per local degree of freedom
enableCacheWhether the variables and the interpolation point data are stored for the whole grid
InterpolationPointDataThe data stored per interpolation point

Function Documentation

◆ addPeriodicallyMappedDof()

template<class Index>
void Dumux::Detail::addPeriodicallyMappedDof ( std::unordered_map< Index, std::vector< Index > > & periodicDofMap,
std::type_identity_t< Index > dofIdx,
std::type_identity_t< Index > periodicDofIdx )

◆ appendBoundaryDirichletConstraints()

template<class Constraint, class GridDiscretization, class ConstraintInfoFunc, class ValuesFunc>
void Dumux::appendBoundaryDirichletConstraints ( std::vector< Constraint > & constraints,
const GridDiscretization & gridDiscretization,
const ConstraintInfoFunc & constraintInfo,
const ValuesFunc & values )

Each local dof of each boundary face is passed to constraintInfo(elemDisc, boundaryFace, localDof), which returns the constraint info with the equations constrained there (none for a free dof). A dof on several boundary faces gets a single constraint of all equations constrained on any of them. Its values values(elemDisc, localDof) are evaluated once, for the first boundary face that constrains the dof. The constraints already in constraints are kept unchanged.

Parameters
constraintsthe constraints (e.g. DirichletConstraintData), extended in place
gridDiscretizationthe grid discretization
constraintInforeturns the constraint info of a local dof on a boundary face
valuesreturns the constraint values of a local dof

◆ BaseGridGeometry() [1/2]

template<class GV, class Traits>
Dumux::BaseGridGeometry< GV, Traits >::BaseGridGeometry ( const GridView & gridView)
inline
Parameters
gridViewthe grid view on which to construct the grid geometry

◆ BaseGridGeometry() [2/2]

template<class GV, class Traits>
Dumux::BaseGridGeometry< GV, Traits >::BaseGridGeometry ( std::shared_ptr< BaseImplementation > impl)
inline

◆ BasicGridGeometry()

template<class GV, class EM, class VM>
Dumux::BasicGridGeometry< GV, EM, VM >::BasicGridGeometry ( const GridView & gridView)
inline
Parameters
gridViewthe grid view on which to construct the grid geometry

◆ closePeriodicDofMap()

template<class Index>
void Dumux::Detail::closePeriodicDofMap ( std::unordered_map< Index, std::vector< Index > > & periodicDofMap)

The map of degrees of freedom to their partners across a single periodic boundary is extended to the transitive closure. A degree of freedom on a corner of a domain periodic in k directions is then mapped to the other 2^k - 1 corners. The partners are stored in ascending order, so the degree of freedom with the smallest index in a group is the only one with an index smaller than all of its partners.

◆ elementSolution() [1/7]

template<class Element, class ElementVolumeVariables, class FVElementGeometry>
auto Dumux::elementSolution ( const Element & element,
const ElementVolumeVariables & elemVolVars,
const FVElementGeometry & gg ) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::cctpfa|| FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< FVElementGeometry, typename ElementVolumeVariables::VolumeVariables::PrimaryVariables > >

◆ elementSolution() [2/7]

template<class Element, class ElementVolumeVariables, class FVElementGeometry>
auto Dumux::elementSolution ( const Element & element,
const ElementVolumeVariables & elemVolVars,
const FVElementGeometry & gg ) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::fcstaggered, FaceCenteredStaggeredElementSolution< FVElementGeometry, typename ElementVolumeVariables::VolumeVariables::PrimaryVariables > >

◆ elementSolution() [3/7]

template<class Element, class SolutionVector, class GridGeometry>
auto Dumux::elementSolution ( const Element & element,
const SolutionVector & sol,
const GridGeometry & gg ) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethods::cctpfa|| GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >

◆ elementSolution() [4/7]

template<class Element, class SolutionVector, class GridGeometry>
auto Dumux::elementSolution ( const Element & element,
const SolutionVector & sol,
const GridGeometry & gg ) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethods::fcstaggered, FaceCenteredStaggeredElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >

◆ elementSolution() [5/7]

template<class FVElementGeometry, class PrimaryVariables>
auto Dumux::elementSolution ( const PrimaryVariables & priVars) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::cctpfa|| FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< FVElementGeometry, PrimaryVariables > >
Note
This is e.g. used to construct an element solution at Dirichlet boundaries

◆ elementSolution() [6/7]

template<class FVElementGeometry, class PrimaryVariables>
auto Dumux::elementSolution ( PrimaryVariables && priVars) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::cctpfa|| FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< FVElementGeometry, PrimaryVariables > >
Note
This is e.g. used to construct an element solution at Dirichlet boundaries

◆ elementSolution() [7/7]

template<class FVElementGeometry, class PrimaryVariables>
auto Dumux::elementSolution ( PrimaryVariables && priVars) -> std::enable_if_t< FVElementGeometry::GridGeometry::discMethod==DiscretizationMethods::fcstaggered, FaceCenteredStaggeredElementSolution< FVElementGeometry, std::decay_t< PrimaryVariables > > >
Note
This is e.g. used to construct an element solution at Dirichlet boundaries

◆ evalCVFEGradientsAtLocalPos()

template<class Element, class GridGeometry, class CVFEElemSol>
auto Dumux::Detail::evalCVFEGradientsAtLocalPos ( const Element & element,
const typename Element::Geometry & geometry,
const GridGeometry & gridGeometry,
const CVFEElemSol & elemSol,
const typename Element::Geometry::LocalCoordinate & localPos,
bool ignoreState = false )
Parameters
elementThe element
geometryThe element geometry
gridGeometryThe finite volume grid geometry
elemSolThe primary variables at the dofs of the element
localPosThe local position
ignoreStateIf true, the state of primary variables is ignored
Returns
Dune::FieldVector with as many entries as dimension of the PrimaryVariables object (i.e. numEq). Each entry is a GlobalCoordinate object holding the priVar gradient.

◆ evalCVFESolutionAtLocalPos()

template<class Element, class GridGeometry, class CVFEElemSol>
CVFEElemSol::PrimaryVariables Dumux::Detail::evalCVFESolutionAtLocalPos ( const Element & element,
const typename Element::Geometry & geometry,
const GridGeometry & gridGeometry,
const CVFEElemSol & elemSol,
const typename Element::Geometry::LocalCoordinate & localPos,
bool ignoreState = false )
Returns
the interpolated primary variables
Parameters
elementThe element
geometryThe element geometry
gridGeometryThe finite volume grid geometry
elemSolThe primary variables at the dofs of the element
localPosThe local position
ignoreStateIf true, the state of primary variables is ignored

◆ evalGradients() [1/2]

template<class Element, class FVElementGeometry, class PrimaryVariables>
Dune::FieldVector< typename Element::Geometry::GlobalCoordinate, PrimaryVariables::dimension > Dumux::evalGradients ( const Element & element,
const typename Element::Geometry & geometry,
const typename FVElementGeometry::GridGeometry & gridGeometry,
const CCElementSolution< FVElementGeometry, PrimaryVariables > & elemSol,
const typename Element::Geometry::GlobalCoordinate & globalPos )
Parameters
elementThe element
geometryThe element geometry
gridGeometryThe finite volume grid geometry
elemSolThe primary variables at the dofs of the element
globalPosThe global position
Exceptions
Dune::NotImplemented
Returns
Dune::FieldVector with as many entries as dimension of the PrimaryVariables object (i.e. numEq). Each entry is a GlobalCoordinate object holding the priVar gradient.

◆ evalGradients() [2/2]

template<class Element, class FVElementGeometry, class PrimaryVariables>
auto Dumux::evalGradients ( const Element & element,
const typename Element::Geometry & geometry,
const typename FVElementGeometry::GridGeometry & gridGeometry,
const CVFEElementSolution< FVElementGeometry, PrimaryVariables > & elemSol,
const typename Element::Geometry::GlobalCoordinate & globalPos,
bool ignoreState = false )
Parameters
elementThe element
geometryThe element geometry
gridGeometryThe finite volume grid geometry
elemSolThe primary variables at the dofs of the element
globalPosThe global position
ignoreStateIf true, the state of primary variables is ignored

◆ evalGradientsAtLocalPos()

template<class Element, class FVElementGeometry, class PrimaryVariables>
auto Dumux::evalGradientsAtLocalPos ( const Element & element,
const typename Element::Geometry & geometry,
const typename FVElementGeometry::GridGeometry & gridGeometry,
const CVFEElementSolution< FVElementGeometry, PrimaryVariables > & elemSol,
const typename Element::Geometry::LocalCoordinate & localPos,
bool ignoreState = false )
Parameters
elementThe element
geometryThe element geometry
gridGeometryThe finite volume grid geometry
elemSolThe primary variables at the dofs of the element
localPosThe local position
ignoreStateIf true, the state of primary variables is ignored

◆ evalSolution() [1/4]

template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolution ( const Element & element,
const typename Element::Geometry & geometry,
const CCElementSolution< FVElementGeometry, PrimaryVariables > & elemSol,
const typename Element::Geometry::GlobalCoordinate & globalPos,
bool ignoreState = false )
Returns
the primary variables (constant over the element)
Parameters
elementThe element
geometryThe element geometry
elemSolThe primary variables at the dofs of the element
globalPosThe global position
ignoreStateIf true, the state of primary variables is ignored

◆ evalSolution() [2/4]

template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolution ( const Element & element,
const typename Element::Geometry & geometry,
const CVFEElementSolution< FVElementGeometry, PrimaryVariables > & elemSol,
const typename Element::Geometry::GlobalCoordinate & globalPos,
bool ignoreState = false )

Overload of the above evalSolution() function without a given gridGeometry. The local basis is computed on the fly.

Returns
the interpolated primary variables
Parameters
elementThe element
geometryThe element geometry
elemSolThe primary variables at the dofs of the element
globalPosThe global position
ignoreStateIf true, the state of primary variables is ignored

◆ evalSolution() [3/4]

template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolution ( const Element & element,
const typename Element::Geometry & geometry,
const typename FVElementGeometry::GridGeometry & gridGeometry,
const CCElementSolution< FVElementGeometry, PrimaryVariables > & elemSol,
const typename Element::Geometry::GlobalCoordinate & globalPos,
bool ignoreState = false )
Returns
the primary variables (constant over the element)
Parameters
elementThe element
geometryThe element geometry
gridGeometryThe finite volume grid geometry
elemSolThe primary variables at the dofs of the element
globalPosThe global position
ignoreStateIf true, the state of primary variables is ignored

◆ evalSolution() [4/4]

template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolution ( const Element & element,
const typename Element::Geometry & geometry,
const typename FVElementGeometry::GridGeometry & gridGeometry,
const CVFEElementSolution< FVElementGeometry, PrimaryVariables > & elemSol,
const typename Element::Geometry::GlobalCoordinate & globalPos,
bool ignoreState = false )
Returns
the interpolated primary variables
Parameters
elementThe element
geometryThe element geometry
gridGeometryThe finite volume grid geometry
elemSolThe primary variables at the dofs of the element
globalPosThe global position
ignoreStateIf true, the state of primary variables is ignored

◆ evalSolutionAtLocalPos() [1/2]

template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolutionAtLocalPos ( const Element & element,
const typename Element::Geometry & geometry,
const typename FVElementGeometry::GridGeometry & gridGeometry,
const CCElementSolution< FVElementGeometry, PrimaryVariables > & elemSol,
const typename Element::Geometry::LocalCoordinate & localPos,
bool ignoreState = false )
Returns
the primary variables (constant over the element)
Parameters
elementThe element
geometryThe element geometry
gridGeometryThe finite volume grid geometry
elemSolThe primary variables at the dofs of the element
localPosThe local position
ignoreStateIf true, the state of primary variables is ignored

◆ evalSolutionAtLocalPos() [2/2]

template<class Element, class FVElementGeometry, class PrimaryVariables>
PrimaryVariables Dumux::evalSolutionAtLocalPos ( const Element & element,
const typename Element::Geometry & geometry,
const typename FVElementGeometry::GridGeometry & gridGeometry,
const CVFEElementSolution< FVElementGeometry, PrimaryVariables > & elemSol,
const typename Element::Geometry::LocalCoordinate & localPos,
bool ignoreState = false )
Returns
the interpolated primary variables
Parameters
elementThe element
geometryThe element geometry
gridGeometryThe finite volume grid geometry
elemSolThe primary variables at the dofs of the element
localPosThe local position
ignoreStateIf true, the state of primary variables is ignored

◆ interpolate() [1/2]

template<class GridDiscretization, class CoefficientVector, class Function>
requires (Detail::InterpolatableAtElemDiscIpData<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type> || Detail::InterpolatableAtElemDiscGlobalPos<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type> || Detail::InterpolatableAtGlobalPos<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type>)
void Dumux::CVFE::interpolate ( const GridDiscretization & gridDisc,
CoefficientVector & coeffs,
Function && function,
InterpolationPolicy::DofPositionEvaluation = {} )

Accepts functions callable as function(elemDisc, ipData), function(elemDisc, globalPos), or function(globalPos).

◆ interpolate() [2/2]

template<class GridDiscretization, class CoefficientVector, class Function>
requires (Detail::InterpolatableAtGlobalPos<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type> || Detail::InterpolatableAtElemDiscGlobalPos<typename GridDiscretization::LocalView, Function, typename CoefficientVector::value_type>)
void Dumux::CVFE::interpolate ( const GridDiscretization & gridDisc,
CoefficientVector & coeffs,
Function && function,
InterpolationPolicy::L2Projection policy )

The function must be callable as function(globalPos) or function(elemDisc, globalPos), and is wrapped into a local-function interface for use in L2 projection.

◆ localView()

template<class GridCache>
GridCache::LocalView Dumux::localView ( const GridCache & gridCache)
inline
Note
A local object is only functional after calling its bind/bindElement method.
Template Parameters
GridCachethe grid caching type (such as GridGeometry)
Parameters
gridCachethe grid caching object we want to localView from

◆ makeProjector()

template<class FEBasisDomain, class FEBasisTarget, class GlueType>
auto Dumux::makeProjector ( const FEBasisDomain & feBasisDomain,
const FEBasisTarget & feBasisTarget,
GlueType glue,
std::optional< int > quadratureOrder = {} )
Parameters
feBasisDomainThe domain finite element space basis
feBasisTargetThe target finite element space basis
glueThe glue object containing the intersections between the grids.
quadratureOrderThe order of the quadrature rule on the intersections; by default the one that integrates the products of the shape functions exactly on affine geometries.
Returns
The forward projector from the space with basis feBasisDomain to the space with basis feBasisTarget.

◆ makeProjectorPair()

template<class FEBasisDomain, class FEBasisTarget, class GlueType>
auto Dumux::makeProjectorPair ( const FEBasisDomain & feBasisDomain,
const FEBasisTarget & feBasisTarget,
GlueType glue,
std::optional< int > quadratureOrder = {} )
Parameters
feBasisDomainThe domain finite element space basis
feBasisTargetThe target finite element space basis
glueThe glue object containing the intersections between the grids.
quadratureOrderThe order of the quadrature rule on the intersections; by default the one that integrates the products of the shape functions exactly on affine geometries.
Returns
An std::pair of projectors where the first is the forward projector from the space with basis feBasisDomain to the space with basis feBasisTarget and the second does the backward projection.

◆ scvfUnitNormal()

template<class ElementGeometry, class CornerStorage>
auto Dumux::Detail::scvfUnitNormal ( const ElementGeometry & geo,
const CornerStorage & corners )
inline
Parameters
geothe geometry of the element the sub-control volume face belongs to
cornersthe corners of the sub-control volume face

The face is a codimension-one sub-entity of the element-local dual grid, so its normal is normal to the face and tangential to the element. For a surface grid (dim < dimWorld) the second condition is a restriction: the normal is not the surface normal but lies in the plane of the element. On a line element the face is a point and the normal is the unit tangent of the element. Callers orient the result themselves, since the point pair defining the sign differs between schemes.

◆ usesVariables()

template<class TypeTag>
bool Dumux::Detail::usesVariables ( )
constexpr

This holds for all element discretizations with degrees of freedom without a sub-control volume, and for the others if Properties::Transition::UseVariables is set.