Base class for all markers. More...
#include <Marker.hpp>
Inherited by EstimatorMarker< Grid >, and GridFunctionMarker< Grid, GridFct >.
Public Member Functions | |
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_. | |
Protected Types | |
using | GridView = typename Grid::LeafGridView |
using | Element = typename GridView::template Codim< 0 >::Entity |
Protected Attributes | |
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. | |
Base class for all markers.
|
virtual |
Called before traversal.
Reimplemented in EstimatorMarker< Grid >, MSMarker< Grid >, and ESMarker< Grid >.
void mark | ( | Element const & | elem, |
int | newMark | ||
) |
Marks element with newMark. If maximumMarking_ is set, the element is marked only if the new mark is bigger than the old one. The return value specifies whether the element has been marked, or not.
Referenced by GRMarker< Grid >::markElement().
|
pure virtual |
Marks one element.
Implemented in GridFunctionMarker< Grid, GridFct >, GRMarker< Grid >, and EstimatorMarker< Grid >.
Marking of the whole grid.
Reimplemented in GERSMarker< Grid >, and GridFunctionMarker< Grid, GridFct >.
|
protected |
If true, elements are marked only if the new value is bigger than the current marking.
Referenced by Marker< Grid >::setMaximumMarking().