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) | |
Constructor. | |
void | markElement (AdaptInfo &, Element const &) final |
Implementation of Marker::markElement. Does nothing since marking is done in markGrid(). More... | |
Flag | markGrid (AdaptInfo &adaptInfo) override |
Public Member Functions inherited from Marker< Grid > | |
Marker ()=default | |
Constructor. | |
Marker (std::string const &name, std::shared_ptr< Grid > const &grid) | |
Constructor. | |
virtual | ~Marker ()=default |
Destructor. | |
void | mark (Element const &elem, int newMark) |
virtual void | initMarking (AdaptInfo &adaptInfo) |
Called before traversal. More... | |
virtual void | finishMarking (AdaptInfo &adaptInfo) |
Called after traversal. | |
virtual void | markElement (AdaptInfo &adaptInfo, Element const &elem)=0 |
Marks one element. More... | |
virtual Flag | markGrid (AdaptInfo &adaptInfo) |
Marking of the whole grid. More... | |
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. | |
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 >.
Grid | An Implementation of the Dune::Grid interface |
GridFct | A grid-function with Range convertible to int |
|
inlinefinalvirtual |
Implementation of Marker::markElement. Does nothing since marking is done in markGrid().
Implements Marker< Grid >.
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 >.