Element-wise caculation of the residual matrix for models based on a finite volume spatial discretization. More...

#include <fvbaselocalresidual.hh>

Public Types

using LocalEvalBlockVector = Dune::BlockVector< EvalVector, aligned_allocator< EvalVector, alignof(EvalVector)> >
 

Public Member Functions

 FvBaseLocalResidual ()
 
 ~FvBaseLocalResidual ()
 
const LocalEvalBlockVectorresidual () const
 Return the result of the eval() call using internal storage. More...
 
const EvalVector & residual (unsigned dofIdx) const
 Return the result of the eval() call using internal storage. More...
 
void eval (const Problem &problem, const Element &element)
 Compute the local residual, i.e. the deviation of the conservation equations from zero and store the results internally. More...
 
void eval (ElementContext &elemCtx)
 Compute the local residual, i.e. the deviation of the conservation equations from zero and store the results internally. More...
 
void eval (LocalEvalBlockVector &residual, ElementContext &elemCtx) const
 Compute the local residual, i.e. the deviation of the conservation equations from zero. More...
 
void evalStorage (LocalEvalBlockVector &storage, const ElementContext &elemCtx, unsigned timeIdx) const
 Calculate the amount of all conservation quantities stored in all element's sub-control volumes for a given history index. More...
 
void evalFluxes (LocalEvalBlockVector &residual, const ElementContext &elemCtx, unsigned timeIdx) const
 Add the flux term to a local residual. More...
 
void computeStorage (EqVector &, const ElementContext &, unsigned, unsigned) const
 Evaluate the amount all conservation quantities (e.g. phase mass) within a finite sub-control volume. More...
 
void computeFlux (RateVector &, const ElementContext &, unsigned, unsigned) const
 Evaluates the total mass flux of all conservation quantities over a face of a sub-control volume. More...
 
void computeSource (RateVector &, const ElementContext &, unsigned, unsigned) const
 Calculate the source term of the equation. More...
 

Static Public Member Functions

static void registerParameters ()
 Register all run-time parameters for the local residual. More...
 

Protected Member Functions

void evalBoundary_ (LocalEvalBlockVector &residual, const ElementContext &elemCtx, unsigned timeIdx) const
 Evaluate the boundary conditions of an element. More...
 
void evalBoundarySegment_ (LocalEvalBlockVector &residual, const BoundaryContext &boundaryCtx, unsigned boundaryFaceIdx, unsigned timeIdx) const
 Evaluate all boundary conditions for a single sub-control volume face to the local residual. More...
 
void evalVolumeTerms_ (LocalEvalBlockVector &residual, ElementContext &elemCtx) const
 Add the change in the storage terms and the source term to the local residual of all sub-control volumes of the current element. More...
 

Detailed Description

template<class TypeTag>
class Opm::FvBaseLocalResidual< TypeTag >

Element-wise caculation of the residual matrix for models based on a finite volume spatial discretization.

Template Parameters
TypeTagThe type tag on which all required properties are defined.

Member Typedef Documentation

◆ LocalEvalBlockVector

template<class TypeTag >
using Opm::FvBaseLocalResidual< TypeTag >::LocalEvalBlockVector = Dune::BlockVector<EvalVector, aligned_allocator<EvalVector, alignof(EvalVector)> >

Constructor & Destructor Documentation

◆ FvBaseLocalResidual()

template<class TypeTag >
Opm::FvBaseLocalResidual< TypeTag >::FvBaseLocalResidual ( )
inline

◆ ~FvBaseLocalResidual()

template<class TypeTag >
Opm::FvBaseLocalResidual< TypeTag >::~FvBaseLocalResidual ( )
inline

Member Function Documentation

◆ computeFlux()

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::computeFlux ( RateVector &  ,
const ElementContext &  ,
unsigned  ,
unsigned   
) const
inline

Evaluates the total mass flux of all conservation quantities over a face of a sub-control volume.

Parameters
fluxArea-specific flux over the phase.

◆ computeSource()

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::computeSource ( RateVector &  ,
const ElementContext &  ,
unsigned  ,
unsigned   
) const
inline

Calculate the source term of the equation.

Parameters
sourceThe values of the source term.

◆ computeStorage()

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::computeStorage ( EqVector &  ,
const ElementContext &  ,
unsigned  ,
unsigned   
) const
inline

Evaluate the amount all conservation quantities (e.g. phase mass) within a finite sub-control volume.

Parameters
storageStores the total amount of each conserved quantity inside the domain.

◆ eval() [1/3]

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::eval ( const Problem &  problem,
const Element &  element 
)
inline

Compute the local residual, i.e. the deviation of the conservation equations from zero and store the results internally.

The results can be requested afterwards using the residual() method.

Parameters
problemThe physical problem which ought to be solved.
elementThe DUNE element (i.e. the codim-0 entity) of interest.

References Opm::FvBaseLocalResidual< TypeTag >::eval().

Referenced by Opm::FvBaseLocalResidual< TypeTag >::eval().

◆ eval() [2/3]

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::eval ( ElementContext &  elemCtx)
inline

Compute the local residual, i.e. the deviation of the conservation equations from zero and store the results internally.

The results can be requested afterwards using the residual() method.

◆ eval() [3/3]

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::eval ( LocalEvalBlockVector residual,
ElementContext &  elemCtx 
) const
inline

Compute the local residual, i.e. the deviation of the conservation equations from zero.

Parameters
residualStores the residual of each conserved quantity.

References Opm::FvBaseLocalResidual< TypeTag >::residual().

◆ evalBoundary_()

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::evalBoundary_ ( LocalEvalBlockVector residual,
const ElementContext &  elemCtx,
unsigned  timeIdx 
) const
inlineprotected

◆ evalBoundarySegment_()

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::evalBoundarySegment_ ( LocalEvalBlockVector residual,
const BoundaryContext &  boundaryCtx,
unsigned  boundaryFaceIdx,
unsigned  timeIdx 
) const
inlineprotected

Evaluate all boundary conditions for a single sub-control volume face to the local residual.

References Opm::FvBaseLocalResidual< TypeTag >::residual().

Referenced by Opm::FvBaseLocalResidual< TypeTag >::evalBoundary_().

◆ evalFluxes()

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::evalFluxes ( LocalEvalBlockVector residual,
const ElementContext &  elemCtx,
unsigned  timeIdx 
) const
inline

Add the flux term to a local residual.

Parameters
residualStores the residual of each conserved quantity.
timeIdxThe index used by the time discretization.

References Opm::FvBaseLocalResidual< TypeTag >::residual().

◆ evalStorage()

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::evalStorage ( LocalEvalBlockVector storage,
const ElementContext &  elemCtx,
unsigned  timeIdx 
) const
inline

Calculate the amount of all conservation quantities stored in all element's sub-control volumes for a given history index.

This is used to figure out how much of each conservation quantity is inside the element.

Parameters
storageStores the total amount of each conserved quantity inside the domain.
timeIdxThe index used by the time discretization.

◆ evalVolumeTerms_()

template<class TypeTag >
void Opm::FvBaseLocalResidual< TypeTag >::evalVolumeTerms_ ( LocalEvalBlockVector residual,
ElementContext &  elemCtx 
) const
inlineprotected

Add the change in the storage terms and the source term to the local residual of all sub-control volumes of the current element.

References Opm::FvBaseLocalResidual< TypeTag >::residual().

◆ registerParameters()

template<class TypeTag >
static void Opm::FvBaseLocalResidual< TypeTag >::registerParameters ( )
inlinestatic

Register all run-time parameters for the local residual.

◆ residual() [1/2]

◆ residual() [2/2]

template<class TypeTag >
const EvalVector & Opm::FvBaseLocalResidual< TypeTag >::residual ( unsigned  dofIdx) const
inline

Return the result of the eval() call using internal storage.


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