Coupling manager for Stokes and Darcy domains with equal dimension. More...
#include <dumux/multidomain/boundary/stokesdarcy/couplingmanager.hh>

Coupling manager for Stokes and Darcy domains with equal dimension.
Public Types | |
| using | CouplingData = StokesDarcyCouplingData<MDTraits, StokesDarcyCouplingManager<MDTraits>> |
| using | Traits = MDTraits |
| using | CouplingStencilType |
| default type used for coupling element stencils | |
Public Member Functions | |
| StokesDarcyCouplingManager (std::shared_ptr< const GridGeometry< stokesIdx > > stokesFvGridGeometry, std::shared_ptr< const GridGeometry< darcyIdx > > darcyFvGridGeometry) | |
| Constructor. | |
| void | init (std::shared_ptr< const Problem< stokesIdx > > stokesProblem, std::shared_ptr< const Problem< darcyIdx > > darcyProblem, const SolutionVector &curSol) |
| Methods to be accessed by main. | |
| void | update () |
| Update after the grid has changed. | |
| void | updateSolution (const SolutionVector &curSol) |
| Update the solution vector before assembly. | |
| void | computeStencils () |
| Prepare the coupling stencils. | |
| template<std::size_t i, class Assembler, std::enable_if_t<(i==stokesCellCenterIdx||i==stokesFaceIdx), int > = 0> | |
| void | bindCouplingContext (Dune::index_constant< i > domainI, const Element< stokesCellCenterIdx > &element, const Assembler &assembler) const |
| prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Darcy information) | |
| template<std::size_t i, std::enable_if_t<(i==stokesCellCenterIdx||i==stokesFaceIdx), int > = 0> | |
| void | bindCouplingContext (Dune::index_constant< i > domainI, const Element< stokesCellCenterIdx > &element) const |
| prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Darcy information) | |
| template<class Assembler> | |
| void | bindCouplingContext (Dune::index_constant< darcyIdx > domainI, const Element< darcyIdx > &element, const Assembler &assembler) const |
| prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Stokes information) | |
| void | bindCouplingContext (Dune::index_constant< darcyIdx > domainI, const Element< darcyIdx > &element) const |
| prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Stokes information) | |
| template<class LocalAssemblerI> | |
| void | updateCouplingContext (Dune::index_constant< darcyIdx > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< darcyIdx > domainJ, std::size_t dofIdxGlobalJ, const PrimaryVariables< darcyIdx > &priVarsJ, int pvIdxJ) |
| Update the coupling context for the Darcy residual w.r.t. Darcy DOFs. | |
| template<class LocalAssemblerI> | |
| void | updateCouplingContext (Dune::index_constant< darcyIdx > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< stokesCellCenterIdx > domainJ, const std::size_t dofIdxGlobalJ, const PrimaryVariables< stokesCellCenterIdx > &priVars, int pvIdxJ) |
| Update the coupling context for the Darcy residual w.r.t. the Stokes cell-center DOFs (DarcyToCC). | |
| template<class LocalAssemblerI> | |
| void | updateCouplingContext (Dune::index_constant< darcyIdx > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< stokesFaceIdx > domainJ, const std::size_t dofIdxGlobalJ, const PrimaryVariables< stokesFaceIdx > &priVars, int pvIdxJ) |
| Update the coupling context for the Darcy residual w.r.t. the Stokes face DOFs (DarcyToFace). | |
| template<std::size_t i, class LocalAssemblerI, std::enable_if_t<(i==stokesCellCenterIdx||i==stokesFaceIdx), int > = 0> | |
| void | updateCouplingContext (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< darcyIdx > domainJ, const std::size_t dofIdxGlobalJ, const PrimaryVariables< darcyIdx > &priVars, int pvIdxJ) |
| Update the coupling context for the Stokes cc residual w.r.t. the Darcy DOFs (FaceToDarcy). | |
| const auto & | couplingData () const |
| Access the coupling data. | |
| const auto & | stokesCouplingContext (const Element< stokesIdx > &element, const SubControlVolumeFace< stokesIdx > &scvf) const |
| Access the coupling context needed for the Stokes domain. | |
| const auto & | darcyCouplingContext (const Element< darcyIdx > &element, const SubControlVolumeFace< darcyIdx > &scvf) const |
| Access the coupling context needed for the Darcy domain. | |
| const CouplingStencil & | couplingStencil (Dune::index_constant< stokesCellCenterIdx > domainI, const Element< stokesIdx > &element, Dune::index_constant< darcyIdx > domainJ) const |
| The coupling stencils. | |
| template<std::size_t i, std::size_t j> | |
| const CouplingStencil & | couplingStencil (Dune::index_constant< i > domainI, const Element< i > &element, Dune::index_constant< j > domainJ) const |
| The coupling stencil of domain I, i.e. which domain J DOFs the given domain I element's residual depends on. | |
| const CouplingStencil & | couplingStencil (Dune::index_constant< darcyIdx > domainI, const Element< darcyIdx > &element, Dune::index_constant< stokesCellCenterIdx > domainJ) const |
| The coupling stencil of domain I, i.e. which domain J dofs the given domain I element's residual depends on. | |
| const CouplingStencil & | couplingStencil (Dune::index_constant< darcyIdx > domainI, const Element< darcyIdx > &element, Dune::index_constant< stokesFaceIdx > domainJ) const |
| The coupling stencil of domain I, i.e. which domain J dofs the given domain I element's residual depends on. | |
| template<std::size_t i, std::size_t j> | |
| const CouplingStencil & | couplingStencil (Dune::index_constant< i > domainI, const SubControlVolumeFace< stokesIdx > &scvf, Dune::index_constant< j > domainJ) const |
| The coupling stencil of domain I, i.e. which domain J DOFs the given domain I element's residual depends on. | |
| const CouplingStencil & | couplingStencil (Dune::index_constant< stokesFaceIdx > domainI, const SubControlVolumeFace< stokesIdx > &scvf, Dune::index_constant< darcyIdx > domainJ) const |
| The coupling stencil of a Stokes face w.r.t. Darcy DOFs. | |
| template<class IdType> | |
| const std::vector< std::size_t > & | getAdditionalDofDependencies (IdType id, std::size_t stokesElementIdx) const |
| There are no additional dof dependencies. | |
| template<class IdType> | |
| const std::vector< std::size_t > & | getAdditionalDofDependenciesInverse (IdType id, std::size_t darcyElementIdx) const |
| There are no additional dof dependencies. | |
| bool | isCoupledEntity (Dune::index_constant< stokesIdx >, const SubControlVolumeFace< stokesFaceIdx > &scvf) const |
| Returns whether a given free flow scvf is coupled to the other domain. | |
| bool | isCoupledEntity (Dune::index_constant< darcyIdx >, const SubControlVolumeFace< darcyIdx > &scvf) const |
| Returns whether a given free flow scvf is coupled to the other domain. | |
| 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 | |
| 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 | |
| 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 | |
| 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 | |
| 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 |
| Methods to be accessed by the assembly. | |
| 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 |
| Methods to be accessed by the assembly. | |
| 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 | |
| template<std::size_t i, typename std::enable_if_t<(GridGeometry< i >::discMethod !=DiscretizationMethod::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. | |
| template<std::size_t i, typename std::enable_if_t<(GridGeometry< i >::discMethod==DiscretizationMethod::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. | |
member functions concerning the coupling stencils | |
| 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 | |
Static Public Attributes | |
| static constexpr auto | stokesFaceIdx = typename MDTraits::template SubDomain<0>::Index() |
| static constexpr auto | stokesCellCenterIdx = typename MDTraits::template SubDomain<1>::Index() |
| static constexpr auto | stokesIdx = stokesFaceIdx |
| static constexpr auto | darcyIdx = typename MDTraits::template SubDomain<2>::Index() |
| static constexpr auto | cellCenterIdx = GridGeometry<0>::cellCenterIdx() |
| static constexpr auto | faceIdx = GridGeometry<0>::faceIdx() |
Protected Member Functions | |
| std::vector< std::size_t > & | emptyStencil () |
| Return a reference to an empty stencil. | |
| void | removeDuplicates_ (std::vector< std::size_t > &stencil) |
member functions concerning variable caching for element residual evaluations | |
| 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 | |
| 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 | |
| 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 | |
| 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) | |
| void | setSubProblems (const std::tuple< std::shared_ptr< SubProblems >... > &problems) |
| set the pointers to the sub problems | |
| void | setSubProblem (std::shared_ptr< SubProblem > problem, Dune::index_constant< i > domainIdx) |
| set a pointer to one of the sub problems | |
| const Problem< i > & | problem (Dune::index_constant< i > domainIdx) const |
| Return a reference to the sub problem. | |
| SolutionVector & | curSol () |
| the solution vector of the coupled problem | |
| const SolutionVector & | curSol () const |
| the solution vector of the coupled problem | |
| using Dumux::StokesDarcyCouplingManager< MDTraits >::CouplingData = StokesDarcyCouplingData<MDTraits, StokesDarcyCouplingManager<MDTraits>> |
|
inherited |
default type used for coupling element stencils
|
inherited |
|
inline |
Constructor.
|
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 |
prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Stokes information)
|
inline |
prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Stokes information)
|
inline |
prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Darcy information)
|
inline |
prepares all data and variables that are necessary to evaluate the residual of an Darcy element (i.e. Darcy information)
|
inline |
Prepare the coupling stencils.
|
inline |
Access the coupling data.
|
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 |
The coupling stencil of domain I, i.e. which domain J dofs the given domain I element's residual depends on.
|
inline |
The coupling stencil of domain I, i.e. which domain J dofs the given domain I element's residual depends on.
|
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 |
|
inline |
The coupling stencil of domain I, i.e. which domain J DOFs the given domain I element's residual depends on.
|
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 |
|
inline |
The coupling stencil of domain I, i.e. which domain J DOFs the given domain I element's residual depends on.
|
inline |
The coupling stencils.
The Stokes cell center coupling stencil w.r.t. Darcy DOFs
|
inline |
The coupling stencil of a Stokes face w.r.t. Darcy DOFs.
|
inlineprotectedinherited |
the solution vector of the coupled problem
|
inlineprotectedinherited |
the solution vector of the coupled problem
|
inline |
Access the coupling context needed for the Darcy domain.
|
inlineprotected |
Return a reference to an empty stencil.
|
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)
|
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 |
|
inline |
Methods to be accessed by the assembly.
|
inline |
Methods to be accessed by the assembly.
|
inlineinherited |
extend the jacobian pattern of the diagonal block of domain i by those entries that are not already in the uncoupled pattern
|
inline |
There are no additional dof dependencies.
|
inline |
There are no additional dof dependencies.
|
inline |
Methods to be accessed by main.
Initialize the coupling manager
|
inline |
Returns whether a given free flow scvf is coupled to the other domain.
|
inline |
Returns whether a given free flow scvf is coupled to the other domain.
|
inlineinherited |
return the numeric epsilon used for deflecting primary variables of coupled domain i.
|
inlineinherited |
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 |
|
inlineprotected |
|
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 |
|
inline |
Access the coupling context needed for the Stokes domain.
|
inline |
Update after the grid has changed.
|
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 |
|
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 |
|
inline |
Update the coupling context for the Darcy residual w.r.t. Darcy DOFs.
|
inline |
Update the coupling context for the Darcy residual w.r.t. the Stokes cell-center DOFs (DarcyToCC).
|
inline |
Update the coupling context for the Darcy residual w.r.t. the Stokes face DOFs (DarcyToFace).
|
inline |
Update the coupling context for the Stokes cc residual w.r.t. the Darcy DOFs (FaceToDarcy).
|
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 |
|
inline |
Update the solution vector before assembly.
|
staticconstexprinherited |
|
staticconstexpr |
|
staticconstexprinherited |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |