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

#include <fvbaselocalresidual.hh>

Public Member Functions

 FvBaseLocalResidual ()
 
 ~FvBaseLocalResidual ()
 
const LocalBlockVector & residual () const
 Return the result of the eval() call using internal storage. More...
 
const VectorBlock & residual (int dofIdx) const
 Return the result of the eval() call using internal storage. More...
 
const LocalBlockVector & storageTerm () const
 Return the storage term calculated using the last call to eval() using internal storage. More...
 
const VectorBlock & storageTerm (int dofIdx) const
 Return the storage term calculated using the last call to eval() 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 (const ElementContext &elemCtx)
 Compute the local residual, i.e. the deviation of the conservation equations from zero and store the results internally. More...
 
void eval (LocalBlockVector &residual, LocalBlockVector &storage, const ElementContext &elemCtx) const
 Compute the local residual, i.e. the deviation of the conservation equations from zero. More...
 
void evalStorage (const ElementContext &elemCtx, int timeIdx)
 Calculate the amount of all conservation quantities stored in all element's primary sub-control volumes for a given history index. More...
 
void evalStorage (LocalBlockVector &storage, const ElementContext &elemCtx, int 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 (LocalBlockVector &residual, const ElementContext &elemCtx, int timeIdx) const
 Add the flux term to a local residual. More...
 
void computeStorage (EqVector &storage, const ElementContext &elemCtx, int dofIdx, int timeIdx) const
 Evaluate the amount all conservation quantities (e.g. phase mass) within a finite sub-control volume. More...
 
void computeFlux (RateVector &flux, const ElementContext &elemCtx, int scvfIdx, int timeIdx) const
 Evaluates the total mass flux of all conservation quantities over a face of a sub-control volume. More...
 
void computeSource (RateVector &source, const ElementContext &elemCtx, int dofIdx, int timeIdx) 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_ (LocalBlockVector &residual, const ElementContext &elemCtx, int timeIdx) const
 Evaluate the boundary conditions of an element. More...
 
void evalBoundarySegment_ (LocalBlockVector &residual, const BoundaryContext &boundaryCtx, int boundaryFaceIdx, int timeIdx) const
 Evaluate all boundary conditions for a single sub-control volume face to the local residual. More...
 
void evalConstraints_ (LocalBlockVector &residual, LocalBlockVector &storage, const ElementContext &elemCtx, int timeIdx) const
 Set the values of the constraint volumes of the current element. More...
 
void evalVolumeTerms_ (LocalBlockVector &residual, LocalBlockVector &storage, const 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 Ewoms::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.

Constructor & Destructor Documentation

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

Member Function Documentation

template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::computeFlux ( RateVector &  flux,
const ElementContext &  elemCtx,
int  scvfIdx,
int  timeIdx 
) 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.
template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::computeSource ( RateVector &  source,
const ElementContext &  elemCtx,
int  dofIdx,
int  timeIdx 
) const
inline

Calculate the source term of the equation.

Parameters
sourceThe values of the source term.
template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::computeStorage ( EqVector &  storage,
const ElementContext &  elemCtx,
int  dofIdx,
int  timeIdx 
) 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.
template<class TypeTag >
void Ewoms::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() and storageTerm() methods.

Parameters
problemThe physical problem which ought to be solved.
elementThe DUNE element (i.e. the codim-0 entity) of interest.
template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::eval ( const 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() and storageTerm() methods.

template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::eval ( LocalBlockVector &  residual,
LocalBlockVector &  storage,
const 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.
storageStores the total amount of each conserved quantity inside the domain.
template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::evalBoundary_ ( LocalBlockVector &  residual,
const ElementContext &  elemCtx,
int  timeIdx 
) const
inlineprotected

Evaluate the boundary conditions of an element.

References Ewoms::FvBaseLocalResidual< TypeTag >::evalBoundarySegment_().

template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::evalBoundarySegment_ ( LocalBlockVector &  residual,
const BoundaryContext &  boundaryCtx,
int  boundaryFaceIdx,
int  timeIdx 
) const
inlineprotected

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

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

template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::evalConstraints_ ( LocalBlockVector &  residual,
LocalBlockVector &  storage,
const ElementContext &  elemCtx,
int  timeIdx 
) const
inlineprotected

Set the values of the constraint volumes of the current element.

References GET_PROP_VALUE.

template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::evalFluxes ( LocalBlockVector &  residual,
const ElementContext &  elemCtx,
int  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.
template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::evalStorage ( const ElementContext &  elemCtx,
int  timeIdx 
)
inline

Calculate the amount of all conservation quantities stored in all element's primary 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
timeIdxThe index used by the time discretization.
template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::evalStorage ( LocalBlockVector &  storage,
const ElementContext &  elemCtx,
int  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.
template<class TypeTag >
void Ewoms::FvBaseLocalResidual< TypeTag >::evalVolumeTerms_ ( LocalBlockVector &  residual,
LocalBlockVector &  storage,
const 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.

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

Register all run-time parameters for the local residual.

template<class TypeTag >
const LocalBlockVector& Ewoms::FvBaseLocalResidual< TypeTag >::residual ( ) const
inline

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

template<class TypeTag >
const VectorBlock& Ewoms::FvBaseLocalResidual< TypeTag >::residual ( int  dofIdx) const
inline

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

template<class TypeTag >
const LocalBlockVector& Ewoms::FvBaseLocalResidual< TypeTag >::storageTerm ( ) const
inline

Return the storage term calculated using the last call to eval() using internal storage.

template<class TypeTag >
const VectorBlock& Ewoms::FvBaseLocalResidual< TypeTag >::storageTerm ( int  dofIdx) const
inline

Return the storage term calculated using the last call to eval() using internal storage.


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