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

Coupling manager for porous medium flow problems coupled to a poro-mechanical problem. More...

#include <dumux/geomechanics/poroelastic/couplingmanager.hh>

Inheritance diagram for Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >:

Description

template<class MDTraits, std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
class Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >

Coupling manager for porous medium flow problems coupled to a poro-mechanical problem.

   Coupling manager for porous medium flow problems coupled to a poro-mechanical
   problem both defined on the same grid. Coupling occurs via the change of porosity
   and permeability due to mechanical deformations and the influence of the pore
   pressure on the effective stresses acting on the porous medium.
Template Parameters
PMFlowIdThe porous medium flow domain id
PoroMechIdThe poro-mechanical domain id

Public Types

template<std::size_t i, std::size_t j = (i == PMFlowId) ? PoroMechId : PMFlowId>
using CouplingStencilType = typename std::conditional< i==PMFlowId, std::vector< CouplingIndexType< i > >, std::array< CouplingIndexType< i >, 1 > >::type
 The types used for coupling stencils. An element of the poro-mechanical domain always only couples to the single dof (because we use a cell-centered scheme in the porous medium flow domain) of this same element. More...
 
using SolutionVector = typename MDTraits::SolutionVector
 the type of the solution vector More...
 

Public Member Functions

void init (std::shared_ptr< Problem< PMFlowId > > pmFlowProblem, std::shared_ptr< Problem< PoroMechId > > poroMechanicalProblem, const SolutionVector &curSol)
 Initialize the coupling manager. More...
 
const CouplingStencilType< PMFlowId > & couplingStencil (Dune::index_constant< PMFlowId > pmFlowDomainId, const Element< PMFlowId > &element, Dune::index_constant< PoroMechId > poroMechDomainId) const
 Return the coupling stencil for a given porous medium flow domain element. More...
 
const CouplingStencilType< PoroMechId > couplingStencil (Dune::index_constant< PoroMechId > poroMechDomainId, const Element< PoroMechId > &element, Dune::index_constant< PMFlowId > pmFlowDomainId) const
 Return the coupling element stencil for a given poro-mechanical domain element. More...
 
template<class Assembler >
void bindCouplingContext (Dune::index_constant< PoroMechId > poroMechDomainId, const Element< PoroMechId > &element, const Assembler &assembler)
 For the assembly of the element residual of an element of the poro-mechanics domain, we have to prepare the element variables of the porous medium flow domain. More...
 
template<class PoroMechLocalAssembler >
void updateCouplingContext (Dune::index_constant< PoroMechId > poroMechDomainId, const PoroMechLocalAssembler &poroMechLocalAssembler, Dune::index_constant< PMFlowId > pmFlowDomainId, GridIndexType< PMFlowId > dofIdxGlobalJ, const PrimaryVariables< PMFlowId > &priVarsJ, unsigned int pvIdxJ)
 After deflection of the solution in the porous medium flow domain during element residual assembly in the poromechanics domain, we have to update the porous medium flow element variables of the coupling context. More...
 
template<class PoroMechLocalAssembler >
void updateCouplingContext (Dune::index_constant< PoroMechId > poroMechDomainIdI, const PoroMechLocalAssembler &poroMechLocalAssembler, Dune::index_constant< PoroMechId > poroMechDomainIdJ, GridIndexType< PoroMechId > dofIdxGlobalJ, const PrimaryVariables< PoroMechId > &priVarsJ, unsigned int pvIdxJ)
 After deflection of the solution in the poromechanics domain during element residual assembly in that same domain, we have to update the porous medium flow element variables of the coupling context because the porosity/permeability might depend on the mechanical deformation. More...
 
template<std::size_t j, class PMFlowLocalAssembler >
void updateCouplingContext (Dune::index_constant< PMFlowId > pmFlowDomainId, const PMFlowLocalAssembler &pmFlowLocalAssembler, Dune::index_constant< j > domainIdJ, GridIndexType< j > dofIdxGlobalJ, const PrimaryVariables< j > &priVarsJ, unsigned int pvIdxJ)
 We need this overload to avoid ambiguity. However, for the porous medium flow domain weonly have to update the solution, which is done in the parent class. More...
 
template<class PMFlowLocalAssembler , class UpdatableFluxVarCache >
void updateCoupledVariables (Dune::index_constant< PMFlowId > pmFlowDomainId, const PMFlowLocalAssembler &pmFlowLocalAssembler, ElementVolumeVariables< PMFlowId > &elemVolVars, UpdatableFluxVarCache &elemFluxVarsCache)
 Update the porous medium flow domain volume variables and flux variables cache after the coupling context has been updated. This has to be done because the mechanical deformation enters the porosity/permeability relationships. More...
 
template<class PoroMechLocalAssembler , class UpdatableFluxVarCache >
void updateCoupledVariables (Dune::index_constant< PoroMechId > poroMechDomainId, const PoroMechLocalAssembler &poroMechLocalAssembler, ElementVolumeVariables< PoroMechId > &elemVolVars, UpdatableFluxVarCache &elemFluxVarsCache)
 Update the poro-mechanics volume variables after the coupling context has been updated. This is necessary because the fluid density is stored in them and which potentially is solution-dependent. More...
 
template<class PMFlowLocalAssembler >
LocalResidual< PMFlowId >::ElementResidualVector evalCouplingResidual (Dune::index_constant< PMFlowId > pmFlowDomainId, const PMFlowLocalAssembler &pmFlowLocalAssembler, Dune::index_constant< PoroMechId > poroMechDomainId, GridIndexType< PoroMechId > dofIdxGlobalJ)
 Evaluates the coupling element residual of the porous medium flow domain with respect to the poro-mechanical domain. The deformation might has an effect on both the permeability as well as the porosity. Thus, we need to compute fluxes and the storage term here. More...
 
template<class PoroMechLocalAssembler >
LocalResidual< PoroMechId >::ElementResidualVector evalCouplingResidual (Dune::index_constant< PoroMechId > poroMechDomainId, const PoroMechLocalAssembler &poroMechLocalAssembler, Dune::index_constant< PMFlowId > pmFlowDomainId, GridIndexType< PMFlowId > dofIdxGlobalJ)
 Evaluates the coupling element residual of the poromechanical domain with respect to the porous medium flow domain. The pressure has an effect on the mechanical stresses as well as the body forces. Thus, we have to compute the fluxes as well as the source term here. More...
 
const VolumeVariables< PMFlowId > & getPMFlowVolVars (const Element< PoroMechId > &element) const
 Return the porous medium flow variables an element/scv of the poromech domain couples to. More...
 
template<std::size_t i>
const auto & curSol (Dune::index_constant< i > domainIdx) const
 the solution vector of the subproblem More...
 
member functions concerning the coupling stencils
const CouplingStencilType< i, j > & couplingStencil (Dune::index_constant< i > domainI, const Element< i > &elementI, Dune::index_constant< j > domainJ) const
 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 More...
 
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...
 

Static Public Attributes

static constexpr auto pmFlowId = Dune::index_constant<PMFlowId>()
 
static constexpr auto poroMechId = Dune::index_constant<PoroMechId>()
 

Protected Types

using SolutionVectorStorage = typename Traits::template TupleOfSharedPtr< SubSolutionVector >
 the type in which the solution vector is stored in the manager 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...
 

Member Typedef Documentation

◆ CouplingStencilType

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<std::size_t i, std::size_t j = (i == PMFlowId) ? PoroMechId : PMFlowId>
using Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::CouplingStencilType = typename std::conditional< i == PMFlowId, std::vector< CouplingIndexType<i> >, std::array< CouplingIndexType<i>, 1> >::type

The types used for coupling stencils. An element of the poro-mechanical domain always only couples to the single dof (because we use a cell-centered scheme in the porous medium flow domain) of this same element.

◆ SolutionVector

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
using Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::SolutionVector = typename MDTraits::SolutionVector

the type of the solution vector

◆ SolutionVectorStorage

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

the type in which the solution vector is stored in the manager

Member Function Documentation

◆ attachSolution()

void Dumux::CouplingManager< MDTraits >::attachSolution ( SolutionVectorStorage curSol)
inlineprotectedinherited

Attach a solution vector stored outside of this class.

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]

void Dumux::CouplingManager< MDTraits >::bindCouplingContext ( Dune::index_constant< i >  domainI,
const Element< i > &  elementI,
const Assembler &  assembler 
)
inlineinherited

prepares all data and variables that are necessary to evaluate the residual of the element of domain i

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

◆ bindCouplingContext() [2/2]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<class Assembler >
void Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::bindCouplingContext ( Dune::index_constant< PoroMechId >  poroMechDomainId,
const Element< PoroMechId > &  element,
const Assembler &  assembler 
)
inline

For the assembly of the element residual of an element of the poro-mechanics domain, we have to prepare the element variables of the porous medium flow domain.

◆ couplingStencil() [1/3]

const CouplingStencilType< i, j > & Dumux::CouplingManager< MDTraits >::couplingStencil ( Dune::index_constant< i >  domainI,
const Element< i > &  elementI,
Dune::index_constant< j >  domainJ 
) const
inlineinherited

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
elementIthe coupled element of domain í
domainJthe domain index of domain j
Note
The element residual definition depends on the discretization scheme of domain i box: a container of the residuals of all sub control volumes cc : the residual of the (sub) control volume fem: the residual of the element
This function has to be implemented by all coupling managers for all combinations of i and j

◆ couplingStencil() [2/3]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
const CouplingStencilType< PMFlowId > & Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::couplingStencil ( Dune::index_constant< PMFlowId >  pmFlowDomainId,
const Element< PMFlowId > &  element,
Dune::index_constant< PoroMechId >  poroMechDomainId 
) const
inline

Return the coupling stencil for a given porous medium flow domain element.

◆ couplingStencil() [3/3]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
const CouplingStencilType< PoroMechId > Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::couplingStencil ( Dune::index_constant< PoroMechId >  poroMechDomainId,
const Element< PoroMechId > &  element,
Dune::index_constant< PMFlowId >  pmFlowDomainId 
) const
inline

Return the coupling element stencil for a given poro-mechanical domain element.

◆ curSol() [1/2]

SubSolutionVector< i > & Dumux::CouplingManager< MDTraits >::curSol ( Dune::index_constant< i >  domainIdx)
inlineprotectedinherited

the solution vector of the subproblem

Parameters
domainIdxThe domain index
Note
in case of numeric differentiation the solution vector always carries the deflected solution

◆ curSol() [2/2]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<std::size_t i>
const auto & Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::curSol ( Dune::index_constant< i >  domainIdx) const
inline

the solution vector of the subproblem

Parameters
domainIdxThe domain index
Note
in case of numeric differentiation the solution vector always carries the deflected solution

◆ evalAdditionalDomainDerivatives()

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

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]

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

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

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

◆ evalCouplingResidual() [2/3]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<class PMFlowLocalAssembler >
LocalResidual< PMFlowId >::ElementResidualVector Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::evalCouplingResidual ( Dune::index_constant< PMFlowId >  pmFlowDomainId,
const PMFlowLocalAssembler &  pmFlowLocalAssembler,
Dune::index_constant< PoroMechId >  poroMechDomainId,
GridIndexType< PoroMechId >  dofIdxGlobalJ 
)
inline

Evaluates the coupling element residual of the porous medium flow domain with respect to the poro-mechanical domain. The deformation might has an effect on both the permeability as well as the porosity. Thus, we need to compute fluxes and the storage term here.

◆ evalCouplingResidual() [3/3]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<class PoroMechLocalAssembler >
LocalResidual< PoroMechId >::ElementResidualVector Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::evalCouplingResidual ( Dune::index_constant< PoroMechId >  poroMechDomainId,
const PoroMechLocalAssembler &  poroMechLocalAssembler,
Dune::index_constant< PMFlowId >  pmFlowDomainId,
GridIndexType< PMFlowId >  dofIdxGlobalJ 
)
inline

Evaluates the coupling element residual of the poromechanical domain with respect to the porous medium flow domain. The pressure has an effect on the mechanical stresses as well as the body forces. Thus, we have to compute the fluxes as well as the source term here.

◆ extendJacobianPattern()

void Dumux::CouplingManager< MDTraits >::extendJacobianPattern ( Dune::index_constant< id >  domainI,
JacobianPattern &  pattern 
) const
inlineinherited

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

◆ getPMFlowVolVars()

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
const VolumeVariables< PMFlowId > & Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::getPMFlowVolVars ( const Element< PoroMechId > &  element) const
inline

Return the porous medium flow variables an element/scv of the poromech domain couples to.

If we do not yet have the queried object, build it first

◆ init()

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
void Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::init ( std::shared_ptr< Problem< PMFlowId > >  pmFlowProblem,
std::shared_ptr< Problem< PoroMechId > >  poroMechanicalProblem,
const SolutionVector curSol 
)
inline

Initialize the coupling manager.

Parameters
pmFlowProblemThe porous medium flow problem
poroMechanicalProblemThe poro-mechanical problem
curSolThe current solution

◆ numericEpsilon()

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

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

◆ problem()

const Problem< i > & Dumux::CouplingManager< MDTraits >::problem ( Dune::index_constant< i >  domainIdx) const
inlineinherited

Return a reference to the sub problem.

Parameters
domainIdxThe domain index We avoid exception handling here because the performance of this function is critical

◆ setSubProblem()

void Dumux::CouplingManager< MDTraits >::setSubProblem ( std::shared_ptr< SubProblem >  problem,
Dune::index_constant< i >  domainIdx 
)
inlineinherited

set a pointer to one of the sub problems

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

set the pointers to the sub problems

Parameters
problemsA tuple of shared pointers to the sub problems

◆ updateCoupledVariables() [1/3]

void Dumux::CouplingManager< MDTraits >::updateCoupledVariables ( Dune::index_constant< i >  domainI,
const LocalAssemblerI &  localAssemblerI,
UpdatableElementVolVars &  elemVolVars,
UpdatableFluxVarCache &  elemFluxVarsCache 
)
inlineinherited

update variables of domain i that depend on variables in domain j after the coupling context has been updated

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)

◆ updateCoupledVariables() [2/3]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<class PMFlowLocalAssembler , class UpdatableFluxVarCache >
void Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::updateCoupledVariables ( Dune::index_constant< PMFlowId >  pmFlowDomainId,
const PMFlowLocalAssembler &  pmFlowLocalAssembler,
ElementVolumeVariables< PMFlowId > &  elemVolVars,
UpdatableFluxVarCache &  elemFluxVarsCache 
)
inline

Update the porous medium flow domain volume variables and flux variables cache after the coupling context has been updated. This has to be done because the mechanical deformation enters the porosity/permeability relationships.

◆ updateCoupledVariables() [3/3]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<class PoroMechLocalAssembler , class UpdatableFluxVarCache >
void Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::updateCoupledVariables ( Dune::index_constant< PoroMechId >  poroMechDomainId,
const PoroMechLocalAssembler &  poroMechLocalAssembler,
ElementVolumeVariables< PoroMechId > &  elemVolVars,
UpdatableFluxVarCache &  elemFluxVarsCache 
)
inline

Update the poro-mechanics volume variables after the coupling context has been updated. This is necessary because the fluid density is stored in them and which potentially is solution-dependent.

◆ updateCouplingContext() [1/4]

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

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

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

◆ updateCouplingContext() [2/4]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<std::size_t j, class PMFlowLocalAssembler >
void Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::updateCouplingContext ( Dune::index_constant< PMFlowId >  pmFlowDomainId,
const PMFlowLocalAssembler &  pmFlowLocalAssembler,
Dune::index_constant< j >  domainIdJ,
GridIndexType< j >  dofIdxGlobalJ,
const PrimaryVariables< j > &  priVarsJ,
unsigned int  pvIdxJ 
)
inline

We need this overload to avoid ambiguity. However, for the porous medium flow domain weonly have to update the solution, which is done in the parent class.

◆ updateCouplingContext() [3/4]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<class PoroMechLocalAssembler >
void Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::updateCouplingContext ( Dune::index_constant< PoroMechId >  poroMechDomainId,
const PoroMechLocalAssembler &  poroMechLocalAssembler,
Dune::index_constant< PMFlowId >  pmFlowDomainId,
GridIndexType< PMFlowId >  dofIdxGlobalJ,
const PrimaryVariables< PMFlowId > &  priVarsJ,
unsigned int  pvIdxJ 
)
inline

After deflection of the solution in the porous medium flow domain during element residual assembly in the poromechanics domain, we have to update the porous medium flow element variables of the coupling context.

◆ updateCouplingContext() [4/4]

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
template<class PoroMechLocalAssembler >
void Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::updateCouplingContext ( Dune::index_constant< PoroMechId >  poroMechDomainIdI,
const PoroMechLocalAssembler &  poroMechLocalAssembler,
Dune::index_constant< PoroMechId >  poroMechDomainIdJ,
GridIndexType< PoroMechId >  dofIdxGlobalJ,
const PrimaryVariables< PoroMechId > &  priVarsJ,
unsigned int  pvIdxJ 
)
inline

After deflection of the solution in the poromechanics domain during element residual assembly in that same domain, we have to update the porous medium flow element variables of the coupling context because the porosity/permeability might depend on the mechanical deformation.

◆ updateSolution()

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

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.

Member Data Documentation

◆ pmFlowId

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
constexpr auto Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::pmFlowId = Dune::index_constant<PMFlowId>()
staticconstexpr

◆ poroMechId

template<class MDTraits , std::size_t PMFlowId = 0, std::size_t PoroMechId = PMFlowId+1>
constexpr auto Dumux::PoroMechanicsCouplingManager< MDTraits, PMFlowId, PoroMechId >::poroMechId = Dune::index_constant<PoroMechId>()
staticconstexpr

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