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

Standard Module for h-adaptive simulations. More...

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

Description

template<class TypeTag, bool adaptive>
class Dumux::GridAdapt< TypeTag, adaptive >

Standard Module for h-adaptive simulations.

This class is created by the problem class with the template parameters <TypeTag, true> and provides basic functionality for adaptive methods:

A standard implementation adaptGrid() will prepare everything to calculate the next pressure field on the new grid.

Public Member Functions

 GridAdapt (Problem &problem)
 
void init ()
 Initalization method of the h-adaptive module. More...
 
void adaptGrid ()
 Standard method to adapt the grid. More...
 
template<class Indicator >
void adaptGrid (Indicator &indicator)
 Method to adapt the grid with individual indicator vector. More...
 
template<class Indicator >
void markElements (Indicator &indicator)
 
bool wasAdapted ()
 Returns true if grid cells have been marked for adaptation. More...
 
void setLevels (int levMin, int levMax)
 
int getMaxLevel () const
 Returns maximum refinement level. More...
 
int getMinLevel () const
 Returns minimum refinement level. More...
 
AdaptionIndicator & adaptionIndicator ()
 
AdaptionIndicator & adaptionIndicator () const
 

Constructor & Destructor Documentation

◆ GridAdapt()

template<class TypeTag , bool adaptive>
Dumux::GridAdapt< TypeTag, adaptive >::GridAdapt ( Problem &  problem)
inline

Constructor for h-adaptive simulations (adaptive grids)

Parameters
problemThe problem

Member Function Documentation

◆ adaptGrid() [1/2]

template<class TypeTag , bool adaptive>
void Dumux::GridAdapt< TypeTag, adaptive >::adaptGrid ( )
inline

Standard method to adapt the grid.

This method is called from IMPETProblem::preTimeStep() if adaptive grids are used in the simulation. It uses the standard indicator (selected by the property AdaptionIndicator) and forwards to with it to the ultimate method adaptGrid(indicator), which uses a standard procedure for adaptivity: 1) Determine the refinement indicator 2) Mark the elements 3) Store primary variables in a map 4) Adapt the grid, adapt variables sizes, update mappers 5) Reconstruct primary variables, regain secondary variables

◆ adaptGrid() [2/2]

template<class TypeTag , bool adaptive>
template<class Indicator >
void Dumux::GridAdapt< TypeTag, adaptive >::adaptGrid ( Indicator &  indicator)
inline

Method to adapt the grid with individual indicator vector.

Parameters
indicatorThe refinement indicator that is applied

This method is called by an user-defined preTimeStep() of the applied problem and takes a given vector with indicator values.

It uses a standard procedure for adaptivity: 1) Determine the refinement indicator 2) Mark the elements 3) Store primary variables in a map 4) Adapt the grid, adapt variables sizes, update mappers 5) Reconstruct primary variables, regain secondary variables

◆ adaptionIndicator() [1/2]

template<class TypeTag , bool adaptive>
AdaptionIndicator & Dumux::GridAdapt< TypeTag, adaptive >::adaptionIndicator ( )
inline

◆ adaptionIndicator() [2/2]

template<class TypeTag , bool adaptive>
AdaptionIndicator & Dumux::GridAdapt< TypeTag, adaptive >::adaptionIndicator ( ) const
inline

◆ getMaxLevel()

template<class TypeTag , bool adaptive>
int Dumux::GridAdapt< TypeTag, adaptive >::getMaxLevel ( ) const
inline

Returns maximum refinement level.

The value is the assign maximum possible level, not the actual maximum level of the grid.

Returns
levelMax_ maximum level for refinement

◆ getMinLevel()

template<class TypeTag , bool adaptive>
int Dumux::GridAdapt< TypeTag, adaptive >::getMinLevel ( ) const
inline

Returns minimum refinement level.

The value is the assign minimum possible level, not the actual minimum level of the grid.

Returns
levelMin_ minimum level for coarsening

◆ init()

template<class TypeTag , bool adaptive>
void Dumux::GridAdapt< TypeTag, adaptive >::init ( )
inline

Initalization method of the h-adaptive module.

Prepares the grid for simulation after the initialization of the problem. The applied indicator is selectable via the property AdaptionInitializationIndicator

◆ markElements()

template<class TypeTag , bool adaptive>
template<class Indicator >
void Dumux::GridAdapt< TypeTag, adaptive >::markElements ( Indicator &  indicator)
inline

Mark Elements for grid refinement according to applied Indicator

Returns
Total ammount of marked cells

◆ setLevels()

template<class TypeTag , bool adaptive>
void Dumux::GridAdapt< TypeTag, adaptive >::setLevels ( int  levMin,
int  levMax 
)
inline

Sets minimum and maximum refinement levels

Parameters
levMinminimum level for coarsening
levMaxmaximum level for refinement

◆ wasAdapted()

template<class TypeTag , bool adaptive>
bool Dumux::GridAdapt< TypeTag, adaptive >::wasAdapted ( )
inline

Returns true if grid cells have been marked for adaptation.


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