version 3.9-dev
Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits > Class Template Reference

Coupling manager for dual network approach for pore network models. More...

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

Inheritance diagram for Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >:

Description

template<class MDTraits>
class Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >
Note
Concept and algorithms described in Koch et al (2021) https://doi.org/10.1007/s11242-021-01602-5

Public Types

using MultiDomainTraits = MDTraits
 export traits More...
 
using CouplingStencils = std::unordered_map< std::size_t, CouplingStencil >
 export stencil types More...
 
using CouplingStencilType = std::vector< std::size_t >
 default type used for coupling element stencils More...
 

Public Member Functions

template<class HostGridView , class HostGridData , class VoidGridView , class SolidGridView >
void init (std::shared_ptr< Problem< solidDomainIdx > > solidProblem, std::shared_ptr< Problem< voidDomainIdx > > voidProblem, const HostGridView &hostGridView, const HostGridData &hostGridData, const VoidGridView &voidGridView, const SolidGridView &solidGridView, const SolutionVector &curSol)
 Methods to be accessed by main. More...
 
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
 Methods to be accessed by the assembly. More...
 
template<std::size_t i>
bool isCoupledPore (Dune::index_constant< i > domainI, const std::size_t dofIdx) const
 Returns whether a given solid grain/void pore body is coupled to the other domain. More...
 
template<std::size_t i>
Scalar conductionSource (Dune::index_constant< i > domainI, const Element< i > &element, const FVElementGeometry< i > &fvGeometry, const ElementVolumeVariables< i > &elemVolVars, const SubControlVolume< i > &scv) const
 Returns summed conductive flux between void and solid for one void pore body or one solid grain. More...
 
template<class Connection , class Context >
Scalar convectiveHeatFluxForOneConnection (const Connection &connection, const Context &context) const
 
template<std::size_t i>
Scalar convectionSource (Dune::index_constant< i > domainI, const Element< i > &element, const FVElementGeometry< i > &fvGeometry, const ElementVolumeVariables< i > &elemVolVars, const SubControlVolume< i > &scv) const
 Returns summed conductive heat fluxes for one void pore body coupled to solid grains (or the other way around) that occur due to convection in void throats. More...
 
template<std::size_t i, std::size_t j>
Scalar sourceWithFixedTransmissibility (Dune::index_constant< i > domainI, const Element< i > &element, const FVElementGeometry< i > &fvGeometry, const ElementVolumeVariables< i > &elemVolVars, const SubControlVolume< i > &scv, Dune::index_constant< j > domainJ) const
 
template<std::size_t i, class Connection >
Scalar getConnectionTransmissiblity (Dune::index_constant< i > domainI, const Connection &connection, const ElementVolumeVariables< i > &elemVolVars, const SubControlVolume< i > &scv) const
 
template<std::size_t i>
VolumeVariables< i > volVars (Dune::index_constant< i > domainI, const Element< i > &element, const SubControlVolume< i > &scv) const
 Return the volume variables of domain i for a given element and scv. More...
 
template<std::size_t i, std::size_t j, class LocalAssemblerI >
decltype(auto) evalCouplingResidual (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, std::size_t dofIdxGlobalJ)
 
template<std::size_t i, class Assembler = int>
void bindCouplingContext (Dune::index_constant< i > domainI, const Element< i > &element, const Assembler &assembler=0) const
 Bind the coupling context for a low dim element TODO remove Assembler. More...
 
template<std::size_t i, class LocalAssemblerI , std::size_t j, class PriVars >
void updateCouplingContext (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, Dune::index_constant< j > domainJ, const std::size_t dofIdxGlobalJ, const PriVars &priVars, int pvIdxJ)
 Update the coupling context. More...
 
const auto & couplingContext () const
 
template<std::size_t i>
const auto & gridGeometry (Dune::index_constant< i > domainI) const
 
const CouplingMappercouplingMapper () const
 
void setGridVariables (GridVariablesTuple &&gridVariables)
 set the pointers to the grid variables More...
 
template<class GridVariables , std::size_t i>
void setGridVariables (std::shared_ptr< GridVariables > gridVariables, Dune::index_constant< i > domainIdx)
 set a pointer to one of the grid variables More...
 
template<std::size_t i>
const GridVariables< i > & gridVariables (Dune::index_constant< i > domainIdx) const
 Return a reference to the grid variables of a sub problem. 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 LocalAssemblerI , class JacobianMatrixDiagBlock , class GridVariables >
void evalAdditionalDomainDerivatives (Dune::index_constant< i > domainI, const LocalAssemblerI &localAssemblerI, const typename LocalAssemblerI::LocalResidual::ElementResidualVector &, 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 (per default this is not the case) More...
 
std::vector< std::size_t > & emptyStencil ()
 Return a reference to an empty stencil. More...
 
template<std::size_t i>
const std::vector< std::size_t > & emptyStencil (Dune::index_constant< i > domainI) const
 Return a reference to an empty stencil. More...
 
template<std::size_t i>
const auto & gridView (Dune::index_constant< i > domainI) const
 
void setupExtendedStencil ()
 

Static Public Attributes

static constexpr auto solidDomainIdx = typename MDTraits::template SubDomain<0>::Index()
 
static constexpr auto voidDomainIdx = typename MDTraits::template SubDomain<1>::Index()
 

Protected Types

using SolutionVectorStorage = typename Traits::template TupleOfSharedPtr< SubSolutionVector >
 the type in which the solution vector is stored in the manager More...
 

Protected Member Functions

template<std::size_t i>
VolumeVariables< i > & getVolVarAccess_ (Dune::index_constant< i > domainIdx, GridVolumeVariables< i > &gridVolVars, ElementVolumeVariables< i > &elemVolVars, const SubControlVolume< i > &scv)
 
template<std::size_t i>
GridVariables< i > & gridVars_ (Dune::index_constant< i > domainIdx)
 Return a reference to the grid variables of a sub problem. More...
 
void removeDuplicates_ (std::vector< std::size_t > &stencil)
 Removes duplicate entries from the coupling stencils. More...
 

Protected Attributes

bool convectiveHeatTransfer_
 
std::vector< std::size_t > emptyStencil_
 
std::unique_ptr< const CouplingMappercouplingMapper_
 
const GridGeometry< voidDomainIdx > * voidGridGeometry_
 
const GridGeometry< solidDomainIdx > * solidGridGeometry_
 
VoidElementSolution voidElementSolution_
 
SolidElementSolution solidElementSolution_
 
ElementCouplingContext elementCouplingContext_
 
GridVariablesTuple gridVariables_
 A tuple of std::shared_ptrs to the grid variables of the sub problems. More...
 
PoreNetwork::PNMHeatExtendedSourceStencil< ThisTypeextendedSourceStencil_
 the extended source stencil object 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...
 
decltype(auto) numericEpsilon (Dune::index_constant< i >, const std::string &paramGroup) const
 return the numeric epsilon used for deflecting primary variables of coupled domain i 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...
 

Member Typedef Documentation

◆ CouplingStencils

template<class MDTraits >
using Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::CouplingStencils = std::unordered_map<std::size_t, CouplingStencil>

◆ CouplingStencilType

using Dumux::CouplingManager< MDTraits >::CouplingStencilType = std::vector<std::size_t>
inherited

◆ MultiDomainTraits

template<class MDTraits >
using Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::MultiDomainTraits = MDTraits

◆ SolutionVectorStorage

using Dumux::CouplingManager< MDTraits >::SolutionVectorStorage = typename Traits::template TupleOfSharedPtr<SubSolutionVector>
protectedinherited

Member Function Documentation

◆ attachSolution()

void Dumux::CouplingManager< MDTraits >::attachSolution ( SolutionVectorStorage curSol)
inlineprotectedinherited
Note
The caller has to make sure that curSol stays alive for the lifetime of the coupling manager. Otherwise we have a dangling reference here. Use with care.

◆ bindCouplingContext() [1/2]

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

◆ bindCouplingContext() [2/2]

void Dumux::CouplingManager< MDTraits >::bindCouplingContext ( Dune::index_constant< i >  domainI,
const Element< i > &  elementI,
const Assembler &  assembler 
)
inlineinherited
Parameters
domainIthe domain index of domain i
elementIthe element whose residual we are assemling next
assemblerthe multidomain assembler for access to all data necessary for the assembly of all domains
Note
this concerns all data that is used in the evaluation of the element residual and depends on one of the degrees of freedom returned by CouplingManager::couplingStencil
every coupled element residual depends at least on the solution of another domain, that why we always store a copy of the solution vector in the coupling manager, hence, in case the element residual only depends on primary variables of the other domain this function does nothing
overload this function in case the element residual depends on more than the primary variables of domain j

◆ conductionSource()

template<class MDTraits >
template<std::size_t i>
Scalar Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::conductionSource ( Dune::index_constant< i >  domainI,
const Element< i > &  element,
const FVElementGeometry< i > &  fvGeometry,
const ElementVolumeVariables< i > &  elemVolVars,
const SubControlVolume< i > &  scv 
) const
inline

◆ convectionSource()

template<class MDTraits >
template<std::size_t i>
Scalar Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::convectionSource ( Dune::index_constant< i >  domainI,
const Element< i > &  element,
const FVElementGeometry< i > &  fvGeometry,
const ElementVolumeVariables< i > &  elemVolVars,
const SubControlVolume< i > &  scv 
) const
inline

◆ convectiveHeatFluxForOneConnection()

template<class MDTraits >
template<class Connection , class Context >
Scalar Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::convectiveHeatFluxForOneConnection ( const Connection &  connection,
const Context &  context 
) const
inline

◆ couplingContext()

template<class MDTraits >
const auto & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::couplingContext ( ) const
inline

◆ couplingMapper()

template<class MDTraits >
const CouplingMapper & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::couplingMapper ( ) const
inline

◆ couplingStencil()

template<class MDTraits >
template<std::size_t i, std::size_t j>
const CouplingStencil & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::couplingStencil ( Dune::index_constant< i >  domainI,
const Element< i > &  element,
Dune::index_constant< j >  domainJ 
) const
inline

returns an iterable 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

Parameters
domainIthe domain index of domain i
elementthe coupled element of domain í
domainJthe domain index of domain j

◆ curSol() [1/2]

SubSolutionVector< i > & Dumux::CouplingManager< MDTraits >::curSol ( Dune::index_constant< i >  domainIdx)
inlineprotectedinherited
Parameters
domainIdxThe domain index
Note
in case of numeric differentiation the solution vector always carries the deflected solution

◆ curSol() [2/2]

const SubSolutionVector< i > & Dumux::CouplingManager< MDTraits >::curSol ( Dune::index_constant< i >  domainIdx) const
inlineprotectedinherited
Parameters
domainIdxThe domain index
Note
in case of numeric differentiation the solution vector always carries the deflected solution

◆ emptyStencil() [1/2]

template<class MDTraits >
std::vector< std::size_t > & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::emptyStencil ( )
inline

◆ emptyStencil() [2/2]

template<class MDTraits >
template<std::size_t i>
const std::vector< std::size_t > & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::emptyStencil ( Dune::index_constant< i >  domainI) const
inline

◆ evalAdditionalDomainDerivatives() [1/2]

template<class MDTraits >
template<std::size_t i, class LocalAssemblerI , class JacobianMatrixDiagBlock , class GridVariables >
void Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::evalAdditionalDomainDerivatives ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
const typename LocalAssemblerI::LocalResidual::ElementResidualVector &  ,
JacobianMatrixDiagBlock &  A,
GridVariables &  gridVariables 
)
inline
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
This is the same for box and cc

◆ evalAdditionalDomainDerivatives() [2/2]

void Dumux::CouplingManager< MDTraits >::evalAdditionalDomainDerivatives ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
const typename LocalAssemblerI::LocalResidual::ElementResidualVector &  origResiduals,
JacobianMatrixDiagBlock &  A,
GridVariables &  gridVariables 
)
inlineinherited
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/2]

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

◆ evalCouplingResidual() [2/2]

decltype(auto) Dumux::CouplingManager< MDTraits >::evalCouplingResidual ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
Dune::index_constant< j >  domainJ,
std::size_t  dofIdxGlobalJ 
) const
inlineinherited
Parameters
domainIthe domain index of domain i
localAssemblerIthe local assembler assembling the element residual of an element of domain i
domainJthe domain index of domain j
dofIdxGlobalJthe index of the degree of freedom of domain j which has an influence on the element residual of domain i
Note
the element whose residual is to be evaluated can be retrieved from the local assembler as localAssemblerI.element() as well as all up-to-date variables and caches.
the default implementation evaluates the complete element residual if only parts (i.e. only certain scvs, or only certain terms of the residual) of the residual are coupled to dof with index dofIdxGlobalJ the function can be overloaded in the coupling manager
Returns
the element residual

◆ extendJacobianPattern()

template<class MDTraits >
template<std::size_t id, class JacobianPattern >
void Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::extendJacobianPattern ( Dune::index_constant< id >  domainI,
JacobianPattern &  pattern 
) const
inline
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

◆ getConnectionTransmissiblity()

template<class MDTraits >
template<std::size_t i, class Connection >
Scalar Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::getConnectionTransmissiblity ( Dune::index_constant< i >  domainI,
const Connection &  connection,
const ElementVolumeVariables< i > &  elemVolVars,
const SubControlVolume< i > &  scv 
) const
inline

◆ getVolVarAccess_()

template<class MDTraits >
template<std::size_t i>
VolumeVariables< i > & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::getVolVarAccess_ ( Dune::index_constant< i >  domainIdx,
GridVolumeVariables< i > &  gridVolVars,
ElementVolumeVariables< i > &  elemVolVars,
const SubControlVolume< i > &  scv 
)
inlineprotected

◆ gridGeometry()

template<class MDTraits >
template<std::size_t i>
const auto & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::gridGeometry ( Dune::index_constant< i >  domainI) const
inline

◆ gridVariables()

template<class MDTraits >
template<std::size_t i>
const GridVariables< i > & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::gridVariables ( Dune::index_constant< i >  domainIdx) const
inline
Parameters
domainIdxThe domain index

◆ gridVars_()

template<class MDTraits >
template<std::size_t i>
GridVariables< i > & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::gridVars_ ( Dune::index_constant< i >  domainIdx)
inlineprotected
Parameters
domainIdxThe domain index

◆ gridView()

template<class MDTraits >
template<std::size_t i>
const auto & Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::gridView ( Dune::index_constant< i >  domainI) const
inline

◆ init()

template<class MDTraits >
template<class HostGridView , class HostGridData , class VoidGridView , class SolidGridView >
void Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::init ( std::shared_ptr< Problem< solidDomainIdx > >  solidProblem,
std::shared_ptr< Problem< voidDomainIdx > >  voidProblem,
const HostGridView &  hostGridView,
const HostGridData &  hostGridData,
const VoidGridView &  voidGridView,
const SolidGridView &  solidGridView,
const SolutionVector &  curSol 
)
inline

◆ isCoupledPore()

template<class MDTraits >
template<std::size_t i>
bool Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::isCoupledPore ( Dune::index_constant< i >  domainI,
const std::size_t  dofIdx 
) const
inline

◆ numericEpsilon()

decltype(auto) Dumux::CouplingManager< MDTraits >::numericEpsilon ( Dune::index_constant< i >  ,
const std::string &  paramGroup 
) const
inlineinherited

◆ problem()

const Problem< i > & Dumux::CouplingManager< MDTraits >::problem ( Dune::index_constant< i >  domainIdx) const
inlineinherited
Parameters
domainIdxThe domain index We avoid exception handling here because the performance of this function is critical

◆ removeDuplicates_()

template<class MDTraits >
void Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::removeDuplicates_ ( std::vector< std::size_t > &  stencil)
inlineprotected

◆ setGridVariables() [1/2]

template<class MDTraits >
void Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::setGridVariables ( GridVariablesTuple &&  gridVariables)
inline
Parameters
gridVariablesA tuple of shared pointers to the grid variables

◆ setGridVariables() [2/2]

template<class MDTraits >
template<class GridVariables , std::size_t i>
void Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::setGridVariables ( std::shared_ptr< GridVariables >  gridVariables,
Dune::index_constant< i >  domainIdx 
)
inline
Parameters
gridVariablesa pointer to the grid variables
domainIdxthe domain index of the grid variables

◆ setSubProblem()

void Dumux::CouplingManager< MDTraits >::setSubProblem ( std::shared_ptr< SubProblem >  problem,
Dune::index_constant< i >  domainIdx 
)
inlineinherited
Parameters
problema pointer to the sub problem
domainIdxthe domain index of the sub problem

◆ setSubProblems()

void Dumux::CouplingManager< MDTraits >::setSubProblems ( const std::tuple< std::shared_ptr< SubProblems >... > &  problems)
inlineinherited
Parameters
problemsA tuple of shared pointers to the sub problems

◆ setupExtendedStencil()

template<class MDTraits >
void Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::setupExtendedStencil ( )
inline

◆ sourceWithFixedTransmissibility()

template<class MDTraits >
template<std::size_t i, std::size_t j>
Scalar Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::sourceWithFixedTransmissibility ( Dune::index_constant< i >  domainI,
const Element< i > &  element,
const FVElementGeometry< i > &  fvGeometry,
const ElementVolumeVariables< i > &  elemVolVars,
const SubControlVolume< i > &  scv,
Dune::index_constant< j >  domainJ 
) const
inline

◆ updateCoupledVariables()

void Dumux::CouplingManager< MDTraits >::updateCoupledVariables ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
UpdatableElementVolVars &  elemVolVars,
UpdatableFluxVarCache &  elemFluxVarsCache 
)
inlineinherited
Parameters
domainIthe index of domain i
localAssemblerIthe local assembler assembling the element residual of an element of domain i
elemVolVarsthe element volume variables (all volume variables in the element local stencil) to be updated
elemFluxVarsCachethe element flux variable cache (all flux variables in the element local stencil) to be updated
Note
Such variables do not necessarily exist and then this function does nothing (default)
some examples from geomechanics: the porosity of (physical) domain i (porous medium flow) depends on the displacement vector of physical domain j (mechanics) from domaindecomposition: the transmissibilities for fluxes of domain i to domain j depend on the permeability in domain j (which might depend in turn on the primary variables of domain i)

◆ updateCouplingContext() [1/2]

template<class MDTraits >
template<std::size_t i, class LocalAssemblerI , std::size_t j, class PriVars >
void Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::updateCouplingContext ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
Dune::index_constant< j >  domainJ,
const std::size_t  dofIdxGlobalJ,
const PriVars &  priVars,
int  pvIdxJ 
)
inline

◆ updateCouplingContext() [2/2]

void Dumux::CouplingManager< MDTraits >::updateCouplingContext ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
Dune::index_constant< j >  domainJ,
std::size_t  dofIdxGlobalJ,
const PrimaryVariables< j > &  priVarsJ,
int  pvIdxJ 
)
inlineinherited
Parameters
domainIthe domain index of domain i
localAssemblerIthe local assembler assembling the element residual of an element of domain i
domainJthe domain index of domain j
dofIdxGlobalJthe index of the degree of freedom of domain j whose solution changed
priVarsJthe new solution at the degree of freedom of domain j with index dofIdxGlobalJ
pvIdxJthe index of the primary variable of domain j which has been updated
Note
this concerns all data that is used in the evaluation of the element residual and depends on the primary variables at the degree of freedom location with index dofIdxGlobalJ
the element whose residual is to be evaluated can be retrieved from the local assembler as localAssemblerI.element()
per default, we update the solution vector, if the element residual of domain i depends on more than the primary variables of domain j update the other dependent data here by overloading this function

◆ updateSolution()

void Dumux::CouplingManager< MDTraits >::updateSolution ( const SolutionVector curSol)
inlineinherited

◆ volVars()

template<class MDTraits >
template<std::size_t i>
VolumeVariables< i > Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::volVars ( Dune::index_constant< i >  domainI,
const Element< i > &  element,
const SubControlVolume< i > &  scv 
) const
inline

Member Data Documentation

◆ convectiveHeatTransfer_

template<class MDTraits >
bool Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::convectiveHeatTransfer_
protected

◆ couplingMapper_

template<class MDTraits >
std::unique_ptr<const CouplingMapper> Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::couplingMapper_
protected

◆ elementCouplingContext_

template<class MDTraits >
ElementCouplingContext Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::elementCouplingContext_
mutableprotected

◆ emptyStencil_

template<class MDTraits >
std::vector<std::size_t> Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::emptyStencil_
protected

◆ extendedSourceStencil_

template<class MDTraits >
PoreNetwork::PNMHeatExtendedSourceStencil<ThisType> Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::extendedSourceStencil_
protected

◆ gridVariables_

template<class MDTraits >
GridVariablesTuple Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::gridVariables_
protected

◆ solidDomainIdx

template<class MDTraits >
constexpr auto Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::solidDomainIdx = typename MDTraits::template SubDomain<0>::Index()
staticconstexpr

◆ solidElementSolution_

template<class MDTraits >
SolidElementSolution Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::solidElementSolution_
protected

◆ solidGridGeometry_

template<class MDTraits >
const GridGeometry<solidDomainIdx>* Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::solidGridGeometry_
protected

◆ voidDomainIdx

template<class MDTraits >
constexpr auto Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::voidDomainIdx = typename MDTraits::template SubDomain<1>::Index()
staticconstexpr

◆ voidElementSolution_

template<class MDTraits >
VoidElementSolution Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::voidElementSolution_
protected

◆ voidGridGeometry_

template<class MDTraits >
const GridGeometry<voidDomainIdx>* Dumux::PoreNetwork::PNMHeatTransferCouplingManager< MDTraits >::voidGridGeometry_
protected

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