3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Member Functions | Static Public Member Functions | List of all members
Dumux::InteractionVolumeAssemblerBase< P, EG, EV > Class Template Reference

Defines the general interface of the local assembler classes for the assembly of the interaction volume-local transmissibility matrix. Specializations have to be provided for the available interaction volume implementations. these should derive from this base class. More...

#include <dumux/discretization/cellcentered/mpfa/localassemblerbase.hh>

Inheritance diagram for Dumux::InteractionVolumeAssemblerBase< P, EG, EV >:

Description

template<class P, class EG, class EV>
class Dumux::InteractionVolumeAssemblerBase< P, EG, EV >

Defines the general interface of the local assembler classes for the assembly of the interaction volume-local transmissibility matrix. Specializations have to be provided for the available interaction volume implementations. these should derive from this base class.

Template Parameters
PThe problem type
EGThe element finite volume geometry
EVThe element volume variables type

Public Member Functions

 InteractionVolumeAssemblerBase (const Problem &problem, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars)
 The constructor. Sets pointers to the objects required for a subsequent call to assemble(). More...
 
const Problem & problem () const
 
const FVElementGeometry & fvGeometry () const
 
const ElementVolumeVariables & elemVolVars () const
 
template<class DataHandle , class IV , class TensorFunc >
void assembleMatrices (DataHandle &handle, IV &iv, const TensorFunc &getT, Scalar< IV > wijZeroThresh=0.0)
 Assembles the matrices involved in the flux expressions and the local system of equations within an mpfa interaction volume. More...
 
template<class DataHandle , class IV , class GetU >
void assembleU (DataHandle &handle, const IV &iv, const GetU &getU)
 Assembles the vector of primary (cell) unknowns and (maybe) Dirichlet boundary conditions within an interaction volume. More...
 
template<class DataHandle , class IV , class GetRho >
void assembleGravity (DataHandle &handle, const IV &iv, const GetRho &getRho)
 Assembles the gravitational flux contributions on the scvfs within an interaction volume. More...
 

Static Public Member Functions

template<class FVElementGeometry , class DataHandle , class IV >
static void solveLocalSystem (const FVElementGeometry &fvGeometry, DataHandle &handle, IV &iv)
 Solves a previously assembled iv-local system of equations and stores the resulting transmissibilities in the provided containers within the interaction volume data handle. More...
 
template<class DataHandle , class IV >
static IV::Traits::MatVecTraits::FaceVector assembleFaceUnkowns (const DataHandle &handle, const IV &iv)
 Assembles the vector of face unknowns within an interaction volume. More...
 
template<class DataHandle , class IV >
static std::vector< typename IV::Traits::LocalScvType::GlobalCoordinate > assembleScvGradients (const DataHandle &handle, const IV &iv)
 Assembles the solution gradients in the sub-control volumes within an interaction volume. More...
 
template<class Matrix , class size_type , std::enable_if_t< matrixHasResizeFunction< Matrix >(), int > = 0>
static void resizeMatrix (Matrix &M, size_type rows, size_type cols)
 resizes a matrix to the given sizes (specialization for dynamic matrix type) More...
 
template<class Matrix , class size_type , std::enable_if_t<!matrixHasResizeFunction< Matrix >(), int > = 0>
static void resizeMatrix (Matrix &M, size_type rows, size_type cols)
 resizes a matrix to the given sizes (specialization for static matrix type - do nothing) More...
 
template<class Vector , class size_type , std::enable_if_t< vectorHasResizeFunction< Vector >(), int > = 0>
static void resizeVector (Vector &v, size_type size)
 resizes a vector to the given size (specialization for dynamic matrix type) More...
 
template<class Vector , class size_type , std::enable_if_t<!vectorHasResizeFunction< Vector >(), int > = 0>
static void resizeVector (Vector &v, size_type rows)
 resizes a vector to the given size (specialization for static vector type - do nothing) More...
 

Constructor & Destructor Documentation

◆ InteractionVolumeAssemblerBase()

template<class P , class EG , class EV >
Dumux::InteractionVolumeAssemblerBase< P, EG, EV >::InteractionVolumeAssemblerBase ( const Problem &  problem,
const FVElementGeometry &  fvGeometry,
const ElementVolumeVariables &  elemVolVars 
)
inline

The constructor. Sets pointers to the objects required for a subsequent call to assemble().

Parameters
problemThe problem to be solved (boundary/initial conditions etc.)
fvGeometryThe local view on the finite volume grid geometry
elemVolVarsThe local view on the primary/secondary variables

Member Function Documentation

◆ assembleFaceUnkowns()

template<class DataHandle , class IV >
static IV::Traits::MatVecTraits::FaceVector Dumux::InteractionVolumeAssemblerHelper::assembleFaceUnkowns ( const DataHandle &  handle,
const IV &  iv 
)
inlinestaticinherited

Assembles the vector of face unknowns within an interaction volume.

Note
This requires the data handle to be fully assembled already.
Parameters
handleThe data handle in which the vector is stored
ivThe interaction volume

◆ assembleGravity()

template<class P , class EG , class EV >
template<class DataHandle , class IV , class GetRho >
void Dumux::InteractionVolumeAssemblerBase< P, EG, EV >::assembleGravity ( DataHandle &  handle,
const IV &  iv,
const GetRho &  getRho 
)
inline

Assembles the gravitational flux contributions on the scvfs within an interaction volume.

Parameters
handleThe data handle in which the vector is stored
ivThe interaction volume
getRhoLambda to obtain the density from volume variables

For each face, we...

  • arithmetically average the phase densities
  • compute the term \( \alpha := \mathbf{A} \rho \ \mathbf{n}^T \mathbf{K} \mathbf{g} \) in each neighboring cell
  • compute \( \alpha^* = \sum{\alpha_{outside, i}} - \alpha_{inside} \)

◆ assembleMatrices()

template<class P , class EG , class EV >
template<class DataHandle , class IV , class TensorFunc >
void Dumux::InteractionVolumeAssemblerBase< P, EG, EV >::assembleMatrices ( DataHandle &  handle,
IV &  iv,
const TensorFunc &  getT,
Scalar< IV >  wijZeroThresh = 0.0 
)
inline

Assembles the matrices involved in the flux expressions and the local system of equations within an mpfa interaction volume.

Template Parameters
DataHandleThe data handle
IVThe interaction volume type implementation
TensorFuncLambda to obtain the tensor w.r.t. which the local system is to be solved
Parameters
handleThe data handle in which the matrices are stored
ivThe interaction volume
getTLambda to evaluate the scv-wise tensors
wijZeroThreshthe zero threshold wij

◆ assembleScvGradients()

template<class DataHandle , class IV >
static std::vector< typename IV::Traits::LocalScvType::GlobalCoordinate > Dumux::InteractionVolumeAssemblerHelper::assembleScvGradients ( const DataHandle &  handle,
const IV &  iv 
)
inlinestaticinherited

Assembles the solution gradients in the sub-control volumes within an interaction volume.

Note
This requires the data handle to be fully assembled already.
Parameters
handleThe data handle in which the vector is stored
ivThe interaction volume

◆ assembleU()

template<class P , class EG , class EV >
template<class DataHandle , class IV , class GetU >
void Dumux::InteractionVolumeAssemblerBase< P, EG, EV >::assembleU ( DataHandle &  handle,
const IV &  iv,
const GetU &  getU 
)
inline

Assembles the vector of primary (cell) unknowns and (maybe) Dirichlet boundary conditions within an interaction volume.

Template Parameters
IVThe interaction volume type implementation
GetULambda to obtain the cell unknowns from grid indices
Parameters
handleThe data handle in which the vector is stored
ivThe interaction volume
getULambda to obtain the desired cell/Dirichlet value from vol vars

◆ elemVolVars()

template<class P , class EG , class EV >
const ElementVolumeVariables & Dumux::InteractionVolumeAssemblerBase< P, EG, EV >::elemVolVars ( ) const
inline

◆ fvGeometry()

template<class P , class EG , class EV >
const FVElementGeometry & Dumux::InteractionVolumeAssemblerBase< P, EG, EV >::fvGeometry ( ) const
inline

◆ problem()

template<class P , class EG , class EV >
const Problem & Dumux::InteractionVolumeAssemblerBase< P, EG, EV >::problem ( ) const
inline

◆ resizeMatrix() [1/2]

template<class Matrix , class size_type , std::enable_if_t< matrixHasResizeFunction< Matrix >(), int > = 0>
static void Dumux::InteractionVolumeAssemblerHelper::resizeMatrix ( Matrix &  M,
size_type  rows,
size_type  cols 
)
inlinestaticinherited

resizes a matrix to the given sizes (specialization for dynamic matrix type)

◆ resizeMatrix() [2/2]

template<class Matrix , class size_type , std::enable_if_t<!matrixHasResizeFunction< Matrix >(), int > = 0>
static void Dumux::InteractionVolumeAssemblerHelper::resizeMatrix ( Matrix &  M,
size_type  rows,
size_type  cols 
)
inlinestaticinherited

resizes a matrix to the given sizes (specialization for static matrix type - do nothing)

◆ resizeVector() [1/2]

template<class Vector , class size_type , std::enable_if_t<!vectorHasResizeFunction< Vector >(), int > = 0>
static void Dumux::InteractionVolumeAssemblerHelper::resizeVector ( Vector &  v,
size_type  rows 
)
inlinestaticinherited

resizes a vector to the given size (specialization for static vector type - do nothing)

◆ resizeVector() [2/2]

template<class Vector , class size_type , std::enable_if_t< vectorHasResizeFunction< Vector >(), int > = 0>
static void Dumux::InteractionVolumeAssemblerHelper::resizeVector ( Vector &  v,
size_type  size 
)
inlinestaticinherited

resizes a vector to the given size (specialization for dynamic matrix type)

◆ solveLocalSystem()

template<class FVElementGeometry , class DataHandle , class IV >
static void Dumux::InteractionVolumeAssemblerHelper::solveLocalSystem ( const FVElementGeometry &  fvGeometry,
DataHandle &  handle,
IV &  iv 
)
inlinestaticinherited

Solves a previously assembled iv-local system of equations and stores the resulting transmissibilities in the provided containers within the interaction volume data handle.

Parameters
fvGeometryThe bound element finite volume geometry
handleThe data handle in which the matrices are stored
ivThe interaction volume

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