3.2-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 | Protected Member Functions | List of all members
Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit > Class Template Reference

A base class for all box local assemblers. More...

#include <dumux/multidomain/subdomainboxlocalassembler.hh>

Inheritance diagram for Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >:
Inheritance graph

Description

template<std::size_t id, class TypeTag, class Assembler, class Implementation, bool implicit>
class Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >

A base class for all box local assemblers.

Template Parameters
idthe id of the sub domain
TypeTagthe TypeTag
Assemblerthe assembler type
Implementationthe actual implementation type
implicitSpecifies whether the time discretization is implicit or not not (i.e. explicit)

Public Types

using LocalResidual = GetPropType< TypeTag, Properties::LocalResidual >
 

Public Member Functions

 SubDomainBoxLocalAssemblerBase (const Assembler &assembler, const Element &element, const SolutionVector &curSol, CouplingManager &couplingManager)
 
template<class JacobianMatrixRow , class GridVariablesTuple >
void assembleJacobianAndResidual (JacobianMatrixRow &jacRow, SubSolutionVector &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. More...
 
template<std::size_t otherId, class JacRow , class GridVariables , typename std::enable_if_t<(otherId==id), int > = 0>
void assembleJacobianCoupling (Dune::index_constant< otherId > domainJ, JacRow &jacRow, const ElementResidualVector &res, GridVariables &gridVariables)
 Assemble the entries in a coupling block of the jacobian. There is no coupling block between a domain and itself. More...
 
template<std::size_t otherId, class JacRow , class GridVariables , typename std::enable_if_t<(otherId !=id), int > = 0>
void assembleJacobianCoupling (Dune::index_constant< otherId > domainJ, JacRow &jacRow, const ElementResidualVector &res, GridVariables &gridVariables)
 Assemble the entries in a coupling block of the jacobian. More...
 
void assembleResidual (SubSolutionVector &res)
 Assemble the residual vector entries only. More...
 
ElementResidualVector evalLocalSourceResidual (const Element &element, const ElementVolumeVariables &elemVolVars) const
 Evaluates the local source term for an element and given element volume variables. More...
 
ElementResidualVector evalLocalSourceResidual (const Element &neighbor) const
 Evaluates the local source term depending on time discretization scheme. More...
 
template<typename ApplyFunction >
void enforceDirichletConstraints (const ApplyFunction &applyDirichlet)
 Enforce Dirichlet constraints. More...
 
template<typename ApplyDirichletFunctionType >
void evalDirichletBoundaries (ApplyDirichletFunctionType applyDirichlet)
 Incorporate Dirichlet boundary conditions. More...
 
void bindLocalViews ()
 Prepares all local views necessary for local assembly. More...
 
const Problem & problem () const
 return reference to the underlying problem More...
 
CouplingManager & couplingManager ()
 return reference to the coupling manager More...
 
ElementResidualVector evalLocalResidual () const
 Convenience function to evaluate the complete local residual for the current element. Automatically chooses the the appropriate element volume variables. More...
 
ElementResidualVector evalLocalResidual (const ElementVolumeVariables &elemVolVars) const
 Evaluates the complete local residual for the current element. More...
 
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. More...
 
ElementResidualVector evalLocalFluxAndSourceResidual (const ElementVolumeVariables &elemVolVars) const
 Evaluates the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element. More...
 
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. More...
 
void enforceInternalDirichletConstraints (const ApplyFunction &applyDirichlet)
 Enforces Dirichlet constraints if enabled in the problem. More...
 
void enforceInternalDirichletConstraints (const ApplyFunction &applyDirichlet)
 
const Assembler & assembler () const
 The assembler. More...
 
const Element & element () const
 The current element. More...
 
bool elementIsGhost () const
 Returns if element is a ghost entity. More...
 
const SolutionVector & curSol () const
 The current solution. More...
 
FVElementGeometry & fvGeometry ()
 The global finite volume geometry. More...
 
const FVElementGeometry & fvGeometry () const
 The finite volume geometry. More...
 
ElementVolumeVariables & curElemVolVars ()
 The current element volume variables. More...
 
const ElementVolumeVariables & curElemVolVars () const
 The current element volume variables. More...
 
ElementVolumeVariables & prevElemVolVars ()
 The element volume variables of the provious time step. More...
 
const ElementVolumeVariables & prevElemVolVars () const
 The element volume variables of the provious time step. More...
 
ElementFluxVariablesCache & elemFluxVarsCache ()
 The element flux variables cache. More...
 
const ElementFluxVariablesCache & elemFluxVarsCache () const
 The element flux variables cache. More...
 
LocalResiduallocalResidual ()
 The local residual for the current element. More...
 
const LocalResiduallocalResidual () const
 The local residual for the current element. More...
 
ElementBoundaryTypes & elemBcTypes ()
 The element's boundary types. More...
 
const ElementBoundaryTypes & elemBcTypes () const
 The element's boundary types. More...
 

Static Public Member Functions

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

Static Public Attributes

static constexpr auto domainId = typename Dune::index_constant<id>()
 export the domain id of this sub-domain More...
 

Protected Member Functions

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

Member Typedef Documentation

◆ LocalResidual

using Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>
inherited

Constructor & Destructor Documentation

◆ SubDomainBoxLocalAssemblerBase()

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

Member Function Documentation

◆ asImp_() [1/2]

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

◆ asImp_() [2/2]

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

◆ assembleJacobianAndResidual()

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
template<class JacobianMatrixRow , class GridVariablesTuple >
void Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::assembleJacobianAndResidual ( JacobianMatrixRow &  jacRow,
SubSolutionVector &  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.

◆ assembleJacobianCoupling() [1/2]

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
template<std::size_t otherId, class JacRow , class GridVariables , typename std::enable_if_t<(otherId==id), int > = 0>
void Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::assembleJacobianCoupling ( Dune::index_constant< otherId >  domainJ,
JacRow &  jacRow,
const ElementResidualVector &  res,
GridVariables &  gridVariables 
)
inline

Assemble the entries in a coupling block of the jacobian. There is no coupling block between a domain and itself.

◆ assembleJacobianCoupling() [2/2]

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
template<std::size_t otherId, class JacRow , class GridVariables , typename std::enable_if_t<(otherId !=id), int > = 0>
void Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::assembleJacobianCoupling ( Dune::index_constant< otherId >  domainJ,
JacRow &  jacRow,
const ElementResidualVector &  res,
GridVariables &  gridVariables 
)
inline

Assemble the entries in a coupling block of the jacobian.

◆ 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 implicit>
void Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::assembleResidual ( SubSolutionVector &  res)
inline

Assemble the residual vector entries only.

◆ bindLocalViews()

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
void Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::bindLocalViews ( )
inline

Prepares all local views necessary for local assembly.

◆ couplingManager()

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
CouplingManager & Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::couplingManager ( )
inline

return reference to the coupling manager

◆ curElemVolVars() [1/2]

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

The current element volume variables.

◆ curElemVolVars() [2/2]

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

The current element volume variables.

◆ curSol()

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

The current solution.

◆ elemBcTypes() [1/2]

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

The element's boundary types.

◆ elemBcTypes() [2/2]

const ElementBoundaryTypes & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::elemBcTypes ( ) const
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() [1/2]

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

The element flux variables cache.

◆ elemFluxVarsCache() [2/2]

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

The element flux variables cache.

◆ enforceDirichletConstraints()

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
template<typename ApplyFunction >
void Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::enforceDirichletConstraints ( const ApplyFunction &  applyDirichlet)
inline

Enforce Dirichlet constraints.

◆ enforceInternalDirichletConstraints() [1/2]

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

Enforces Dirichlet constraints if enabled in the problem.

◆ enforceInternalDirichletConstraints() [2/2]

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

◆ evalDirichletBoundaries()

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
template<typename ApplyDirichletFunctionType >
void Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::evalDirichletBoundaries ( ApplyDirichletFunctionType  applyDirichlet)
inline

Incorporate Dirichlet boundary conditions.

Parameters
applyDirichletLambda function for the BC incorporation on an scv

◆ evalLocalFluxAndSourceResidual() [1/2]

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.

◆ evalLocalFluxAndSourceResidual() [2/2]

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

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

◆ evalLocalResidual() [1/2]

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.

◆ evalLocalResidual() [2/2]

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

Evaluates the complete local residual for the current element.

Parameters
elemVolVarsThe element volume variables

◆ evalLocalSourceResidual() [1/2]

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
ElementResidualVector Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::evalLocalSourceResidual ( const Element &  element,
const ElementVolumeVariables &  elemVolVars 
) const
inline

Evaluates the local source term for an element and given element volume variables.

◆ evalLocalSourceResidual() [2/2]

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
ElementResidualVector Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::evalLocalSourceResidual ( const Element &  neighbor) const
inline

Evaluates the local source term depending on time discretization scheme.

◆ 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.

◆ fvGeometry() [1/2]

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

The global finite volume geometry.

◆ fvGeometry() [2/2]

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

The finite volume geometry.

◆ getVolVarAccess() [1/2]

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

◆ getVolVarAccess() [2/2]

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

◆ isImplicit()

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

Returns true if the assembler considers implicit assembly.

◆ localResidual() [1/2]

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

The local residual for the current element.

◆ localResidual() [2/2]

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

The local residual for the current element.

◆ prevElemVolVars() [1/2]

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

The element volume variables of the provious time step.

◆ prevElemVolVars() [2/2]

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

The element volume variables of the provious time step.

◆ problem()

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
const Problem & Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::problem ( ) const
inline

return reference to the underlying problem

Member Data Documentation

◆ domainId

template<std::size_t id, class TypeTag , class Assembler , class Implementation , bool implicit>
constexpr auto Dumux::SubDomainBoxLocalAssemblerBase< id, TypeTag, Assembler, Implementation, implicit >::domainId = typename Dune::index_constant<id>()
staticconstexpr

export the domain id of this sub-domain


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