AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
EstimatorMarker< Grid > Class Template Reference

Base class for all estimator-based markers. More...

#include <Marker.hpp>

Inherits Marker< Grid >.

Inherited by ESMarker< Grid >, GERSMarker< Grid >, GRMarker< Grid >, and MSMarker< Grid >.

Public Member Functions

 EstimatorMarker ()=default
 Constructor.
 
 EstimatorMarker (std::string name, std::string component, Estimates const &est, std::shared_ptr< Grid > const &grid)
 Constructor.
 
void initMarking (AdaptInfo &adaptInfo) override
 Can be used by sub classes. Called before traversal. More...
 
void markElement (AdaptInfo &adaptInfo, Element const &elem) override
 Marks one element. More...
 
- 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_.
 

Static Public Member Functions

static std::unique_ptr< EstimatorMarker< Grid > > createMarker (std::string const &name, std::string const &component, Estimates const &est, std::shared_ptr< Grid > const &grid)
 Creates a scalar marker depending on the strategy set in parameters.
 

Protected Types

using Super = Marker< Grid >
 
using Element = typename Super::Element
 
using Estimates = std::vector< double >
 
- Protected Types inherited from Marker< Grid >
using GridView = typename Grid::LeafGridView
 
using Element = typename GridView::template Codim< 0 >::Entity
 

Protected Attributes

std::string component_
 Problem component to work on.
 
Estimates est_
 Pointer to the local error estimates.
 
double estSum_ = 0.0
 Estimation sum.
 
double estMax_ = 0.0
 Estmation maximum.
 
double markRLimit_
 
double markCLimit_
 
double p_ = 2.0
 Power in estimator norm.
 
- 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 AMDiS::EstimatorMarker< Grid >

Base class for all estimator-based markers.

Member Function Documentation

◆ initMarking()

void initMarking ( AdaptInfo adaptInfo)
overridevirtual

Can be used by sub classes. Called before traversal.

Reimplemented from Marker< Grid >.

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

References AdaptInfo::estMax(), AdaptInfo::estSum(), AdaptInfo::isCoarseningAllowed(), and AdaptInfo::isRefinementAllowed().

◆ markElement()

void markElement ( AdaptInfo adaptInfo,
Element const &  elem 
)
overridevirtual

Marks one element.

Implements Marker< Grid >.

Reimplemented in GRMarker< Grid >.

Member Data Documentation

◆ markCLimit_

double markCLimit_
protected

Upper limit for error estimation, from which an element is marked for coarsening

◆ markRLimit_

double markRLimit_
protected

Lower limit for error estimation, from which an element is marked for refinement


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