3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | List of all members
Dumux::VariableClassAdaptive< TypeTag > Class Template Reference

Base class holding the variables and discretized data for sequential models. More...

#include <dumux/porousmediumflow/sequential/variableclassadaptive.hh>

Inheritance diagram for Dumux::VariableClassAdaptive< TypeTag >:

Description

template<class TypeTag>
class Dumux::VariableClassAdaptive< TypeTag >

Base class holding the variables and discretized data for sequential models.

Stores global information and variables that are common for all sequential models and also functions needed to access these variables. Can be directly used for a single phase model.

Template Parameters
TypeTagThe Type Tag

Public Types

using CellDataVector = typename std::vector< CellData >
 

Public Member Functions

 VariableClassAdaptive (const GridView &gridView)
 Constructs an adaptive VariableClass object. More...
 
void storePrimVars (const Problem &problem)
 
void reconstructPrimVars (const Problem &problem)
 
void initialize ()
 Initializes the variable class. More...
 
void adaptVariableSize (const int size)
 Resizes sequential variable vectors. More...
 
CellDataVectorcellDataGlobal ()
 Return the vector holding all cell data. More...
 
const CellDataVectorcellDataGlobal () const
 
CellData & cellData (const int idx)
 Return the cell data of a specific cell. More...
 
const CellData & cellData (const int idx) const
 
int index (const Element &element) const
 Get index of element (codim 0 entity) More...
 
int index (const Vertex &vertex) const
 Get index of vertex (codim dim entity) More...
 
const GridView & gridView () const
 Return gridView. More...
 
ElementMapper & elementMapper ()
 Return mapper for elements (for adaptive grids) More...
 
const ElementMapper & elementMapper () const
 Return mapper for elements (for static grids) More...
 
VertexMapper & vertexMapper ()
 Return mapper for vertices (for adaptive grids) More...
 
const VertexMapper & vertexMapper () const
 Return mapper for vertices (for static grids) More...
 

Member Typedef Documentation

◆ CellDataVector

template<class TypeTag >
using Dumux::VariableClass< TypeTag >::CellDataVector = typename std::vector<CellData>
inherited

Constructor & Destructor Documentation

◆ VariableClassAdaptive()

template<class TypeTag >
Dumux::VariableClassAdaptive< TypeTag >::VariableClassAdaptive ( const GridView &  gridView)
inline

Constructs an adaptive VariableClass object.

In addition to providing a storage object for cell-centered Methods, this class provides mapping functionality to adapt the grid.

Parameters
gridViewa DUNE gridview object corresponding to diffusion and transport equation

Member Function Documentation

◆ adaptVariableSize()

template<class TypeTag >
void Dumux::VariableClass< TypeTag >::adaptVariableSize ( const int  size)
inlineinherited

Resizes sequential variable vectors.

Method that change the size of the vectors for h-adaptive simulations.

Parameters
sizeSize of the current (refined and coarsened) grid

◆ cellData() [1/2]

template<class TypeTag >
CellData & Dumux::VariableClass< TypeTag >::cellData ( const int  idx)
inlineinherited

Return the cell data of a specific cell.

◆ cellData() [2/2]

template<class TypeTag >
const CellData & Dumux::VariableClass< TypeTag >::cellData ( const int  idx) const
inlineinherited

◆ cellDataGlobal() [1/2]

template<class TypeTag >
CellDataVector & Dumux::VariableClass< TypeTag >::cellDataGlobal ( )
inlineinherited

Return the vector holding all cell data.

◆ cellDataGlobal() [2/2]

template<class TypeTag >
const CellDataVector & Dumux::VariableClass< TypeTag >::cellDataGlobal ( ) const
inlineinherited

◆ elementMapper() [1/2]

template<class TypeTag >
ElementMapper & Dumux::VariableClass< TypeTag >::elementMapper ( )
inlineinherited

Return mapper for elements (for adaptive grids)

◆ elementMapper() [2/2]

template<class TypeTag >
const ElementMapper & Dumux::VariableClass< TypeTag >::elementMapper ( ) const
inlineinherited

Return mapper for elements (for static grids)

◆ gridView()

template<class TypeTag >
const GridView & Dumux::VariableClass< TypeTag >::gridView ( ) const
inlineinherited

Return gridView.

◆ index() [1/2]

template<class TypeTag >
int Dumux::VariableClass< TypeTag >::index ( const Element &  element) const
inlineinherited

Get index of element (codim 0 entity)

Get index of element (codim 0 entity).

Parameters
elementcodim 0 entity
Returns
element index

◆ index() [2/2]

template<class TypeTag >
int Dumux::VariableClass< TypeTag >::index ( const Vertex &  vertex) const
inlineinherited

Get index of vertex (codim dim entity)

Get index of vertex (codim dim entity).

Parameters
vertexcodim dim entity
Returns
vertex index

◆ initialize()

template<class TypeTag >
void Dumux::VariableClass< TypeTag >::initialize ( )
inlineinherited

Initializes the variable class.

Method initializes the cellData vector. Should be called from problem init()

◆ reconstructPrimVars()

template<class TypeTag >
void Dumux::VariableClassAdaptive< TypeTag >::reconstructPrimVars ( const Problem &  problem)
inline

Reconstruct missing primary variables (where elements are created/deleted)

To reconstruct the solution in father elements, problem properties might need to be accessed. Starting from the lowest level, the old solution is mapped on the new grid: Where coarsened, new cells get information from old father element. Where refined, a new solution is reconstructed from the old father cell, and then a new son is created. That is then stored into the general data structure (CellData).

Parameters
problemThe current problem

◆ storePrimVars()

template<class TypeTag >
void Dumux::VariableClassAdaptive< TypeTag >::storePrimVars ( const Problem &  problem)
inline

Store primary variables

To reconstruct the solution in father elements, problem properties might need to be accessed. From upper level on downwards, the old solution is stored into an container object, before the grid is adapted. Father elements hold averaged information from the son cells for the case of the sons being coarsened.

Parameters
problemThe current problem

◆ vertexMapper() [1/2]

template<class TypeTag >
VertexMapper & Dumux::VariableClass< TypeTag >::vertexMapper ( )
inlineinherited

Return mapper for vertices (for adaptive grids)

◆ vertexMapper() [2/2]

template<class TypeTag >
const VertexMapper & Dumux::VariableClass< TypeTag >::vertexMapper ( ) const
inlineinherited

Return mapper for vertices (for static grids)


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