A linear system assembler (residual and Jacobian) for finite volume schemes (box, tpfa, mpfa, ...) with multiple domains. More...
#include <dumux/multidomain/fvassembler.hh>
A linear system assembler (residual and Jacobian) for finite volume schemes (box, tpfa, mpfa, ...) with multiple domains.
MDTraits | the multidimension traits |
diffMethod | the differentiation method to residual compute derivatives |
useImplicitAssembly | if to use an implicit or explicit time discretization |
Public Types | |
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. 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 | FVGridGeometry = GridGeometry< id > |
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 = SolutionVector |
using | CouplingManager = CMType |
Public Member Functions | |
MultiDomainFVAssembler (ProblemTuple &&problem, GridGeometryTuple &&gridGeometry, GridVariablesTuple &&gridVariables, std::shared_ptr< CouplingManager > couplingManager) | |
The constructor for stationary problems. More... | |
MultiDomainFVAssembler (ProblemTuple &&problem, GridGeometryTuple &&gridGeometry, GridVariablesTuple &&gridVariables, std::shared_ptr< CouplingManager > couplingManager, std::shared_ptr< const TimeLoop > timeLoop) | |
The constructor for instationary problems. More... | |
MultiDomainFVAssembler (ProblemTuple &&problem, GridGeometryTuple &&gridGeometry, GridVariablesTuple &&gridVariables, std::shared_ptr< CouplingManager > couplingManager, std::shared_ptr< const TimeLoop > timeLoop, 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 | assembleResidual (ResidualType &r, const SolutionVector &curSol) |
assemble a residual r More... | |
Scalar | residualNorm (const SolutionVector &curSol) |
void | setLinearSystem (std::shared_ptr< JacobianMatrix > A, std::shared_ptr< SolutionVector > 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. 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 | setJacobianBuildMode (JacobianMatrix &jac) const |
Sets the jacobian build mode. More... | |
void | setJacobianPattern (JacobianMatrix &jac) const |
Sets the jacobian sparsity pattern. More... | |
void | setResidualSize (SolutionVector &res) const |
Resizes the residual. 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 & | fvGridGeometry (Dune::index_constant< i > domainId) const |
the finite volume grid geometry 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 CouplingManager & | couplingManager () const |
the coupling manager More... | |
JacobianMatrix & | jacobian () |
the full Jacobian matrix More... | |
SolutionVector & | residual () |
the full residual vector More... | |
const SolutionVector & | prevSol () const |
the solution of the previous time step More... | |
void | setTimeManager (std::shared_ptr< const TimeLoop > timeLoop) |
Set time loop for instationary problems. More... | |
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. More... | |
bool | isStationaryProblem () const |
Whether we are assembling a stationary or instationary problem. More... | |
template<std::size_t i> | |
LocalResidual< i > | localResidual (Dune::index_constant< i > domainId) const |
Create a local residual object (used by the local assembler) More... | |
Static Public Member Functions | |
static constexpr bool | isImplicit () |
Returns true if the assembler considers implicit assembly. More... | |
Protected Attributes | |
std::shared_ptr< CouplingManager > | couplingManager_ |
the coupling manager coupling the sub domains More... | |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::CouplingManager = CMType |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::FVGridGeometry = GridGeometry<id> |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::GridGeometry = typename MDTraits::template SubDomain<id>::GridGeometry |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::GridVariables = typename MDTraits::template SubDomain<id>::GridVariables |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::JacobianMatrix = typename MDTraits::JacobianMatrix |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::LocalResidual = GetPropType<SubDomainTypeTag<id>, Properties::LocalResidual> |
TODO get rid of this GetPropType.
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::Problem = typename MDTraits::template SubDomain<id>::Problem |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::ResidualType = SolutionVector |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::Scalar = typename MDTraits::Scalar |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::SolutionVector = typename MDTraits::SolutionVector |
using Dumux::MultiDomainFVAssembler< MDTraits, CMType, diffMethod, useImplicitAssembly >::Traits = MDTraits |
|
inline |
The constructor for stationary problems.
|
inline |
The constructor for instationary problems.
|
inline |
The constructor for instationary problems.
|
inline |
Assembles the global Jacobian of the residual and the residual for the current solution.
|
inline |
compute the residuals using the internal residual
|
inline |
assemble a residual r
|
inline |
the coupling manager
|
inline |
the finite volume grid geometry of domain i
|
inline |
the finite volume grid geometry of domain i
|
inline |
the grid variables of domain i
|
inline |
the grid variables of domain i
|
inline |
the grid view of domain i
|
inlinestaticconstexpr |
Returns true if the assembler considers implicit assembly.
|
inline |
Whether we are assembling a stationary or instationary problem.
|
inline |
the full Jacobian matrix
|
inline |
Create a local residual object (used by the local assembler)
|
inline |
the number of dof locations of domain i
|
inline |
the solution of the previous time step
|
inline |
the problem of domain i
|
inline |
Resets the grid variables to the last time step.
|
inline |
the full residual vector
|
inline |
compute the residual and return it's vector norm TODO: this needs to be adapted in parallel
|
inline |
Sets the jacobian build mode.
|
inline |
Sets the jacobian sparsity pattern.
|
inline |
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.
|
inline |
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.
|
inline |
Sets the solution from which to start the time integration. Has to be called prior to assembly for time-dependent problems.
|
inline |
Resizes the residual.
|
inline |
Set time loop for instationary problems.
|
inline |
Updates the grid variables with the given solution.
|
protected |
the coupling manager coupling the sub domains