AMDiS 2.10
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
 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.
 

Detailed Description

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

Base class for all markers.

Member Function Documentation

◆ initMarking()

void initMarking ( AdaptInfo adaptInfo)
virtual

Called before traversal.

Reimplemented in EstimatorMarker< Grid >, MSMarker< Grid >, and ESMarker< Grid >.

◆ 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.

Referenced by GRMarker< Grid >::markElement().

◆ markElement()

virtual void markElement ( AdaptInfo adaptInfo,
Element const &  elem 
)
pure virtual

◆ markGrid()

Flag markGrid ( AdaptInfo adaptInfo)
virtual

Marking of the whole grid.

Reimplemented in GERSMarker< Grid >, and GridFunctionMarker< Grid, GridFct >.

Member Data Documentation

◆ maximumMarking_

bool maximumMarking_ = false
protected

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: