Class defining a standard, saturation dependent indicator for grid adaptation. More...
#include <dumux/porousmediumflow/2p/gridadaptindicator.hh>
Class defining a standard, saturation dependent indicator for grid adaptation.
Public Member Functions | |
TwoPGridAdaptIndicator (std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="") | |
The Constructor. More... | |
void | setMinLevel (std::size_t minLevel) |
Function to set the minimum allowed level. More... | |
void | setMaxLevel (std::size_t maxLevel) |
Function to set the maximum allowed level. More... | |
void | setLevels (std::size_t minLevel, std::size_t maxLevel) |
Function to set the minumum/maximum allowed levels. More... | |
void | calculate (const SolutionVector &sol, Scalar refineTol=0.05, Scalar coarsenTol=0.001) |
Calculates the indicator used for refinement/coarsening for each grid cell. More... | |
int | operator() (const Element &element) const |
function call operator to return mark More... | |
|
inline |
The Constructor.
gridGeometry | The finite volume grid geometry |
paramGroup | The parameter group in which to look for runtime parameters first (default is "") |
Note: refineBound_, coarsenBound_ & maxSaturationDelta_ are chosen in a way such that the indicator returns false for all elements before having been calculated.
|
inline |
Calculates the indicator used for refinement/coarsening for each grid cell.
sol | The solution vector |
refineTol | The refinement tolerance |
coarsenTol | The coarsening tolerance |
This standard two-phase indicator is based on the saturation gradient.
Reset the indicator to a state that returns false for all elements
maxLevel_ must be higher than minLevel_ to allow for refinement
Check for inadmissible tolerance combination
Variables to hold the max/mon saturation values on the leaf
Calculate minimum and maximum saturation
Index of the current leaf-element
Obtain the saturation at the center of the element
Maybe update the global minimum/maximum
Calculate maximum delta in saturation for this cell
Only consider internal intersections
Access neighbor
Visit intersection only once
Obtain saturation in the neighbor
Compute the maximum delta in saturation
Compute the refinement/coarsening bounds
check if neighbors have to be refined too
|
inline |
function call operator to return mark
element | A grid element |
|
inline |
Function to set the minumum/maximum allowed levels.
minLevel | The minimum level |
maxLevel | The maximum level |
|
inline |
Function to set the maximum allowed level.
maxLevel | The maximum level |
|
inline |
Function to set the minimum allowed level.
minLevel | The minimum level |