PTEMS  0.1.0-dev+git.81fd0e4
PolyTopic Element Method Solver
ptems::DoerflerMarking Struct Reference

Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform Dörfler marking [2] for refinement of elements based on an error indicator. More...

#include <ptems/refinements.hpp>

Public Member Functions

template<typename Estimators >
 DoerflerMarking (const Estimators &estimators, double refineThreshold, double coarsenThreshold=0)
 Create a functor for performing Dörfler marking. More...
 
AdaptationType operator() (std::size_t element) const
 Functor operator to compute the adaptation type for the specifeid element. More...
 

Detailed Description

Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform Dörfler marking [2] for refinement of elements based on an error indicator.

Given a mesh \(\mathcal{T}_h\) and per-element error indicators, \(\eta_K\), \(K\in\mathcal{T}_h\) Dörfler marking constructs the smallest set \(\mathcal{A}\) such that

\[ \sum_{K\in\mathcal{A}} \eta_K^2 \geq \theta_R \sum_{K\in\mathcal{T}_h} \eta_K^2, \]

where \(\theta_R\in(0,1)\) is a threshold parameter, and marks the elements in the set \(\mathcal{A}\) for refinement.

Optionally, we can also construct the largest set \(\mathcal{B}\) such that

\[ \sum_{K\in\mathcal{B}} \eta_K^2 \leq \theta_C \sum_{K\in\mathcal{T}_h} \eta_K^2, \]

where \(\theta_C\in[0,1)\) is a threshold parameter, and marks the elements in the set \(\mathcal{B}\) for coarsening.

Constructor & Destructor Documentation

◆ DoerflerMarking()

template<typename Estimators >
ptems::DoerflerMarking::DoerflerMarking ( const Estimators &  estimators,
double  refineThreshold,
double  coarsenThreshold = 0 
)
inline

Create a functor for performing Dörfler marking.

Exceptions
std::invalid_argumentIf estimators.empty() is true
std::invalid_argumentIf refineThreshold is not in \([0,1]\)
std::invalid_argumentIf coarsenThreshold is not in \((0,1)\)
std::invalid_argumentIf refineThreshold+coarsenThreshold is greater than 1.
Template Parameters
EstimatorsType of the list of estimators. Must by an STL-like container supporting empty(), size(), begin(), end(), and operator[](std::size_t)
Parameters
estimatorsList of error indicators \(\eta_K\) (one per element) to use for Dörfler marking.
refineThresholdThe constant \(\theta_R\) denoting the percentage of the total error the sum of the indicators for the elements that should be marked for refinement should be greater than. Must be in range \((0,1)\).
coarsenThresholdThe constant \(\theta_C\) denoting the percentage of the total error the sum of the indicators of the elements that should be marked for coarsening should be less than. Must be in range \([0,1)\) and refineThreshold+coarsenThreshold must be less than 1.

Member Function Documentation

◆ operator()()

AdaptationType ptems::DoerflerMarking::operator() ( std::size_t  element) const
inline

Functor operator to compute the adaptation type for the specifeid element.

Parameters
elementIndex of the element to get the adaptation type for
Returns
Adaptation type (Refine, coarsen, or none)

The documentation for this struct was generated from the following file: