Base coupling manager for the staggered discretization. More...
#include <dumux/multidomain/staggeredcouplingmanager.hh>
Base coupling manager for the staggered discretization.
Public Types | |
using | Traits = MDTraits |
using | CouplingStencilType = std::vector< std::size_t > |
default type used for coupling element stencils More... | |
using | SolutionVector = typename Traits::SolutionVector |
the type of the solution vector More... | |
Public Member Functions | |
template<std::size_t i, std::size_t j, class LocalAssemblerI , class PriVarsJ > | |
void | updateCouplingContext (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, const std::size_t dofIdxGlobalJ, const PriVarsJ &priVarsJ, int pvIdxJ) |
updates all data and variables that are necessary to evaluate the residual of the element of domain i this is called whenever one of the primary variables that the element residual depends on changes in domain j More... | |
const CouplingStencil & | couplingStencil (Dune::index_constant< cellCenterIdx > domainI, const Element &elementI, Dune::index_constant< faceIdx > domainJ) const |
returns an iteratable container of all indices of degrees of freedom of domain j that couple with / influence the element residual of the given element of domain i More... | |
template<std::size_t i, std::size_t j> | |
const CouplingStencil | couplingStencil (Dune::index_constant< i > domainI, const SubControlVolumeFace &scvfI, Dune::index_constant< j > domainJ) const |
returns an iteratable container of all indices of degrees of freedom of domain j that couple with / influence the residual of the given subcontrolvolume face of domain i More... | |
const CouplingStencil & | couplingStencil (Dune::index_constant< faceIdx > domainI, const SubControlVolumeFace &scvfI, Dune::index_constant< cellCenterIdx > domainJ) const |
returns an iteratable container of all indices of degrees of freedom of domain j that couple with / influence the residual of the given subcontrolvolume face of domain i More... | |
template<class LocalAssemblerI , std::size_t j> | |
decltype(auto) | evalCouplingResidual (Dune::index_constant< cellCenterIdx > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) const |
evaluates the element residual of a coupled element of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j More... | |
template<class LocalAssemblerI , std::size_t j> | |
decltype(auto) | evalCouplingResidual (Dune::index_constant< faceIdx > domainI, const SubControlVolumeFace &scvfI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) const |
evaluates the face residual of a coupled face of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j More... | |
template<std::size_t i, typename std::enable_if_t<(GridGeometry< i >::discMethod !=DiscretizationMethods::staggered), int > = 0> | |
decltype(auto) | numericEpsilon (Dune::index_constant< i > id, const std::string ¶mGroup) const |
return the numeric epsilon used for deflecting primary variables of coupled domain i. More... | |
template<std::size_t i, typename std::enable_if_t<(GridGeometry< i >::discMethod==DiscretizationMethods::staggered), int > = 0> | |
decltype(auto) | numericEpsilon (Dune::index_constant< i >, const std::string ¶mGroup) const |
return the numeric epsilon used for deflecting primary variables of coupled domain i. More... | |
member functions concerning the coupling stencils | |
const CouplingStencilType< i, j > & | couplingStencil (Dune::index_constant< i > domainI, const Element< i > &elementI, Dune::index_constant< j > domainJ) const |
returns an iteratable container of all indices of degrees of freedom of domain j that couple with / influence the element residual of the given element of domain i More... | |
void | extendJacobianPattern (Dune::index_constant< id > domainI, JacobianPattern &pattern) const |
extend the jacobian pattern of the diagonal block of domain i by those entries that are not already in the uncoupled pattern More... | |
Static Public Attributes | |
static constexpr auto | cellCenterIdx = GridGeometry<0>::cellCenterIdx() |
static constexpr auto | faceIdx = GridGeometry<0>::faceIdx() |
Protected Types | |
using | SolutionVectorStorage = typename Traits::template TupleOfSharedPtr< SubSolutionVector > |
the type in which the solution vector is stored in the manager More... | |
member functions concerning variable caching for element residual evaluations | |
void | bindCouplingContext (Dune::index_constant< i > domainI, const Element< i > &elementI, const Assembler &assembler) |
prepares all data and variables that are necessary to evaluate the residual of the element of domain i More... | |
void | updateCouplingContext (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ, const PrimaryVariables< j > &priVarsJ, int pvIdxJ) |
updates all data and variables that are necessary to evaluate the residual of the element of domain i this is called whenever one of the primary variables that the element residual depends on changes in domain j More... | |
void | updateCoupledVariables (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, UpdatableElementVolVars &elemVolVars, UpdatableFluxVarCache &elemFluxVarsCache) |
update variables of domain i that depend on variables in domain j after the coupling context has been updated More... | |
void | updateSolution (const SolutionVector &curSol) |
Updates the entire solution vector, e.g. before assembly or after grid adaption Overload might want to overload function if the solution vector is stored outside this class to make sure updates don't happen more than once. More... | |
decltype(auto) | evalCouplingResidual (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) const |
evaluates the element residual of a coupled element of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j More... | |
void | evalAdditionalDomainDerivatives (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, const typename LocalAssemblerI::LocalResidual::ElementResidualVector &origResiduals, JacobianMatrixDiagBlock &A, GridVariables &gridVariables) |
evaluate additional derivatives of the element residual of a domain with respect to dofs in the same domain that are not in the regular stencil (see CouplingManager::extendJacobianPattern) More... | |
void | setSubProblems (const std::tuple< std::shared_ptr< SubProblems >... > &problems) |
set the pointers to the sub problems More... | |
void | setSubProblem (std::shared_ptr< SubProblem > problem, Dune::index_constant< i > domainIdx) |
set a pointer to one of the sub problems More... | |
const Problem< i > & | problem (Dune::index_constant< i > domainIdx) const |
Return a reference to the sub problem. More... | |
void | attachSolution (SolutionVectorStorage &curSol) |
Attach a solution vector stored outside of this class. More... | |
SubSolutionVector< i > & | curSol (Dune::index_constant< i > domainIdx) |
the solution vector of the subproblem More... | |
const SubSolutionVector< i > & | curSol (Dune::index_constant< i > domainIdx) const |
the solution vector of the subproblem More... | |
decltype(auto) | curSol () |
the solution vector of the coupled problem More... | |
decltype(auto) | curSol () const |
the solution vector of the coupled problem More... | |
|
inherited |
default type used for coupling element stencils
|
inherited |
the type of the solution vector
|
protectedinherited |
the type in which the solution vector is stored in the manager
using Dumux::StaggeredCouplingManager< MDTraits >::Traits = MDTraits |
|
inlineprotectedinherited |
Attach a solution vector stored outside of this class.
|
inlineinherited |
prepares all data and variables that are necessary to evaluate the residual of the element of domain i
domainI | the domain index of domain i |
elementI | the element whose residual we are assemling next |
assembler | the multidomain assembler for access to all data necessary for the assembly of all domains |
|
inline |
returns an iteratable container of all indices of degrees of freedom of domain j that couple with / influence the element residual of the given element of domain i
domainI | the domain index of domain i |
elementI | the coupled element of domain í |
domainJ | the domain index of domain j |
|
inline |
returns an iteratable container of all indices of degrees of freedom of domain j that couple with / influence the residual of the given subcontrolvolume face of domain i
domainI | the domain index of domain i |
scvfI | the coupled subcontrolvolume face of domain í |
domainJ | the domain index of domain j |
|
inlineinherited |
returns an iteratable container of all indices of degrees of freedom of domain j that couple with / influence the element residual of the given element of domain i
domainI | the domain index of domain i |
elementI | the coupled element of domain í |
domainJ | the domain index of domain j |
|
inline |
returns an iteratable container of all indices of degrees of freedom of domain j that couple with / influence the residual of the given subcontrolvolume face of domain i
domainI | the domain index of domain i |
scvfI | the coupled subcontrolvolume face of domain í |
domainJ | the domain index of domain j |
|
inlineprotectedinherited |
the solution vector of the coupled problem
|
inlineprotectedinherited |
the solution vector of the coupled problem
|
inlineprotectedinherited |
the solution vector of the subproblem
domainIdx | The domain index |
|
inlineprotectedinherited |
the solution vector of the subproblem
domainIdx | The domain index |
|
inlineinherited |
evaluate additional derivatives of the element residual of a domain with respect to dofs in the same domain that are not in the regular stencil (see CouplingManager::extendJacobianPattern)
|
inline |
evaluates the element residual of a coupled element of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j
domainI | the domain index of domain i |
localAssemblerI | the local assembler assembling the element residual of an element of domain i |
domainJ | the domain index of domain j |
dofIdxGlobalJ | the index of the degree of freedom of domain j which has an influence on the element residual of domain i |
|
inlineinherited |
evaluates the element residual of a coupled element of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j
domainI | the domain index of domain i |
localAssemblerI | the local assembler assembling the element residual of an element of domain i |
domainJ | the domain index of domain j |
dofIdxGlobalJ | the index of the degree of freedom of domain j which has an influence on the element residual of domain i |
|
inlineinherited |
extend the jacobian pattern of the diagonal block of domain i by those entries that are not already in the uncoupled pattern
|
inline |
return the numeric epsilon used for deflecting primary variables of coupled domain i.
|
inline |
return the numeric epsilon used for deflecting primary variables of coupled domain i.
|
inlineinherited |
Return a reference to the sub problem.
domainIdx | The domain index We avoid exception handling here because the performance of this function is critical |
|
inlineinherited |
set a pointer to one of the sub problems
problem | a pointer to the sub problem |
domainIdx | the domain index of the sub problem |
|
inlineinherited |
set the pointers to the sub problems
problems | A tuple of shared pointers to the sub problems |
|
inlineinherited |
update variables of domain i that depend on variables in domain j after the coupling context has been updated
domainI | the index of domain i |
localAssemblerI | the local assembler assembling the element residual of an element of domain i |
elemVolVars | the element volume variables (all volume variables in the element local stencil) to be updated |
elemFluxVarsCache | the element flux variable cache (all flux variables in the element local stencil) to be updated |
|
inline |
updates all data and variables that are necessary to evaluate the residual of the element of domain i this is called whenever one of the primary variables that the element residual depends on changes in domain j
domainI | the domain index of domain i |
localAssemblerI | the local assembler assembling the element residual of an element of domain i |
domainJ | the domain index of domain j |
dofIdxGlobalJ | the index of the degree of freedom of domain j whose solution changed |
priVarsJ | the new solution at the degree of freedom of domain j with index dofIdxGlobalJ |
pvIdxJ | the index of the primary variable of domain j which has been updated |
|
inlineinherited |
updates all data and variables that are necessary to evaluate the residual of the element of domain i this is called whenever one of the primary variables that the element residual depends on changes in domain j
domainI | the domain index of domain i |
localAssemblerI | the local assembler assembling the element residual of an element of domain i |
domainJ | the domain index of domain j |
dofIdxGlobalJ | the index of the degree of freedom of domain j whose solution changed |
priVarsJ | the new solution at the degree of freedom of domain j with index dofIdxGlobalJ |
pvIdxJ | the index of the primary variable of domain j which has been updated |
|
inlineinherited |
Updates the entire solution vector, e.g. before assembly or after grid adaption Overload might want to overload function if the solution vector is stored outside this class to make sure updates don't happen more than once.
|
staticconstexpr |
|
staticconstexpr |