3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Protected Member Functions | List of all members
Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs > Class Template Reference

Coupling manager that combines an arbitrary number of binary coupling manager (coupling two domains each) More...

#include <dumux/multidomain/multibinarycouplingmanager.hh>

Inheritance diagram for Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >:

Description

template<class MDTraits, class CouplingMap, class ... CouplingMgrs>
class Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >

Coupling manager that combines an arbitrary number of binary coupling manager (coupling two domains each)

Template Parameters
MDTraitsthe multidomain traits
CouplingMapa coupling policy class
CouplingMgrsthe binary sub-coupling manager types

The coupling policy has to provide the interfaces

Public Types

template<std::size_t i, std::size_t j>
using SubCouplingManager = SubCouplingManagerT< couplingManagerMap_[i][j]>
 

Public Member Functions

 MultiBinaryCouplingManager ()
 
template<std::size_t i, std::size_t j>
auto & subCouplingManager (Dune::index_constant< i > domainI, Dune::index_constant< j > domainJ)
 return the binary sub-coupling manager More...
 
template<std::size_t i, std::size_t j>
const auto & subCouplingManager (Dune::index_constant< i > domainI, Dune::index_constant< j > domainJ) const
 return the binary sub-coupling manager More...
 
template<std::size_t i, std::size_t j, class Apply >
decltype(auto) subApply (Dune::index_constant< i > domainI, Dune::index_constant< j > domainJ, Apply &&apply)
 apply a function to the domainI-domainJ sub coupling manager using its local indices More...
 
template<std::size_t i, std::size_t j, class Apply >
decltype(auto) subApply (Dune::index_constant< i > domainI, Dune::index_constant< j > domainJ, const Apply &apply) const
 apply a function to the domainI-domainJ sub coupling manager using its local indices More...
 
template<std::size_t i, class Apply >
decltype(auto) subApply (Dune::index_constant< i > domainI, Apply &&apply)
 apply a function to a sub coupling manager containing this domain More...
 
template<std::size_t i, class Apply >
decltype(auto) subApply (Dune::index_constant< i > domainI, const Apply &apply) const
 apply a function to a sub coupling manager containing this domain More...
 
void updateSolution (const typename MDTraits::SolutionVector &curSol)
 Update the solution vector before assembly. More...
 
template<std::size_t id, class JacobianPattern >
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...
 
template<std::size_t i, class Entity , std::size_t j>
const auto & couplingStencil (Dune::index_constant< i > domainI, const Entity &entity, Dune::index_constant< j > domainJ) const
 Return the coupling element stencil for a given bulk domain element. More...
 
template<std::size_t i, class LocalAssemblerI , std::size_t j>
decltype(auto) evalCouplingResidual (Dune::index_constant< i > domainI, const SubControlVolumeFace< i > &scvfI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) const
 
template<std::size_t i, class LocalAssemblerI , std::size_t j>
decltype(auto) evalCouplingResidual (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) const
 
template<std::size_t i, class LocalAssemblerI , std::size_t j>
decltype(auto) evalCouplingResidual (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, const SubControlVolume< i > &scvI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ) const
 
template<std::size_t i, class LocalAssemblerI , std::size_t j, class PrimaryVariables >
void updateCouplingContext (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, const std::size_t dofIdxGlobalJ, const PrimaryVariables &priVars, int pvIdxJ)
 Update the coupling context for the bulk face residual w.r.t to the lowDim dofs. More...
 
template<std::size_t i, class Assembler = int>
void bindCouplingContext (Dune::index_constant< i > domainI, const Element< i > &element, const Assembler &assembler=0)
 Bind the coupling context for a low dim element TODO remove Assembler. More...
 
template<std::size_t i>
decltype(auto) numericEpsilon (Dune::index_constant< i > domainI, const std::string &paramGroup) const
 return the numeric epsilon used for deflecting primary variables of coupled domain i. More...
 
template<std::size_t i, class LocalAssemblerI , class JacobianMatrixDiagBlock , class GridVariables >
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...
 
template<std::size_t i, class LocalAssemblerI , class UpdatableElementVolVars , class UpdatableFluxVarCache >
void updateCoupledVariables (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, UpdatableElementVolVars &elemVolVars, UpdatableFluxVarCache &elemFluxVarsCache)
 

Protected Member Functions

SolutionVectors & curSol ()
 
const SolutionVectors & curSol () const
 

Member Typedef Documentation

◆ SubCouplingManager

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, std::size_t j>
using Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::SubCouplingManager = SubCouplingManagerT<couplingManagerMap_[i][j]>

Constructor & Destructor Documentation

◆ MultiBinaryCouplingManager()

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::MultiBinaryCouplingManager ( )
inline

Member Function Documentation

◆ bindCouplingContext()

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class Assembler = int>
void Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::bindCouplingContext ( Dune::index_constant< i >  domainI,
const Element< i > &  element,
const Assembler &  assembler = 0 
)
inline

Bind the coupling context for a low dim element TODO remove Assembler.

◆ couplingStencil()

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class Entity , std::size_t j>
const auto & Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::couplingStencil ( Dune::index_constant< i >  domainI,
const Entity &  entity,
Dune::index_constant< j >  domainJ 
) const
inline

Return the coupling element stencil for a given bulk domain element.

◆ curSol() [1/2]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
SolutionVectors & Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::curSol ( )
inlineprotected

◆ curSol() [2/2]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
const SolutionVectors & Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::curSol ( ) const
inlineprotected

◆ evalAdditionalDomainDerivatives()

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class LocalAssemblerI , class JacobianMatrixDiagBlock , class GridVariables >
void Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::evalAdditionalDomainDerivatives ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
const typename LocalAssemblerI::LocalResidual::ElementResidualVector &  origResiduals,
JacobianMatrixDiagBlock &  A,
GridVariables &  gridVariables 
)
inline

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)

Note
Such additional dependencies can arise from the coupling, e.g. if a coupling source term depends on a non-local average of a quantity of the same domain

◆ evalCouplingResidual() [1/3]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class LocalAssemblerI , std::size_t j>
decltype(auto) Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::evalCouplingResidual ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
const SubControlVolume< i > &  scvI,
Dune::index_constant< j >  domainJ,
std::size_t  dofIdxGlobalJ 
) const
inline

evaluate coupling residual for the derivative low dim DOF with respect to bulk DOF we only need to evaluate the part of the residual that will be influence by the bulk DOF

◆ evalCouplingResidual() [2/3]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class LocalAssemblerI , std::size_t j>
decltype(auto) Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::evalCouplingResidual ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
Dune::index_constant< j >  domainJ,
std::size_t  dofIdxGlobalJ 
) const
inline

evaluate coupling residual for the derivative low dim DOF with respect to bulk DOF we only need to evaluate the part of the residual that will be influence by the bulk DOF

◆ evalCouplingResidual() [3/3]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class LocalAssemblerI , std::size_t j>
decltype(auto) Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::evalCouplingResidual ( Dune::index_constant< i >  domainI,
const SubControlVolumeFace< i > &  scvfI,
const LocalAssemblerI &  localAssemblerI,
Dune::index_constant< j >  domainJ,
std::size_t  dofIdxGlobalJ 
) const
inline

◆ extendJacobianPattern()

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t id, class JacobianPattern >
void Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::extendJacobianPattern ( Dune::index_constant< id >  domainI,
JacobianPattern &  pattern 
) const
inline

extend the jacobian pattern of the diagonal block of domain i by those entries that are not already in the uncoupled pattern

Note
per default we do not add such additional dependencies
Such additional dependencies can arise from the coupling, e.g. if a coupling source term depends on a non-local average of a quantity of the same domain
Warning List:
if you overload this also implement evalAdditionalDomainDerivatives

◆ numericEpsilon()

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i>
decltype(auto) Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::numericEpsilon ( Dune::index_constant< i >  domainI,
const std::string &  paramGroup 
) const
inline

return the numeric epsilon used for deflecting primary variables of coupled domain i.

Note
specialization for free-flow schemes

◆ subApply() [1/4]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class Apply >
decltype(auto) Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::subApply ( Dune::index_constant< i >  domainI,
Apply &&  apply 
)
inline

apply a function to a sub coupling manager containing this domain

◆ subApply() [2/4]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class Apply >
decltype(auto) Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::subApply ( Dune::index_constant< i >  domainI,
const Apply &  apply 
) const
inline

apply a function to a sub coupling manager containing this domain

◆ subApply() [3/4]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, std::size_t j, class Apply >
decltype(auto) Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::subApply ( Dune::index_constant< i >  domainI,
Dune::index_constant< j >  domainJ,
Apply &&  apply 
)
inline

apply a function to the domainI-domainJ sub coupling manager using its local indices

◆ subApply() [4/4]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, std::size_t j, class Apply >
decltype(auto) Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::subApply ( Dune::index_constant< i >  domainI,
Dune::index_constant< j >  domainJ,
const Apply &  apply 
) const
inline

apply a function to the domainI-domainJ sub coupling manager using its local indices

◆ subCouplingManager() [1/2]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, std::size_t j>
auto & Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::subCouplingManager ( Dune::index_constant< i >  domainI,
Dune::index_constant< j >  domainJ 
)
inline

return the binary sub-coupling manager

◆ subCouplingManager() [2/2]

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, std::size_t j>
const auto & Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::subCouplingManager ( Dune::index_constant< i >  domainI,
Dune::index_constant< j >  domainJ 
) const
inline

return the binary sub-coupling manager

◆ updateCoupledVariables()

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class LocalAssemblerI , class UpdatableElementVolVars , class UpdatableFluxVarCache >
void Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::updateCoupledVariables ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
UpdatableElementVolVars &  elemVolVars,
UpdatableFluxVarCache &  elemFluxVarsCache 
)
inline

◆ updateCouplingContext()

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
template<std::size_t i, class LocalAssemblerI , std::size_t j, class PrimaryVariables >
void Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::updateCouplingContext ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
Dune::index_constant< j >  domainJ,
const std::size_t  dofIdxGlobalJ,
const PrimaryVariables &  priVars,
int  pvIdxJ 
)
inline

Update the coupling context for the bulk face residual w.r.t to the lowDim dofs.

◆ updateSolution()

template<class MDTraits , class CouplingMap , class ... CouplingMgrs>
void Dumux::MultiBinaryCouplingManager< MDTraits, CouplingMap, CouplingMgrs >::updateSolution ( const typename MDTraits::SolutionVector &  curSol)
inline

Update the solution vector before assembly.


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