version 3.8
Dumux::GridAdaptInitializationIndicator< TypeTag > Class Template Reference

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>

Description

template<class TypeTag>
class Dumux::GridAdaptInitializationIndicator< TypeTag >
Template Parameters
TypeTagThe problem TypeTag

Public Member Functions

 GridAdaptInitializationIndicator (std::shared_ptr< const Problem > problem, std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< const GridVariables > gridVariables)
 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 minimum/maximum allowed levels. More...
 
void setRefinementAtDirichletBC (bool refine)
 Function to set if refinement at Dirichlet boundaries is to be used. More...
 
void setRefinementAtSources (bool refine)
 Function to set if refinement at sources is to be used. More...
 
void setRefinementAtFluxBoundaries (bool refine)
 Function to set if refinement at sources is to be used. More...
 
template<class SolutionVector >
void calculate (const SolutionVector &sol)
 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...
 

Constructor & Destructor Documentation

◆ 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
problemThe problem object
gridGeometryThe finite volume geometry of the grid
gridVariablesThe secondary variables on the grid

Member Function Documentation

◆ calculate()

template<class TypeTag >
template<class SolutionVector >
void Dumux::GridAdaptInitializationIndicator< TypeTag >::calculate ( const SolutionVector &  sol)
inline
Parameters
solThe 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()()

template<class TypeTag >
int Dumux::GridAdaptInitializationIndicator< TypeTag >::operator() ( const Element &  element) const
inline
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
elementA grid element

◆ setLevels()

template<class TypeTag >
void Dumux::GridAdaptInitializationIndicator< TypeTag >::setLevels ( std::size_t  minLevel,
std::size_t  maxLevel 
)
inline

◆ setMaxLevel()

template<class TypeTag >
void Dumux::GridAdaptInitializationIndicator< TypeTag >::setMaxLevel ( std::size_t  maxLevel)
inline

◆ setMinLevel()

template<class TypeTag >
void Dumux::GridAdaptInitializationIndicator< TypeTag >::setMinLevel ( std::size_t  minLevel)
inline

◆ setRefinementAtDirichletBC()

template<class TypeTag >
void Dumux::GridAdaptInitializationIndicator< TypeTag >::setRefinementAtDirichletBC ( bool  refine)
inline

◆ setRefinementAtFluxBoundaries()

template<class TypeTag >
void Dumux::GridAdaptInitializationIndicator< TypeTag >::setRefinementAtFluxBoundaries ( bool  refine)
inline

◆ setRefinementAtSources()

template<class TypeTag >
void Dumux::GridAdaptInitializationIndicator< TypeTag >::setRefinementAtSources ( bool  refine)
inline

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