version 3.11-dev
Loading...
Searching...
No Matches
Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly > Class Template Reference

A base class for all local assemblers. More...

#include <dumux/assembly/localassemblerbase.hh>

Description

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
class Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >
Template Parameters
TypeTagThe TypeTag
AssemblerThe assembler type
ImplementationThe assembler implementation
useImplicitAssemblySpecifies whether the time discretization is implicit or not (i.e. explicit)

Public Types

using LocalResidual = std::decay_t<decltype(std::declval<Assembler>().localResidual())>
using ElementResidualVector = typename LocalResidual::ElementResidualVector

Public Member Functions

 LocalAssemblerBase (const Assembler &assembler, const Element &element, const SolutionVector &curSol)
 The constructor. Delegates to the general constructor.
 LocalAssemblerBase (const Assembler &assembler, const Element &element, const SolutionVector &curSol, const ElementDiscretization &elemDisc, const ElementVariables &curElemVars, const ElementVariables &prevElemVars, const LocalResidual &localResidual, const bool elementIsGhost)
 The constructor. General version explicitly expecting each argument.
ElementResidualVector evalLocalResidual () const
 Convenience function to evaluate the complete local residual for the current element. Automatically chooses the appropriate element variables.
ElementResidualVector evalLocalResidual (const ElementVariables &elemVars) const
 Evaluates the complete local residual for the current element.
template<class Scalar>
ElementResidualVector evalLocalResidualForStage (const ElementVariables &elemVars, Scalar temporalWeight, Scalar spatialWeight) const
 Evaluate the stage-weighted residual for multi-stage (e.g. Runge-Kutta) assembly.
ElementResidualVector evalLocalFluxAndSourceResidual () const
 Convenience function to evaluate the flux and source terms (i.e., the terms without a time derivative) of the local residual for the current element. Automatically chooses the appropriate element variables.
ElementResidualVector evalLocalFluxAndSourceResidual (const ElementVariables &elemVars) const
 Evaluates the flux and source terms (i.e., the terms without a time derivative) of the local residual for the current element.
ElementResidualVector evalLocalStorageResidual () const
 Convenience function to evaluate storage term (i.e., the term with a time derivative) of the local residual for the current element.
void bindLocalViews ()
 Convenience function bind and prepare all relevant variables required for the evaluation of the local residual.
const Problem & problem () const
 The problem.
const Assembler & assembler () const
 The assembler.
const Element & element () const
 The current element.
bool elementIsGhost () const
 Returns if element is a ghost entity.
const SolutionVector & curSol () const
 The current solution.
ElementDiscretization & elemDisc ()
 The element discretization.
ElementVariables & curElemVars ()
 The current element variables.
ElementVariables & prevElemVars ()
 The element variables of the previous time step.
LocalResidual & localResidual ()
 The local residual for the current element.
const ElementDiscretization & elemDisc () const
 The element discretization.
const ElementVariables & curElemVars () const
 The current element variables.
const ElementVariables & prevElemVars () const
 The element variables of the previous time step.
const LocalResidual & localResidual () const
 The local residual for the current element.

Static Public Member Functions

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

Protected Member Functions

Implementation & asImp_ ()
const Implementation & asImp_ () const

Member Typedef Documentation

◆ ElementResidualVector

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
using Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::ElementResidualVector = typename LocalResidual::ElementResidualVector

◆ LocalResidual

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
using Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::LocalResidual = std::decay_t<decltype(std::declval<Assembler>().localResidual())>

Constructor & Destructor Documentation

◆ LocalAssemblerBase() [1/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::LocalAssemblerBase ( const Assembler & assembler,
const Element & element,
const SolutionVector & curSol )
inlineexplicit

◆ LocalAssemblerBase() [2/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::LocalAssemblerBase ( const Assembler & assembler,
const Element & element,
const SolutionVector & curSol,
const ElementDiscretization & elemDisc,
const ElementVariables & curElemVars,
const ElementVariables & prevElemVars,
const LocalResidual & localResidual,
const bool elementIsGhost )
inlineexplicit

Member Function Documentation

◆ asImp_() [1/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
Implementation & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::asImp_ ( )
inlineprotected

◆ asImp_() [2/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
const Implementation & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::asImp_ ( ) const
inlineprotected

◆ assembler()

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
const Assembler & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::assembler ( ) const
inline

◆ bindLocalViews()

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
void Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::bindLocalViews ( )
inline

◆ curElemVars() [1/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
ElementVariables & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::curElemVars ( )
inline

◆ curElemVars() [2/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
const ElementVariables & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::curElemVars ( ) const
inline

◆ curSol()

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
const SolutionVector & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::curSol ( ) const
inline

◆ elemDisc() [1/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
ElementDiscretization & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::elemDisc ( )
inline

◆ elemDisc() [2/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
const ElementDiscretization & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::elemDisc ( ) const
inline

◆ element()

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
const Element & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::element ( ) const
inline

◆ elementIsGhost()

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
bool Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::elementIsGhost ( ) const
inline

◆ evalLocalFluxAndSourceResidual() [1/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
ElementResidualVector Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::evalLocalFluxAndSourceResidual ( ) const
inline

◆ evalLocalFluxAndSourceResidual() [2/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
ElementResidualVector Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::evalLocalFluxAndSourceResidual ( const ElementVariables & elemVars) const
inline
Parameters
elemVarsThe element variables

◆ evalLocalResidual() [1/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
ElementResidualVector Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::evalLocalResidual ( ) const
inline

◆ evalLocalResidual() [2/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
ElementResidualVector Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::evalLocalResidual ( const ElementVariables & elemVars) const
inline
Note
With a multi-stage assembler this is the stage-weighted residual of the current stage.
Parameters
elemVarsThe element variables

◆ evalLocalResidualForStage()

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
template<class Scalar>
ElementResidualVector Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::evalLocalResidualForStage ( const ElementVariables & elemVars,
Scalar temporalWeight,
Scalar spatialWeight ) const
inline

Returns temporalWeight * raw_storage(elemVars) + spatialWeight * (flux + source)(elemVars)

Parameters
elemVarsElement variables bound to the current stage's solution
temporalWeightButcher tableau weight for the storage term at this stage
spatialWeightButcher tableau weight for the spatial term at this stage

◆ evalLocalStorageResidual()

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
ElementResidualVector Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::evalLocalStorageResidual ( ) const
inline

◆ isImplicit()

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
constexpr bool Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::isImplicit ( )
inlinestaticconstexpr

◆ localResidual() [1/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
LocalResidual & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::localResidual ( )
inline

◆ localResidual() [2/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
const LocalResidual & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::localResidual ( ) const
inline

◆ prevElemVars() [1/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
ElementVariables & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::prevElemVars ( )
inline

◆ prevElemVars() [2/2]

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
const ElementVariables & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::prevElemVars ( ) const
inline

◆ problem()

template<class TypeTag, class Assembler, class Implementation, bool useImplicitAssembly>
const Problem & Dumux::Experimental::LocalAssemblerBase< TypeTag, Assembler, Implementation, useImplicitAssembly >::problem ( ) const
inline

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