Staggered scheme local assembler using numeric differentiation and implicit time discretization. More...
#include <dumux/multidomain/subdomainstaggeredlocalassembler.hh>
Staggered scheme local assembler using numeric differentiation and implicit time discretization.
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 | ElementResidualVector = typename LocalResidual::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. More... | |
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. More... | |
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. More... | |
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. More... | |
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, 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. More... | |
void | assembleResidual (SubSol &res) |
Assemble the residual only. More... | |
CellCenterResidualValue | evalLocalResidualForCellCenter () const |
Convenience function to evaluate the complete local residual for the current element. Automatically chooses the the appropriate element volume variables. More... | |
CellCenterResidualValue | evalLocalResidualForCellCenter (const ElementVolumeVariables &elemVolVars, const ElementFaceVariables &elemFaceVars) const |
Evaluates the complete local residual for the current cell center. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
FaceResidualValue | evalLocalResidualForFace (const SubControlVolumeFace &scvf, const ElementVolumeVariables &elemVolVars, const ElementFaceVariables &elemFaceVars) const |
Evaluates the complete local residual for the current face. More... | |
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. More... | |
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. More... | |
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. More... | |
const Problem & | problem () const |
ElementFaceVariables & | curElemFaceVars () |
The current element volume variables. More... | |
const ElementFaceVariables & | curElemFaceVars () const |
The current element volume variables. More... | |
ElementFaceVariables & | prevElemFaceVars () |
The element volume variables of the provious time step. More... | |
const ElementFaceVariables & | prevElemFaceVars () const |
The element volume variables of the provious time step. More... | |
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. 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... | |
LocalResidual & | localResidual () |
The local residual for the current element. More... | |
const LocalResidual & | localResidual () 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 | |
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. More... | |
static constexpr bool | isImplicit () |
Returns true if the assembler considers implicit assembly. More... | |
Static Public Attributes | |
static constexpr auto | faceOffset |
Protected Member Functions | |
SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true > & | asImp_ () |
const SubDomainStaggeredLocalAssembler< id, TypeTag, Assembler, DiffMethod::numeric, true > & | asImp_ () const |
VolumeVariables & | getVolVarAccess (GridVolumeVariables &gridVolVars, ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) |
VolumeVariables & | getVolVarAccess (GridVolumeVariables &gridVolVars, ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) |
|
inherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inline |
Computes the derivatives with respect to the given element and adds them to the global matrix.
|
inline |
|
inline |
Computes the derivatives with respect to the given element and adds them to the global matrix.
|
inline |
|
inlineinherited |
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.
|
inline |
Computes the derivatives with respect to the given element and adds them to the global matrix.
|
inline |
|
inline |
Computes the derivatives with respect to the given element and adds them to the global matrix.
|
inline |
|
inlineinherited |
The assembler.
|
inlineinherited |
Assemble the residual only.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
The current element volume variables.
|
inlineinherited |
The current element volume variables.
|
inlineinherited |
The current element volume variables.
|
inlineinherited |
The current element volume variables.
|
inlineinherited |
The current solution.
|
inlineinherited |
The element's boundary types.
|
inlineinherited |
The element's boundary types.
|
inlineinherited |
The current element.
|
inlineinherited |
Returns if element is a ghost entity.
|
inlineinherited |
The element flux variables cache.
|
inlineinherited |
The element flux variables cache.
|
inlineinherited |
Enforces Dirichlet constraints if enabled in the problem.
|
inlineinherited |
|
inline |
|
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.
|
inlineinherited |
Evaluates the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element.
elemVolVars | The element volume variables |
|
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 and face variables.
|
inlineinherited |
Evaluates the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current element.
elemVolVars | The element volume variables |
elemFaceVars | The element face variables |
|
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 and face variables.
scvf | The sub control volume face |
|
inlineinherited |
Evaluates the flux and source terms (i.e, the terms without a time derivative) of the local residual for the current face.
scvf | The sub control volume face |
elemVolVars | The element volume variables |
elemFaceVars | The element face variables |
|
inlineinherited |
Convenience function to evaluate the complete local residual for the current element. Automatically chooses the the appropriate element volume variables.
|
inlineinherited |
Evaluates the complete local residual for the current element.
elemVolVars | The element volume variables |
|
inlineinherited |
Convenience function to evaluate the complete local residual for the current element. Automatically chooses the the appropriate element volume variables.
|
inlineinherited |
Evaluates the complete local residual for the current cell center.
elemVolVars | The element volume variables |
elemFaceVars | The element face variables |
|
inlineinherited |
Convenience function to evaluate the local residual for the current face. Automatically chooses the the appropriate element volume and face variables.
scvf | The sub control volume face |
|
inlineinherited |
Evaluates the complete local residual for the current face.
scvf | The sub control volume face |
elemVolVars | The element volume variables |
elemFaceVars | The element face variables |
|
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.
|
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 and face variables.
|
inlineinherited |
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.
scvf | The sub control volume face |
|
inlineinherited |
The global finite volume geometry.
|
inlineinherited |
The finite volume geometry.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlinestaticconstexprinherited |
Returns true if the assembler considers implicit assembly.
|
inlineinherited |
The local residual for the current element.
|
inlineinherited |
The local residual for the current element.
|
inlineinherited |
The element volume variables of the provious time step.
|
inlineinherited |
The element volume variables of the provious time step.
|
inlineinherited |
The element volume variables of the provious time step.
|
inlineinherited |
The element volume variables of the provious time step.
|
inlineinherited |
|
inlinestatic |
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.
|
staticconstexprinherited |