version 3.8.0
Loading...
Searching...
No Matches
Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit > Class Template Reference

A linear system assembler (residual and Jacobian) for staggered finite volume schemes. This is basically just a wrapper for the MultiDomainFVAssembler which simplifies the set-up of uncoupled problems using the staggered scheme. More...

#include <dumux/assembly/staggeredfvassembler.hh>

Inheritance diagram for Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >:

Description

template<class TypeTag, DiffMethod diffMethod, bool isImplicit = true>
class Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >
Template Parameters
TypeTagthe TypeTag
diffMethodthe differentiation method to residual compute derivatives
isImplicitif to use an implicit or explicit time discretization

Public Types

using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>
 
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>
 
using CouplingManager = typename ParentType::CouplingManager
 
using ResidualType
 
using SolutionVector
 
using Traits = MDTraits
 
using Scalar = typename MDTraits::Scalar
 
template<std::size_t id>
using LocalResidual = GetPropType<SubDomainTypeTag<id>, Properties::LocalResidual>
 TODO get rid of this GetPropType.
 
using JacobianMatrix = typename MDTraits::JacobianMatrix
 

Public Member Functions

 StaggeredFVAssembler (std::shared_ptr< const Problem > problem, std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< GridVariables > gridVariables)
 The constructor for stationary problems.
 
 StaggeredFVAssembler (std::shared_ptr< const Problem > problem, std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< GridVariables > gridVariables, std::shared_ptr< const TimeLoop > timeLoop, const SolutionVector &prevSol)
 The constructor for time-dependent problems.
 
auto & gridVariables ()
 
const auto & gridVariables () const
 
const GridGeometrygridGeometry () const
 
void assembleJacobianAndResidual (const SolutionVector &curSol)
 Assembles the global Jacobian of the residual and the residual for the current solution.
 
void assembleResidual (const SolutionVector &curSol)
 compute the residuals using the internal residual
 
void assembleResidual (ResidualType &r, const SolutionVector &curSol)
 assemble a residual r
 
void setLinearSystem (std::shared_ptr< JacobianMatrix > A, std::shared_ptr< ResidualType > r)
 Tells the assembler which jacobian and residual to use. This also resizes the containers to the required sizes and sets the sparsity pattern of the jacobian matrix.
 
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.
 
void setJacobianBuildMode (JacobianMatrix &jac) const
 Sets the jacobian build mode.
 
void updateAfterGridAdaption ()
 Resizes jacobian and residual and recomputes colors.
 
void updateGridVariables (const SolutionVector &curSol)
 Updates the grid variables with the given solution.
 
void resetTimeStep (const SolutionVector &curSol)
 Resets the grid variables to the last time step.
 
template<std::size_t i>
std::size_t numDofs (Dune::index_constant< i > domainId) const
 the number of dof locations of domain i
 
template<std::size_t i>
const auto & problem (Dune::index_constant< i > domainId) const
 the problem of domain i
 
template<std::size_t i>
const auto & gridGeometry (Dune::index_constant< i > domainId) const
 the finite volume grid geometry of domain i
 
template<std::size_t i>
const auto & gridView (Dune::index_constant< i > domainId) const
 the grid view of domain i
 
template<std::size_t i>
GridVariables< i > & gridVariables (Dune::index_constant< i > domainId)
 the grid variables of domain i
 
template<std::size_t i>
const GridVariables< i > & gridVariables (Dune::index_constant< i > domainId) const
 the grid variables of domain i
 
const CouplingManagercouplingManager () const
 the coupling manager
 
JacobianMatrixjacobian ()
 the full Jacobian matrix
 
ResidualTyperesidual ()
 the full residual vector
 
const SolutionVectorprevSol () const
 the solution of the previous time step
 
void setTimeManager (std::shared_ptr< const TimeLoop > timeLoop)
 Set time loop for instationary problems.
 
void setPreviousSolution (const SolutionVector &u)
 Sets the solution from which to start the time integration. Has to be called prior to assembly for time-dependent problems.
 
bool isStationaryProblem () const
 Whether we are assembling a stationary or instationary problem.
 
template<std::size_t i>
LocalResidual< i > localResidual (Dune::index_constant< i > domainId) const
 Create a local residual object (used by the local assembler)
 

Static Public Member Functions

static constexpr bool isImplicit ()
 Returns true if the assembler considers implicit assembly.
 

Protected Attributes

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

Member Typedef Documentation

◆ CouplingManager

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
using Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >::CouplingManager = typename ParentType::CouplingManager

◆ GridGeometry

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
using Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >::GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>

◆ GridVariables

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
using Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >::GridVariables = GetPropType<TypeTag, Properties::GridVariables>

◆ JacobianMatrix

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::JacobianMatrix = typename MDTraits::JacobianMatrix
inherited

◆ LocalResidual

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
template<std::size_t id>
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::LocalResidual = GetPropType<SubDomainTypeTag<id>, Properties::LocalResidual>
inherited

◆ ResidualType

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::ResidualType

◆ Scalar

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::Scalar = typename MDTraits::Scalar
inherited

◆ SolutionVector

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::SolutionVector

◆ Traits

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::Traits = MDTraits
inherited

Constructor & Destructor Documentation

◆ StaggeredFVAssembler() [1/2]

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >::StaggeredFVAssembler ( std::shared_ptr< const Problem > problem,
std::shared_ptr< const GridGeometry > gridGeometry,
std::shared_ptr< GridVariables > gridVariables )
inline

◆ StaggeredFVAssembler() [2/2]

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >::StaggeredFVAssembler ( std::shared_ptr< const Problem > problem,
std::shared_ptr< const GridGeometry > gridGeometry,
std::shared_ptr< GridVariables > gridVariables,
std::shared_ptr< const TimeLoop > timeLoop,
const SolutionVector & prevSol )
inline

Member Function Documentation

◆ assembleJacobianAndResidual()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::assembleJacobianAndResidual ( const SolutionVector & curSol)
inlineinherited

◆ assembleResidual() [1/2]

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::assembleResidual ( const SolutionVector & curSol)
inlineinherited

◆ assembleResidual() [2/2]

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::assembleResidual ( ResidualType & r,
const SolutionVector & curSol )
inlineinherited

◆ couplingManager()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
const CouplingManager & Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::couplingManager ( ) const
inlineinherited

◆ gridGeometry() [1/2]

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
const GridGeometry & Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >::gridGeometry ( ) const
inline

◆ gridGeometry() [2/2]

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
template<std::size_t i>
const auto & Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::gridGeometry ( Dune::index_constant< i > domainId) const
inlineinherited

◆ gridVariables() [1/4]

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
auto & Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >::gridVariables ( )
inline

◆ gridVariables() [2/4]

template<class TypeTag , DiffMethod diffMethod, bool isImplicit = true>
const auto & Dumux::StaggeredFVAssembler< TypeTag, diffMethod, isImplicit >::gridVariables ( ) const
inline

◆ gridVariables() [3/4]

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
template<std::size_t i>
GridVariables< i > & Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::gridVariables ( Dune::index_constant< i > domainId)
inlineinherited

◆ gridVariables() [4/4]

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
template<std::size_t i>
const GridVariables< i > & Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::gridVariables ( Dune::index_constant< i > domainId) const
inlineinherited

◆ gridView()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
template<std::size_t i>
const auto & Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::gridView ( Dune::index_constant< i > domainId) const
inlineinherited

◆ isImplicit()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
static constexpr bool Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::isImplicit ( )
inlinestaticconstexprinherited

◆ isStationaryProblem()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
bool Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::isStationaryProblem ( ) const
inlineinherited

◆ jacobian()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
JacobianMatrix & Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::jacobian ( )
inlineinherited

◆ localResidual()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
template<std::size_t i>
LocalResidual< i > Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::localResidual ( Dune::index_constant< i > domainId) const
inlineinherited

◆ numDofs()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
template<std::size_t i>
std::size_t Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::numDofs ( Dune::index_constant< i > domainId) const
inlineinherited

◆ prevSol()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
const SolutionVector & Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::prevSol ( ) const
inlineinherited

◆ problem()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
template<std::size_t i>
const auto & Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::problem ( Dune::index_constant< i > domainId) const
inlineinherited

◆ resetTimeStep()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::resetTimeStep ( const SolutionVector & curSol)
inlineinherited

◆ residual()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
ResidualType & Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::residual ( )
inlineinherited

◆ setJacobianBuildMode()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::setJacobianBuildMode ( JacobianMatrix & jac) const
inlineinherited

◆ setLinearSystem() [1/2]

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::setLinearSystem ( )
inlineinherited

◆ setLinearSystem() [2/2]

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::setLinearSystem ( std::shared_ptr< JacobianMatrix > A,
std::shared_ptr< ResidualType > r )
inlineinherited

◆ setPreviousSolution()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::setPreviousSolution ( const SolutionVector & u)
inlineinherited

◆ setTimeManager()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::setTimeManager ( std::shared_ptr< const TimeLoop > timeLoop)
inlineinherited
Note
calling this turns this into a stationary assembler

◆ updateAfterGridAdaption()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::updateAfterGridAdaption ( )
inlineinherited

◆ updateGridVariables()

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
void Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::updateGridVariables ( const SolutionVector & curSol)
inlineinherited

Member Data Documentation

◆ couplingManager_

template<class MDTraits , class CMType , DiffMethod diffMethod, bool useImplicitAssembly = true>
std::shared_ptr<CouplingManager> Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::couplingManager_
protectedinherited

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