version 3.9-dev
Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod > Class Template Reference

A linear system assembler (residual and Jacobian) for finite volume schemes (box, tpfa, mpfa, ...) with multiple domains. More...

#include <dumux/experimental/assembly/multistagemultidomainfvassembler.hh>

Description

template<class MDTraits, class CMType, DiffMethod diffMethod>
class Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >
Template Parameters
MDTraitsthe multidimensional traits
diffMethodthe differentiation method to residual compute derivatives

Public Types

using Traits = MDTraits
 
using Scalar = typename MDTraits::Scalar
 
using StageParams = Experimental::MultiStageParams< Scalar >
 
template<std::size_t id>
using LocalResidual = GetPropType< SubDomainTypeTag< id >, Properties::LocalResidual >
 TODO get rid of this GetPropType. More...
 
template<std::size_t id>
using GridVariables = typename MDTraits::template SubDomain< id >::GridVariables
 
template<std::size_t id>
using GridGeometry = typename MDTraits::template SubDomain< id >::GridGeometry
 
template<std::size_t id>
using Problem = typename MDTraits::template SubDomain< id >::Problem
 
using JacobianMatrix = typename MDTraits::JacobianMatrix
 
using SolutionVector = typename MDTraits::SolutionVector
 
using ResidualType = typename MDTraits::ResidualVector
 
using CouplingManager = CMType
 

Public Member Functions

 MultiStageMultiDomainFVAssembler (ProblemTuple problem, GridGeometryTuple gridGeometry, GridVariablesTuple gridVariables, std::shared_ptr< CouplingManager > couplingManager, std::shared_ptr< const Experimental::MultiStageMethod< Scalar > > msMethod, const SolutionVector &prevSol)
 The constructor for instationary problems. More...
 
void assembleJacobianAndResidual (const SolutionVector &curSol)
 Assembles the global Jacobian of the residual and the residual for the current solution. More...
 
void assembleResidual (const SolutionVector &curSol)
 compute the residuals using the internal residual More...
 
void setLinearSystem ()
 The version without arguments uses the default constructor to create the jacobian and residual objects in this assembler if you don't need them outside this class. More...
 
void updateGridVariables (const SolutionVector &curSol)
 Updates the grid variables with the given solution. More...
 
void resetTimeStep (const SolutionVector &curSol)
 Resets the grid variables to the last time step. More...
 
template<std::size_t i>
std::size_t numDofs (Dune::index_constant< i > domainId) const
 the number of dof locations of domain i More...
 
template<std::size_t i>
const auto & problem (Dune::index_constant< i > domainId) const
 the problem of domain i More...
 
template<std::size_t i>
const auto & gridGeometry (Dune::index_constant< i > domainId) const
 the finite volume grid geometry of domain i More...
 
template<std::size_t i>
const auto & gridView (Dune::index_constant< i > domainId) const
 the grid view of domain i More...
 
template<std::size_t i>
GridVariables< i > & gridVariables (Dune::index_constant< i > domainId)
 the grid variables of domain i More...
 
template<std::size_t i>
const GridVariables< i > & gridVariables (Dune::index_constant< i > domainId) const
 the grid variables of domain i More...
 
const CouplingManagercouplingManager () const
 the coupling manager More...
 
JacobianMatrixjacobian ()
 the full Jacobian matrix More...
 
ResidualTyperesidual ()
 the full residual vector More...
 
const SolutionVectorprevSol () const
 the solution before time integration More...
 
template<std::size_t i>
MultiStageFVLocalOperator< LocalResidual< i > > localResidual (Dune::index_constant< i > domainId) const
 Create a local residual object (used by the local assembler) More...
 
void clearStages ()
 
template<class StageParams >
void prepareStage (SolutionVector &x, StageParams params)
 
bool isStationaryProblem () const
 TODO get rid of this (called by Newton but shouldn't be necessary) More...
 
bool isImplicit () const
 

Protected Attributes

std::shared_ptr< CouplingManagercouplingManager_
 the coupling manager coupling the sub domains More...
 

Member Typedef Documentation

◆ CouplingManager

template<class MDTraits , class CMType , DiffMethod diffMethod>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::CouplingManager = CMType

◆ GridGeometry

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t id>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::GridGeometry = typename MDTraits::template SubDomain<id>::GridGeometry

◆ GridVariables

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t id>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::GridVariables = typename MDTraits::template SubDomain<id>::GridVariables

◆ JacobianMatrix

template<class MDTraits , class CMType , DiffMethod diffMethod>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::JacobianMatrix = typename MDTraits::JacobianMatrix

◆ LocalResidual

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t id>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::LocalResidual = GetPropType<SubDomainTypeTag<id>, Properties::LocalResidual>

◆ Problem

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t id>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::Problem = typename MDTraits::template SubDomain<id>::Problem

◆ ResidualType

template<class MDTraits , class CMType , DiffMethod diffMethod>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::ResidualType = typename MDTraits::ResidualVector

◆ Scalar

template<class MDTraits , class CMType , DiffMethod diffMethod>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::Scalar = typename MDTraits::Scalar

◆ SolutionVector

template<class MDTraits , class CMType , DiffMethod diffMethod>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::SolutionVector = typename MDTraits::SolutionVector

◆ StageParams

template<class MDTraits , class CMType , DiffMethod diffMethod>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::StageParams = Experimental::MultiStageParams<Scalar>

◆ Traits

template<class MDTraits , class CMType , DiffMethod diffMethod>
using Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::Traits = MDTraits

Constructor & Destructor Documentation

◆ MultiStageMultiDomainFVAssembler()

template<class MDTraits , class CMType , DiffMethod diffMethod>
Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::MultiStageMultiDomainFVAssembler ( ProblemTuple  problem,
GridGeometryTuple  gridGeometry,
GridVariablesTuple  gridVariables,
std::shared_ptr< CouplingManager couplingManager,
std::shared_ptr< const Experimental::MultiStageMethod< Scalar > >  msMethod,
const SolutionVector prevSol 
)
inline
Note
the grid variables might be temporarily changed during assembly (if caching is enabled) it is however guaranteed that the state after assembly will be the same as before

Member Function Documentation

◆ assembleJacobianAndResidual()

template<class MDTraits , class CMType , DiffMethod diffMethod>
void Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::assembleJacobianAndResidual ( const SolutionVector curSol)
inline

◆ assembleResidual()

template<class MDTraits , class CMType , DiffMethod diffMethod>
void Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::assembleResidual ( const SolutionVector curSol)
inline

◆ clearStages()

template<class MDTraits , class CMType , DiffMethod diffMethod>
void Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::clearStages ( )
inline

◆ couplingManager()

template<class MDTraits , class CMType , DiffMethod diffMethod>
const CouplingManager & Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::couplingManager ( ) const
inline

◆ gridGeometry()

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t i>
const auto & Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::gridGeometry ( Dune::index_constant< i >  domainId) const
inline

◆ gridVariables() [1/2]

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t i>
GridVariables< i > & Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::gridVariables ( Dune::index_constant< i >  domainId)
inline

◆ gridVariables() [2/2]

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t i>
const GridVariables< i > & Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::gridVariables ( Dune::index_constant< i >  domainId) const
inline

◆ gridView()

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t i>
const auto & Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::gridView ( Dune::index_constant< i >  domainId) const
inline

◆ isImplicit()

template<class MDTraits , class CMType , DiffMethod diffMethod>
bool Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::isImplicit ( ) const
inline

◆ isStationaryProblem()

template<class MDTraits , class CMType , DiffMethod diffMethod>
bool Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::isStationaryProblem ( ) const
inline

◆ jacobian()

template<class MDTraits , class CMType , DiffMethod diffMethod>
JacobianMatrix & Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::jacobian ( )
inline

◆ localResidual()

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t i>
MultiStageFVLocalOperator< LocalResidual< i > > Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::localResidual ( Dune::index_constant< i >  domainId) const
inline

◆ numDofs()

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t i>
std::size_t Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::numDofs ( Dune::index_constant< i >  domainId) const
inline

◆ prepareStage()

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<class StageParams >
void Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::prepareStage ( SolutionVector x,
StageParams  params 
)
inline

◆ prevSol()

template<class MDTraits , class CMType , DiffMethod diffMethod>
const SolutionVector & Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::prevSol ( ) const
inline

◆ problem()

template<class MDTraits , class CMType , DiffMethod diffMethod>
template<std::size_t i>
const auto & Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::problem ( Dune::index_constant< i >  domainId) const
inline

◆ resetTimeStep()

template<class MDTraits , class CMType , DiffMethod diffMethod>
void Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::resetTimeStep ( const SolutionVector curSol)
inline

◆ residual()

template<class MDTraits , class CMType , DiffMethod diffMethod>
ResidualType & Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::residual ( )
inline

◆ setLinearSystem()

template<class MDTraits , class CMType , DiffMethod diffMethod>
void Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::setLinearSystem ( )
inline

◆ updateGridVariables()

template<class MDTraits , class CMType , DiffMethod diffMethod>
void Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::updateGridVariables ( const SolutionVector curSol)
inline

Member Data Documentation

◆ couplingManager_

template<class MDTraits , class CMType , DiffMethod diffMethod>
std::shared_ptr<CouplingManager> Dumux::Experimental::MultiStageMultiDomainFVAssembler< MDTraits, CMType, diffMethod >::couplingManager_
protected

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