AMDiS  0.1
The Adaptive Multi-Dimensional Simulation Toolbox
Marker< Grid > Class Template Referenceabstract

Base class for all markers. More...

#include <Marker.hpp>

Inherited by EstimatorMarker< Grid >, and GridFunctionMarker< Grid, GridFct >.

Public Member Functions

 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.
virtual void markElement (AdaptInfo &adaptInfo, Element const &elem)=0
 Marks one element.
virtual Flag markGrid (AdaptInfo &adaptInfo)
 Marking of the whole grid.
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.

Detailed Description

template<class Grid>
class AMDiS::Marker< Grid >

Base class for all markers.

Member Function Documentation

◆ mark()

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.

References AMDiS::msg().

Referenced by GRMarker< Grid >::markElement(), and Marker< Grid >::Marker().

Member Data Documentation

◆ maximumMarking_

bool maximumMarking_ = false

If true, elements are marked only if the new value is bigger than the current marking.

Referenced by Marker< Grid >::setMaximumMarking().

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