version 3.9.0
Loading...
Searching...
No Matches
Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId > Class Template Reference

Class that handles the coupling between three sub-domains in models where the coupling between the two occurs across the facets of the d- and (d-1)- dimensional domains. More...

#include <dumux/multidomain/facet/couplingmanager.hh>

Inheritance diagram for Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >:

Description

template<class MDTraits, class CouplingMapper, std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
class Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >
Template Parameters
MDTraitsThe multidomain traits containing the types on all sub-domains
CouplingMapperClass containing maps on the coupling between dofs of different grids
bulkDomainIdThe domain id of the d-dimensional bulk problem
facetDomainIdThe domain id of the (d-1)-dimensional problem living on the bulk grid facets
facetDomainIdThe domain id of the (d-2)-dimensional problem living on the bulk grid edges

Public Types

template<std::size_t i, std::size_t j>
using CouplingStencilType
 types used for coupling stencils
 
using SolutionVector = typename MDTraits::SolutionVector
 the type of the solution vector
 

Public Member Functions

void init (std::shared_ptr< Problem< bulkId > > bulkProblem, std::shared_ptr< Problem< facetId > > facetProblem, std::shared_ptr< Problem< edgeId > > edgeProblem, std::shared_ptr< CouplingMapper > couplingMapper, const SolutionVector &curSol)
 Initialize the coupling manager.
 
template<class JacobianPattern >
void extendJacobianPattern (FacetIdType, JacobianPattern &pattern) const
 
template<class FacetLocalAssembler , class JacobianMatrixDiagBlock , class GridVariables >
void evalAdditionalDomainDerivatives (FacetIdType, const FacetLocalAssembler &facetLocalAssembler, const typename FacetLocalAssembler::LocalResidual::ElementResidualVector &origResiduals, JacobianMatrixDiagBlock &A, GridVariables &gridVariables)
 
const CouplingStencilType< bulkId, edgeId > & couplingStencil (BulkIdType domainI, const Element< bulkId > &element, EdgeIdType domainJ) const
 The coupling stencil of the bulk with the edge domain (empty stencil).
 
const CouplingStencilType< edgeId, bulkId > & couplingStencil (EdgeIdType domainI, const Element< edgeId > &element, BulkIdType domainJ) const
 The coupling stencil of the edge with the bulk domain (empty stencil).
 
void updateSolution (const SolutionVector &sol)
 updates the current solution. We have to overload this here to avoid ambiguity and update the solution in both managers
 
template<std::size_t i, std::size_t j, class LocalAssembler , std::enable_if_t<((i==bulkId &&j==edgeId)||((i==edgeId &&j==bulkId))), int > = 0>
LocalAssembler::LocalResidual::ElementResidualVector evalCouplingResidual (Dune::index_constant< i > domainI, const LocalAssembler &localAssembler, Dune::index_constant< j > domainJ, GridIndexType< j > dofIdxGlobalJ)
 Interface for evaluating the coupling residual between the bulk and the edge domain. This is always zero as coupling only occurs between grids of codimension one. These overloads are provided by the two parent classes. However, we need this overload in order for the overload resolution not to fail.
 
template<class Assembler >
void bindCouplingContext (FacetIdType, const Element< facetId > &element, const Assembler &assembler)
 Interface for binding the coupling context for the facet domain. In this case we have to bind both the facet -> bulk and the facet -> edge coupling context.
 
template<class FacetLocalAssembler >
void updateCouplingContext (FacetIdType domainI, const FacetLocalAssembler &facetLocalAssembler, FacetIdType domainJ, GridIndexType< facetId > dofIdxGlobalJ, const PrimaryVariables< facetId > &priVarsJ, unsigned int pvIdxJ)
 Interface for updating the coupling context of the facet domain. In this case we have to update both the facet -> bulk and the facet -> edge coupling context.
 
template<std::size_t i, std::size_t j, class LocalAssembler , std::enable_if_t<((i==bulkId &&j==edgeId)||(i==edgeId &&j==bulkId)), int > = 0>
void updateCouplingContext (Dune::index_constant< i > domainI, const LocalAssembler &localAssembler, Dune::index_constant< j > domainJ, GridIndexType< j > dofIdxGlobalJ, const PrimaryVariables< j > &priVarsJ, unsigned int pvIdxJ)
 Interface for updating the coupling context between the bulk and the edge domain. We do nothing here because coupling only occurs between grids of codimension one. We have to provide this overload as the overload resolution fails otherwise.
 
template<class FacetLocalAssembler , class UpdatableElementVolVars , class UpdatableFluxVarCache >
void updateCoupledVariables (FacetIdType domainI, const FacetLocalAssembler &facetLocalAssembler, UpdatableElementVolVars &elemVolVars, UpdatableFluxVarCache &elemFluxVarsCache)
 Interface for updating the local views of the facet domain after updateCouplingContext the coupling context. In this case we have to forward the both managers as the facet domain is a part in both.
 
template<std::size_t id, std::enable_if_t<(id==bulkId||id==facetId), int > = 0>
const Problem< id > & problem () const
 Return a const reference to bulk or facet problem.
 
template<std::size_t id, std::enable_if_t<(id==bulkId||id==facetId), int > = 0>
Problem< id > & problem ()
 Return a reference to bulk or facet problem.
 
template<std::size_t id, std::enable_if_t<(id==edgeId), int > = 0>
const Problem< id > & problem () const
 Return a const reference to edge problem.
 
template<std::size_t id, std::enable_if_t<(id==edgeId), int > = 0>
Problem< id > & problem ()
 Return a reference to edge problem.
 

Member Typedef Documentation

◆ CouplingStencilType

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<std::size_t i, std::size_t j>
using Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::CouplingStencilType
Initial value:
typename std::conditional< (j == edgeDomainId),
typename FacetEdgeManager::template CouplingStencilType<i, j>,
typename BulkFacetManager::template CouplingStencilType<i, j> >::type
typename std::conditional<(j==edgeDomainId), typename FacetEdgeManager::template CouplingStencilType< i, j >, typename BulkFacetManager::template CouplingStencilType< i, j > >::type CouplingStencilType
types used for coupling stencils
Definition multidomain/facet/couplingmanager.hh:143

◆ SolutionVector

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
using Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::SolutionVector = typename MDTraits::SolutionVector

Member Function Documentation

◆ bindCouplingContext()

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<class Assembler >
void Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::bindCouplingContext ( FacetIdType ,
const Element< facetId > & element,
const Assembler & assembler )
inline

◆ couplingStencil() [1/2]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
const CouplingStencilType< bulkId, edgeId > & Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::couplingStencil ( BulkIdType domainI,
const Element< bulkId > & element,
EdgeIdType domainJ ) const
inline

◆ couplingStencil() [2/2]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
const CouplingStencilType< edgeId, bulkId > & Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::couplingStencil ( EdgeIdType domainI,
const Element< edgeId > & element,
BulkIdType domainJ ) const
inline

◆ evalAdditionalDomainDerivatives()

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<class FacetLocalAssembler , class JacobianMatrixDiagBlock , class GridVariables >
void Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::evalAdditionalDomainDerivatives ( FacetIdType ,
const FacetLocalAssembler & facetLocalAssembler,
const typename FacetLocalAssembler::LocalResidual::ElementResidualVector & origResiduals,
JacobianMatrixDiagBlock & A,
GridVariables & gridVariables )
inline

◆ evalCouplingResidual()

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<std::size_t i, std::size_t j, class LocalAssembler , std::enable_if_t<((i==bulkId &&j==edgeId)||((i==edgeId &&j==bulkId))), int > = 0>
LocalAssembler::LocalResidual::ElementResidualVector Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::evalCouplingResidual ( Dune::index_constant< i > domainI,
const LocalAssembler & localAssembler,
Dune::index_constant< j > domainJ,
GridIndexType< j > dofIdxGlobalJ )
inline

◆ extendJacobianPattern()

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<class JacobianPattern >
void Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::extendJacobianPattern ( FacetIdType ,
JacobianPattern & pattern ) const
inline

◆ init()

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
void Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::init ( std::shared_ptr< Problem< bulkId > > bulkProblem,
std::shared_ptr< Problem< facetId > > facetProblem,
std::shared_ptr< Problem< edgeId > > edgeProblem,
std::shared_ptr< CouplingMapper > couplingMapper,
const SolutionVector & curSol )
inline
Parameters
bulkProblemThe problem to be solved on the (3d) bulk domain
facetProblemThe problem to be solved on the (2d) facet domain
edgeProblemThe problem to be solved on the (1d) edge domain
couplingMapperThe mapper object containing the connectivity between the domains
curSolThe current solution

◆ problem() [1/4]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<std::size_t id, std::enable_if_t<(id==bulkId||id==facetId), int > = 0>
Problem< id > & Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::problem ( )
inline

◆ problem() [2/4]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<std::size_t id, std::enable_if_t<(id==edgeId), int > = 0>
Problem< id > & Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::problem ( )
inline

◆ problem() [3/4]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<std::size_t id, std::enable_if_t<(id==bulkId||id==facetId), int > = 0>
const Problem< id > & Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::problem ( ) const
inline

◆ problem() [4/4]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<std::size_t id, std::enable_if_t<(id==edgeId), int > = 0>
const Problem< id > & Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::problem ( ) const
inline

◆ updateCoupledVariables()

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<class FacetLocalAssembler , class UpdatableElementVolVars , class UpdatableFluxVarCache >
void Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::updateCoupledVariables ( FacetIdType domainI,
const FacetLocalAssembler & facetLocalAssembler,
UpdatableElementVolVars & elemVolVars,
UpdatableFluxVarCache & elemFluxVarsCache )
inline

◆ updateCouplingContext() [1/2]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<std::size_t i, std::size_t j, class LocalAssembler , std::enable_if_t<((i==bulkId &&j==edgeId)||(i==edgeId &&j==bulkId)), int > = 0>
void Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::updateCouplingContext ( Dune::index_constant< i > domainI,
const LocalAssembler & localAssembler,
Dune::index_constant< j > domainJ,
GridIndexType< j > dofIdxGlobalJ,
const PrimaryVariables< j > & priVarsJ,
unsigned int pvIdxJ )
inline

◆ updateCouplingContext() [2/2]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<class FacetLocalAssembler >
void Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::updateCouplingContext ( FacetIdType domainI,
const FacetLocalAssembler & facetLocalAssembler,
FacetIdType domainJ,
GridIndexType< facetId > dofIdxGlobalJ,
const PrimaryVariables< facetId > & priVarsJ,
unsigned int pvIdxJ )
inline

◆ updateSolution()

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
void Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::updateSolution ( const SolutionVector & sol)
inline

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