Class defining an initialization indicator for grid adaption. Refines at sources and boundaries. Use before computing on the grid.  
 More...
#include <dumux/adaptive/initializationindicator.hh>
template<class TypeTag>
class Dumux::GridAdaptInitializationIndicator< TypeTag >
- Template Parameters
- 
  
    | TypeTag | The problem TypeTag |  
 
|  | 
|  | GridAdaptInitializationIndicator (std::shared_ptr< const Problem > problem, std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< const GridVariables > gridVariables) | 
|  | Constructor. 
 | 
|  | 
| void | setMinLevel (std::size_t minLevel) | 
|  | Function to set the minimum allowed level. 
 | 
|  | 
| void | setMaxLevel (std::size_t maxLevel) | 
|  | Function to set the maximum allowed level. 
 | 
|  | 
| void | setLevels (std::size_t minLevel, std::size_t maxLevel) | 
|  | Function to set the minimum/maximum allowed levels. 
 | 
|  | 
| void | setRefinementAtDirichletBC (bool refine) | 
|  | Function to set if refinement at Dirichlet boundaries is to be used. 
 | 
|  | 
| void | setRefinementAtSources (bool refine) | 
|  | Function to set if refinement at sources is to be used. 
 | 
|  | 
| void | setRefinementAtFluxBoundaries (bool refine) | 
|  | Function to set if refinement at sources is to be used. 
 | 
|  | 
| template<class SolutionVector> | 
| void | calculate (const SolutionVector &sol) | 
|  | Calculates the indicator used for refinement/coarsening for each grid cell. 
 | 
|  | 
| int | operator() (const Element &element) const | 
|  | function call operator to return mark 
 | 
|  | 
◆ GridAdaptInitializationIndicator()
template<class TypeTag> 
  
  | 
        
          | Dumux::GridAdaptInitializationIndicator< TypeTag >::GridAdaptInitializationIndicator | ( | std::shared_ptr< const Problem > | problem, |  
          |  |  | std::shared_ptr< const GridGeometry > | gridGeometry, |  
          |  |  | std::shared_ptr< const GridVariables > | gridVariables ) |  | inline | 
 
- Note
- Reads the following parameters from the parameter tree
- Adaptive.MinLevel The minimum refinement level
- Adaptive.MaxLevel The maximum refinement level
- Adaptive.RefineAtDirichletBC If to refine at Dirichlet boundaries (default: true)
- Adaptive.RefineAtFluxBC If to refine at Neumann/Robin boundaries (default: true)
- Adaptive.RefineAtSource If to refine where source terms are specified (default: true)
- Adaptive.BCRefinementThreshold The threshold above which fluxes are treated as non-zero (default: 1e-10) 
 
- Parameters
- 
  
    | problem | The problem object |  | gridGeometry | The finite volume geometry of the grid |  | gridVariables | The secondary variables on the grid |  
 
 
 
◆ calculate()
template<class TypeTag> 
template<class SolutionVector> 
 
- Parameters
- 
  
    | sol | The solution for which indicator is to be calculated |  
 
prepare an indicator for refinement
refine any element being below the minimum level
Check if we have to refine around a source term
Check if we have to refine at the boundary
check if scvf is on Neumann boundary
 
 
◆ operator()()
- Returns
- 1 if an element should be refined -1 if an element should be coarsened 0 otherwise
- Note
- In this initialization indicator implementation element coarsening is not considered.
- Parameters
- 
  
  
 
 
◆ setLevels()
◆ setMaxLevel()
◆ setMinLevel()
◆ setRefinementAtDirichletBC()
◆ setRefinementAtFluxBoundaries()
◆ setRefinementAtSources()
The documentation for this class was generated from the following file: