3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit > Class Template Reference

A base class for all multidomain local assemblers (staggered). More...

#include <dumux/multidomain/subdomainstaggeredlocalassembler.hh>

Inheritance diagram for Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >:
Inheritance graph

Description

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
class Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >

A base class for all multidomain local assemblers (staggered).

Template Parameters
idthe id of the sub domain
TypeTagthe TypeTag
Assemblerthe assembler type
Implementationthe actual assembler implementation
implicitwhether the assembly is explicit or implicit in time

Public Types

using ElementResidualVector

Public Member Functions

 SubDomainStaggeredLocalAssemblerBase (const Assembler &assembler, const Element &element, const SolutionVector &curSol, CouplingManager &couplingManager)
template<class JacobianMatrixRow, class SubSol, class GridVariablesTuple>
void assembleJacobianAndResidual (JacobianMatrixRow &jacRow, SubSol &res, GridVariablesTuple &gridVariables)
 Computes the derivatives with respect to the given element and adds them to the global matrix. The element residual is written into the right hand side.
template<class SubSol>
void assembleResidual (SubSol &res)
 Assemble the residual only.
CellCenterResidualValue evalLocalResidualForCellCenter () const
 Convenience function to evaluate the complete local residual for the current element. Automatically chooses the the appropriate element volume variables.
CellCenterResidualValue evalLocalResidualForCellCenter (const ElementVolumeVariables &elemVolVars, const ElementFaceVariables &elemFaceVars) const
 Evaluates the complete local residual for the current cell center.
CellCenterResidualValue evalLocalFluxAndSourceResidualForCellCenter () const
 Convenience function to evaluate the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume and face variables.
CellCenterResidualValue evalLocalFluxAndSourceResidualForCellCenter (const ElementVolumeVariables &elemVolVars, const ElementFaceVariables &elemFaceVars) const
 Evaluates the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element.
CellCenterResidualValue evalLocalStorageResidualForCellCenter () const
 Convenience function to evaluate storage term (i.e, the term with a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume and face variables.
FaceResidualValue evalLocalResidualForFace (const SubControlVolumeFace &scvf) const
 Convenience function to evaluate the local residual for the current face. Automatically chooses the the appropriate element volume and face variables.
FaceResidualValue evalLocalResidualForFace (const SubControlVolumeFace &scvf, const ElementVolumeVariables &elemVolVars, const ElementFaceVariables &elemFaceVars) const
 Evaluates the complete local residual for the current face.
FaceResidualValue evalLocalFluxAndSourceResidualForFace (const SubControlVolumeFace &scvf) const
 Convenience function to evaluate the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume and face variables.
FaceResidualValue evalLocalFluxAndSourceResidualForFace (const SubControlVolumeFace &scvf, const ElementVolumeVariables &elemVolVars, const ElementFaceVariables &elemFaceVars) const
 Evaluates the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current face.
FaceResidualValue evalLocalStorageResidualForFace (const SubControlVolumeFace &scvf) const
 Convenience function to evaluate storage term (i.e, the term with a time derivative) of the local residual for the current face. Automatically chooses the the appropriate element volume and face variables.
const Problem & problem () const
ElementFaceVariables & curElemFaceVars ()
 The current element volume variables.
ElementFaceVariables & prevElemFaceVars ()
 The element volume variables of the provious time step.
const ElementFaceVariables & curElemFaceVars () const
 The current element volume variables.
const ElementFaceVariables & prevElemFaceVars () const
 The element volume variables of the provious time step.
CouplingManager & couplingManager ()
ElementResidualVector evalLocalResidual () const
 Convenience function to evaluate the complete local residual for the current element. Automatically chooses the the appropriate element volume variables.
ElementResidualVector evalLocalFluxAndSourceResidual () const
 Convenience function to evaluate the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume variables.
ElementResidualVector evalLocalStorageResidual () const
 Convenience function to evaluate storage term (i.e, the term with a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume variables.
void bindLocalViews ()
 Convenience function bind and prepare all relevant variables required for the evaluation of the local residual.
void enforceInternalDirichletConstraints (const ApplyFunction &applyDirichlet)
 Enforces Dirichlet constraints if enabled in the problem.
const Assembler & assembler () const
 The assembler.
const Element & element () const
 The current element.
bool elementIsGhost () const
 Returns if element is a ghost entity.
const SolutionVector & curSol () const
 The current solution.
FVElementGeometry & fvGeometry ()
 The global finite volume geometry.
ElementVolumeVariables & curElemVolVars ()
 The current element volume variables.
ElementVolumeVariables & prevElemVolVars ()
 The element volume variables of the provious time step.
ElementFluxVariablesCache & elemFluxVarsCache ()
 The element flux variables cache.
LocalResidual & localResidual ()
 The local residual for the current element.
ElementBoundaryTypes & elemBcTypes ()
 The element's boundary types.

Static Public Member Functions

static constexpr bool isImplicit ()
 Returns true if the assembler considers implicit assembly.

Static Public Attributes

static constexpr auto domainId = typename Dune::index_constant<id>()
static constexpr auto cellCenterId = GridGeometry::cellCenterIdx()
static constexpr auto faceId = GridGeometry::faceIdx()
static constexpr auto numEqCellCenter = CellCenterResidualValue::dimension
static constexpr auto faceOffset = numEqCellCenter

Protected Member Functions

Implementation & asImp_ ()
VolumeVariables & getVolVarAccess (GridVolumeVariables &gridVolVars, ElementVolumeVariables &elemVolVars, const SubControlVolume &scv)

Member Typedef Documentation

◆ ElementResidualVector

using Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::ElementResidualVector
inherited

Constructor & Destructor Documentation

◆ SubDomainStaggeredLocalAssemblerBase()

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::SubDomainStaggeredLocalAssemblerBase ( const Assembler & assembler,
const Element & element,
const SolutionVector & curSol,
CouplingManager & couplingManager )
inlineexplicit

Member Function Documentation

◆ asImp_()

Implementation & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::asImp_ ( )
inlineprotectedinherited

◆ assembleJacobianAndResidual()

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
template<class JacobianMatrixRow, class SubSol, class GridVariablesTuple>
void Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::assembleJacobianAndResidual ( JacobianMatrixRow & jacRow,
SubSol & res,
GridVariablesTuple & gridVariables )
inline

Computes the derivatives with respect to the given element and adds them to the global matrix. The element residual is written into the right hand side.

◆ assembler()

const Assembler & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::assembler ( ) const
inlineinherited

The assembler.

◆ assembleResidual()

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
template<class SubSol>
void Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::assembleResidual ( SubSol & res)
inline

Assemble the residual only.

◆ bindLocalViews()

void Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::bindLocalViews ( )
inlineinherited

Convenience function bind and prepare all relevant variables required for the evaluation of the local residual.

◆ couplingManager()

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
CouplingManager & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::couplingManager ( )
inline

◆ curElemFaceVars() [1/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
ElementFaceVariables & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::curElemFaceVars ( )
inline

The current element volume variables.

◆ curElemFaceVars() [2/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
const ElementFaceVariables & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::curElemFaceVars ( ) const
inline

The current element volume variables.

◆ curElemVolVars()

ElementVolumeVariables & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::curElemVolVars ( )
inlineinherited

The current element volume variables.

◆ curSol()

const SolutionVector & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::curSol ( ) const
inlineinherited

The current solution.

◆ elemBcTypes()

ElementBoundaryTypes & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::elemBcTypes ( )
inlineinherited

The element's boundary types.

◆ element()

const Element & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::element ( ) const
inlineinherited

The current element.

◆ elementIsGhost()

bool Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::elementIsGhost ( ) const
inlineinherited

Returns if element is a ghost entity.

◆ elemFluxVarsCache()

ElementFluxVariablesCache & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::elemFluxVarsCache ( )
inlineinherited

The element flux variables cache.

◆ enforceInternalDirichletConstraints()

void Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::enforceInternalDirichletConstraints ( const ApplyFunction & applyDirichlet)
inlineinherited

Enforces Dirichlet constraints if enabled in the problem.

◆ evalLocalFluxAndSourceResidual()

ElementResidualVector Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::evalLocalFluxAndSourceResidual ( ) const
inlineinherited

Convenience function to evaluate the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume variables.

◆ evalLocalFluxAndSourceResidualForCellCenter() [1/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalFluxAndSourceResidualForCellCenter ( ) const
inline

Convenience function to evaluate the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume and face variables.

◆ evalLocalFluxAndSourceResidualForCellCenter() [2/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalFluxAndSourceResidualForCellCenter ( const ElementVolumeVariables & elemVolVars,
const ElementFaceVariables & elemFaceVars ) const
inline

Evaluates the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element.

Parameters
elemVolVarsThe element volume variables
elemFaceVarsThe element face variables

◆ evalLocalFluxAndSourceResidualForFace() [1/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
FaceResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalFluxAndSourceResidualForFace ( const SubControlVolumeFace & scvf) const
inline

Convenience function to evaluate the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume and face variables.

Parameters
scvfThe sub control volume face

◆ evalLocalFluxAndSourceResidualForFace() [2/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
FaceResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalFluxAndSourceResidualForFace ( const SubControlVolumeFace & scvf,
const ElementVolumeVariables & elemVolVars,
const ElementFaceVariables & elemFaceVars ) const
inline

Evaluates the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current face.

Parameters
scvfThe sub control volume face
elemVolVarsThe element volume variables
elemFaceVarsThe element face variables

◆ evalLocalResidual()

ElementResidualVector Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::evalLocalResidual ( ) const
inlineinherited

Convenience function to evaluate the complete local residual for the current element. Automatically chooses the the appropriate element volume variables.

◆ evalLocalResidualForCellCenter() [1/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalResidualForCellCenter ( ) const
inline

Convenience function to evaluate the complete local residual for the current element. Automatically chooses the the appropriate element volume variables.

◆ evalLocalResidualForCellCenter() [2/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalResidualForCellCenter ( const ElementVolumeVariables & elemVolVars,
const ElementFaceVariables & elemFaceVars ) const
inline

Evaluates the complete local residual for the current cell center.

Parameters
elemVolVarsThe element volume variables
elemFaceVarsThe element face variables

◆ evalLocalResidualForFace() [1/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
FaceResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalResidualForFace ( const SubControlVolumeFace & scvf) const
inline

Convenience function to evaluate the local residual for the current face. Automatically chooses the the appropriate element volume and face variables.

Parameters
scvfThe sub control volume face

◆ evalLocalResidualForFace() [2/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
FaceResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalResidualForFace ( const SubControlVolumeFace & scvf,
const ElementVolumeVariables & elemVolVars,
const ElementFaceVariables & elemFaceVars ) const
inline

Evaluates the complete local residual for the current face.

Parameters
scvfThe sub control volume face
elemVolVarsThe element volume variables
elemFaceVarsThe element face variables

◆ evalLocalStorageResidual()

ElementResidualVector Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::evalLocalStorageResidual ( ) const
inlineinherited

Convenience function to evaluate storage term (i.e, the term with a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume variables.

◆ evalLocalStorageResidualForCellCenter()

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalStorageResidualForCellCenter ( ) const
inline

Convenience function to evaluate storage term (i.e, the term with a time derivative) of the local residual for the current element. Automatically chooses the the appropriate element volume and face variables.

◆ evalLocalStorageResidualForFace()

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
FaceResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::evalLocalStorageResidualForFace ( const SubControlVolumeFace & scvf) const
inline

Convenience function to evaluate storage term (i.e, the term with a time derivative) of the local residual for the current face. Automatically chooses the the appropriate element volume and face variables.

Parameters
scvfThe sub control volume face

◆ fvGeometry()

FVElementGeometry & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::fvGeometry ( )
inlineinherited

The global finite volume geometry.

◆ getVolVarAccess()

VolumeVariables & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::getVolVarAccess ( GridVolumeVariables & gridVolVars,
ElementVolumeVariables & elemVolVars,
const SubControlVolume & scv )
inlineprotectedinherited

◆ isImplicit()

constexpr bool Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::isImplicit ( )
inlinestaticconstexprinherited

Returns true if the assembler considers implicit assembly.

◆ localResidual()

LocalResidual & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::localResidual ( )
inlineinherited

The local residual for the current element.

◆ prevElemFaceVars() [1/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
ElementFaceVariables & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::prevElemFaceVars ( )
inline

The element volume variables of the provious time step.

◆ prevElemFaceVars() [2/2]

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
const ElementFaceVariables & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::prevElemFaceVars ( ) const
inline

The element volume variables of the provious time step.

◆ prevElemVolVars()

ElementVolumeVariables & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::prevElemVolVars ( )
inlineinherited

The element volume variables of the provious time step.

◆ problem()

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
const Problem & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::problem ( ) const
inline

Member Data Documentation

◆ cellCenterId

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
auto Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::cellCenterId = GridGeometry::cellCenterIdx()
staticconstexpr

◆ domainId

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
auto Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::domainId = typename Dune::index_constant<id>()
staticconstexpr

◆ faceId

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
auto Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::faceId = GridGeometry::faceIdx()
staticconstexpr

◆ faceOffset

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
auto Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::faceOffset = numEqCellCenter
staticconstexpr

◆ numEqCellCenter

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool isImplicit = true>
auto Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, Implementation, isImplicit >::numEqCellCenter = CellCenterResidualValue::dimension
staticconstexpr

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