AMDiS  0.1
The Adaptive Multi-Dimensional Simulation Toolbox
GridFunctionMarker< Grid, GridFct > Class Template Reference

Marker based on an indicator given as grid-function. More...

#include <Marker.hpp>

Inherits Marker< Grid >.

Public Member Functions

template<class GF >
 GridFunctionMarker (std::string const &name, std::shared_ptr< Grid > const &grid, GF &&gf)
void markElement (AdaptInfo &, Element const &) final
 Implementation of Marker::markElement. Does nothing since marking is done in markGrid().
Flag markGrid (AdaptInfo &adaptInfo) override
- Public Member Functions inherited from Marker< Grid >
 Marker ()=default
 Marker (std::string const &name, std::shared_ptr< Grid > const &grid)
virtual ~Marker ()=default
void mark (Element const &elem, int newMark)
virtual void initMarking (AdaptInfo &adaptInfo)
 Called before traversal.
virtual void finishMarking (AdaptInfo &adaptInfo)
 Called after traversal.
int elMarkRefine () const
 Returns elMarkRefine_ of the Marker.
int elMarkCoarsen () const
 Returns elMarkCoarsen_ of the Marker.
std::string const & name () const
 Returns name_ of the Marker.
void setMaximumMarking (bool maxMark)
 Sets maximumMarking_.
void allowRefinement (bool allow)
 Sets refineAllowed_.
void allowCoarsening (bool allow)
 Sets coarsenAllowed_.

Additional Inherited Members

- Protected Types inherited from Marker< Grid >
using GridView = typename Grid::LeafGridView
using Element = typename GridView::template Codim< 0 >::Entity
- Protected Attributes inherited from Marker< Grid >
std::string name_
 Name of the marker.
std::shared_ptr< Grid > grid_
 Pointer to the grid.
bool maximumMarking_ = false
int info_ = 0
 Info level.
int elMarkRefine_ = 0
 Counter for elements marked for refinement.
int elMarkCoarsen_ = 0
 Counter for elements marked for coarsening.
int maxRefineLevel_ = std::numeric_limits<int>::max()
 Maximal level of all elements.
int minRefineLevel_ = 0
 Minimal level of all elements.
bool refineAllowed_ = true
 Allow elements to be marked for refinement.
bool coarsenAllowed_ = true
 Allow elements to be marked for coarsening.

Detailed Description

template<class Grid, class GridFct>
class AMDiS::GridFunctionMarker< Grid, GridFct >

Marker based on an indicator given as grid-function.

On each element the grid-function is evaluated in the barycenter. The returned values must be an integer (or convertible to an integer) indicating the desired refinement level of this element. The element is marked for refinement if the current level is < the desired level or coarsened, if >.

Template Parameters
GridAn Implementation of the Dune::Grid interface
GridFctA grid-function with Range convertible to int

Member Function Documentation

◆ markGrid()

Flag markGrid ( AdaptInfo adaptInfo)

Mark element for refinement, if grid-function gridFct_ evaluates to a value larger than the current level and is marked for coarsening of the result is less than the current value.

Reimplemented from Marker< Grid >.

References AMDiS::test_exit().

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