3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | List of all members
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 >:
Inheritance graph

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 >

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.

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 = typename std::conditional<(j==edgeDomainId), typename FacetEdgeManager::template CouplingStencilType< i, j >, typename BulkFacetManager::template CouplingStencilType< i, j > >::type
 types used for coupling stencils More...
 
using SolutionVector = typename MDTraits::SolutionVector
 the type of the solution vector More...
 

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. More...
 
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)
 
template<class GetTensor , bool mpfa = usesMpfa(bulkId), std::enable_if_t< mpfa, int > = 0>
auto getLowDimTensor (const Element< bulkId > &element, const SubControlVolumeFace< bulkId > &scvf, const GetTensor &getT) const
 
template<class GetTensor , bool mpfa = usesMpfa(facetId), std::enable_if_t< mpfa, int > = 0>
auto getLowDimTensor (const Element< facetId > &element, const SubControlVolumeFace< facetId > &scvf, const GetTensor &getT) const
 
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). More...
 
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). More...
 
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 More...
 
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>
LocalResidual< i >::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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<std::size_t id, std::enable_if_t<(id==edgeId), int > = 0>
Problem< id > & problem ()
 Return a reference to edge problem. More...
 

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 = typename std::conditional< (j == edgeDomainId), typename FacetEdgeManager::template CouplingStencilType<i, j>, typename BulkFacetManager::template CouplingStencilType<i, j> >::type

types used for coupling stencils

◆ 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

the type of the solution vector

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

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.

◆ 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

The coupling stencil of the bulk with the edge domain (empty stencil).

◆ 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

The coupling stencil of the edge with the bulk domain (empty stencil).

◆ 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>
LocalResidual< i >::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

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.

◆ 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

◆ getLowDimTensor() [1/2]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<class GetTensor , bool mpfa = usesMpfa(bulkId), std::enable_if_t< mpfa, int > = 0>
auto Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::getLowDimTensor ( const Element< bulkId > &  element,
const SubControlVolumeFace< bulkId > &  scvf,
const GetTensor &  getT 
) const
inline

◆ getLowDimTensor() [2/2]

template<class MDTraits , class CouplingMapper , std::size_t bulkDomainId = 0, std::size_t facetDomainId = 1, std::size_t edgeDomainId = 2>
template<class GetTensor , bool mpfa = usesMpfa(facetId), std::enable_if_t< mpfa, int > = 0>
auto Dumux::FacetCouplingThreeDomainManager< MDTraits, CouplingMapper, bulkDomainId, facetDomainId, edgeDomainId >::getLowDimTensor ( const Element< facetId > &  element,
const SubControlVolumeFace< facetId > &  scvf,
const GetTensor &  getT 
) 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

Initialize the coupling manager.

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

Return a reference to bulk or facet problem.

◆ 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

Return a reference to edge problem.

◆ 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

Return a const reference to bulk or facet problem.

◆ 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

Return a const reference to edge problem.

◆ 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

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.

◆ 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

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.

◆ 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

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.

◆ 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

updates the current solution. We have to overload this here to avoid ambiguity and update the solution in both managers


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