version 3.10.0
Loading...
Searching...
No Matches
Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true > Class Template Reference

Staggered scheme local assembler using numeric differentiation and implicit time discretization. More...

#include <dumux/multidomain/subdomainstaggeredlocalassembler.hh>

Inheritance diagram for Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >:

Description

template<std::size_t id, class TypeTag, class Assembler>
class Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >

The assembly of the cellCenterResidual is done element-wise, the assembly of the face residual is done half-element-wise.

A sketch of what this means can be found in the following image:

Half-element wise assembly means, that integrals are split into contributions from the left and right part of the staggered control volume. For an example term \(\int_{\Omega}\varrho u\text{d}\Omega\) this reads \(\int_{\Omega}\varrho u\text{d}\Omega = \frac{1}{2}\Omega_\text{left}\varrho_\text{left}u+\frac{1}{2}\Omega_\text{right}\varrho_\text{right}u\).

During assembly, \(\frac{1}{2}\Omega_\text{left}\varrho_\text{left}u\) is added to the residual of the staggered control volume \(\Omega\), when the loops reach the scvf within element \(\Omega_\text{left}\). \(\frac{1}{2}\Omega_\text{right}\varrho_\text{right}u\) is added to the residual of \(\Omega\), when the loops reach the scvf within in element \(\Omega_\text{right}\). Other terms are split analogously.

Public Types

using LocalResidual
using ElementResidualVector

Public Member Functions

CellCenterResidualValue assembleCellCenterResidualImpl ()
FaceResidualValue assembleFaceResidualImpl (const SubControlVolumeFace &scvf)
template<class JacobianMatrixDiagBlock, class GridVariables>
CellCenterResidualValue assembleCellCenterJacobianAndResidualImpl (JacobianMatrixDiagBlock &A, GridVariables &gridVariables)
 Computes the derivatives with respect to the given element and adds them to the global matrix.
template<class JacobianMatrixDiagBlock, class GridVariables>
auto assembleFaceJacobianAndResidualImpl (JacobianMatrixDiagBlock &A, GridVariables &gridVariables)
 Computes the derivatives with respect to the given element and adds them to the global matrix.
template<class JacobianBlock, class GridVariables>
void assembleJacobianCellCenterCoupling (Dune::index_constant< faceId > domainJ, JacobianBlock &A, const CellCenterResidualValue &origResidual, GridVariables &gridVariables)
 Computes the derivatives with respect to the given element and adds them to the global matrix.
template<std::size_t otherId, class JacobianBlock, class GridVariables>
void assembleJacobianCellCenterCoupling (Dune::index_constant< otherId > domainJ, JacobianBlock &A, const CellCenterResidualValue &res, GridVariables &gridVariables)
template<class JacobianBlock, class ElementResidualVector, class GridVariables>
void assembleJacobianFaceCoupling (Dune::index_constant< cellCenterId > domainJ, JacobianBlock &A, const ElementResidualVector &origResiduals, GridVariables &gridVariables)
 Computes the derivatives with respect to the given element and adds them to the global matrix.
template<std::size_t otherId, class JacobianBlock, class ElementResidualVector, class GridVariables>
void assembleJacobianFaceCoupling (Dune::index_constant< otherId > domainJ, JacobianBlock &A, const ElementResidualVector &res, GridVariables &gridVariables)
template<class JacobianMatrixDiagBlock, class GridVariables>
void evalAdditionalDerivatives (const std::vector< std::size_t > &additionalDofDependencies, JacobianMatrixDiagBlock &A, GridVariables &gridVariables)
void bindLocalViews ()
void assembleJacobianAndResidual (JacobianMatrixRow &jacRow, SubResidual &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.
void assembleResidual (SubResidual &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 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 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 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 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.
CouplingManagercouplingManager ()
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 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.
LocalResiduallocalResidual ()
 The local residual for the current element.
ElementBoundaryTypes & elemBcTypes ()
 The element's boundary types.

Static Public Member Functions

template<class SubMatrix, class CCOrFacePrimaryVariables>
static void updateGlobalJacobian_ (SubMatrix &matrix, const int globalI, const int globalJ, const int pvIdx, const CCOrFacePrimaryVariables &partialDeriv)
 Updates the current global Jacobian matrix with the partial derivatives of all equations in regard to the primary variable 'pvIdx' at dof 'col'. Specialization for cc methods.
static constexpr bool isImplicit ()
 Returns true if the assembler considers implicit assembly.

Static Public Attributes

static constexpr auto faceOffset

Protected Member Functions

SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true > & asImp_ ()
VolumeVariables & getVolVarAccess (GridVolumeVariables &gridVolVars, ElementVolumeVariables &elemVolVars, const SubControlVolume &scv)

Member Typedef Documentation

◆ ElementResidualVector

using Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::ElementResidualVector
inherited

◆ LocalResidual

using Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::LocalResidual
inherited

Member Function Documentation

◆ asImp_()

SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true > & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::asImp_ ( )
inlineprotectedinherited

◆ assembleCellCenterJacobianAndResidualImpl()

template<std::size_t id, class TypeTag, class Assembler>
template<class JacobianMatrixDiagBlock, class GridVariables>
CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::assembleCellCenterJacobianAndResidualImpl ( JacobianMatrixDiagBlock & A,
GridVariables & gridVariables )
inline
Returns
The element residual at the current solution.

◆ assembleCellCenterResidualImpl()

template<std::size_t id, class TypeTag, class Assembler>
CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::assembleCellCenterResidualImpl ( )
inline

◆ assembleFaceJacobianAndResidualImpl()

template<std::size_t id, class TypeTag, class Assembler>
template<class JacobianMatrixDiagBlock, class GridVariables>
auto Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::assembleFaceJacobianAndResidualImpl ( JacobianMatrixDiagBlock & A,
GridVariables & gridVariables )
inline
Returns
The element residual at the current solution.

◆ assembleFaceResidualImpl()

template<std::size_t id, class TypeTag, class Assembler>
FaceResidualValue Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::assembleFaceResidualImpl ( const SubControlVolumeFace & scvf)
inline

◆ assembleJacobianAndResidual()

void Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::assembleJacobianAndResidual ( JacobianMatrixRow & jacRow,
SubResidual & res,
GridVariablesTuple & gridVariables )
inlineinherited

◆ assembleJacobianCellCenterCoupling() [1/2]

template<std::size_t id, class TypeTag, class Assembler>
template<class JacobianBlock, class GridVariables>
void Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::assembleJacobianCellCenterCoupling ( Dune::index_constant< faceId > domainJ,
JacobianBlock & A,
const CellCenterResidualValue & origResidual,
GridVariables & gridVariables )
inline

◆ assembleJacobianCellCenterCoupling() [2/2]

template<std::size_t id, class TypeTag, class Assembler>
template<std::size_t otherId, class JacobianBlock, class GridVariables>
void Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::assembleJacobianCellCenterCoupling ( Dune::index_constant< otherId > domainJ,
JacobianBlock & A,
const CellCenterResidualValue & res,
GridVariables & gridVariables )
inline

◆ assembleJacobianFaceCoupling() [1/2]

template<std::size_t id, class TypeTag, class Assembler>
template<class JacobianBlock, class ElementResidualVector, class GridVariables>
void Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::assembleJacobianFaceCoupling ( Dune::index_constant< cellCenterId > domainJ,
JacobianBlock & A,
const ElementResidualVector & origResiduals,
GridVariables & gridVariables )
inline

◆ assembleJacobianFaceCoupling() [2/2]

template<std::size_t id, class TypeTag, class Assembler>
template<std::size_t otherId, class JacobianBlock, class ElementResidualVector, class GridVariables>
void Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::assembleJacobianFaceCoupling ( Dune::index_constant< otherId > domainJ,
JacobianBlock & A,
const ElementResidualVector & res,
GridVariables & gridVariables )
inline

◆ assembler()

const Assembler & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::assembler ( ) const
inlineinherited

◆ assembleResidual()

void Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::assembleResidual ( SubResidual & res)
inlineinherited

◆ bindLocalViews()

void Dumux::SubDomainStaggeredLocalAssemblerImplicitBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true > >::bindLocalViews ( )
inlineinherited

◆ couplingManager()

CouplingManager & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::couplingManager ( )
inlineinherited

◆ curElemFaceVars()

ElementFaceVariables & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::curElemFaceVars ( )
inlineinherited

◆ curElemVolVars()

ElementVolumeVariables & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::curElemVolVars ( )
inlineinherited

◆ curSol()

const SolutionVector & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::curSol ( ) const
inlineinherited

◆ elemBcTypes()

ElementBoundaryTypes & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::elemBcTypes ( )
inlineinherited

◆ element()

const Element & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::element ( ) const
inlineinherited

◆ elementIsGhost()

bool Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::elementIsGhost ( ) const
inlineinherited

◆ elemFluxVarsCache()

ElementFluxVariablesCache & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::elemFluxVarsCache ( )
inlineinherited

◆ enforceInternalDirichletConstraints()

void Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::enforceInternalDirichletConstraints ( const ApplyFunction & applyDirichlet)
inlineinherited

◆ evalAdditionalDerivatives()

template<std::size_t id, class TypeTag, class Assembler>
template<class JacobianMatrixDiagBlock, class GridVariables>
void Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::evalAdditionalDerivatives ( const std::vector< std::size_t > & additionalDofDependencies,
JacobianMatrixDiagBlock & A,
GridVariables & gridVariables )
inline

◆ evalLocalFluxAndSourceResidual()

ElementResidualVector Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::evalLocalFluxAndSourceResidual ( ) const
inlineinherited

◆ evalLocalFluxAndSourceResidualForCellCenter()

CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::evalLocalFluxAndSourceResidualForCellCenter ( ) const
inlineinherited

◆ evalLocalFluxAndSourceResidualForFace()

FaceResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::evalLocalFluxAndSourceResidualForFace ( const SubControlVolumeFace & scvf) const
inlineinherited
Parameters
scvfThe sub control volume face

◆ evalLocalResidual()

ElementResidualVector Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::evalLocalResidual ( ) const
inlineinherited

◆ evalLocalResidualForCellCenter()

CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::evalLocalResidualForCellCenter ( ) const
inlineinherited

◆ evalLocalResidualForFace()

FaceResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::evalLocalResidualForFace ( const SubControlVolumeFace & scvf) const
inlineinherited
Parameters
scvfThe sub control volume face

◆ evalLocalStorageResidual()

ElementResidualVector Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::evalLocalStorageResidual ( ) const
inlineinherited

◆ evalLocalStorageResidualForCellCenter()

CellCenterResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::evalLocalStorageResidualForCellCenter ( ) const
inlineinherited

◆ evalLocalStorageResidualForFace()

FaceResidualValue Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::evalLocalStorageResidualForFace ( const SubControlVolumeFace & scvf) const
inlineinherited
Parameters
scvfThe sub control volume face

◆ fvGeometry()

FVElementGeometry & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::fvGeometry ( )
inlineinherited

◆ getVolVarAccess()

VolumeVariables & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::getVolVarAccess ( GridVolumeVariables & gridVolVars,
ElementVolumeVariables & elemVolVars,
const SubControlVolume & scv )
inlineprotectedinherited

◆ isImplicit()

constexpr bool Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::isImplicit ( )
inlinestaticconstexprinherited

◆ localResidual()

LocalResidual & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::localResidual ( )
inlineinherited

◆ prevElemFaceVars()

ElementFaceVariables & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::prevElemFaceVars ( )
inlineinherited

◆ prevElemVolVars()

ElementVolumeVariables & Dumux::FVLocalAssemblerBase< TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, useImplicitAssembly >::prevElemVolVars ( )
inlineinherited

◆ problem()

const Problem & Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::problem ( ) const
inlineinherited

◆ updateGlobalJacobian_()

template<std::size_t id, class TypeTag, class Assembler>
template<class SubMatrix, class CCOrFacePrimaryVariables>
void Dumux::SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >::updateGlobalJacobian_ ( SubMatrix & matrix,
const int globalI,
const int globalJ,
const int pvIdx,
const CCOrFacePrimaryVariables & partialDeriv )
inlinestatic

Member Data Documentation

◆ faceOffset

auto Dumux::SubDomainStaggeredLocalAssemblerBase< id, TypeTag, Assembler, SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true >, true >::faceOffset
staticconstexprinherited

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