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... | |
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.
|
inline |
Create a functor for performing Dörfler marking.
std::invalid_argument | If estimators.empty() is true |
std::invalid_argument | If refineThreshold is not in \([0,1]\) |
std::invalid_argument | If coarsenThreshold is not in \((0,1)\) |
std::invalid_argument | If refineThreshold+coarsenThreshold is greater than 1. |
Estimators | Type of the list of estimators. Must by an STL-like container supporting empty(), size(), begin(), end(), and operator[](std::size_t) |
estimators | List of error indicators \(\eta_K\) (one per element) to use for Dörfler marking. |
refineThreshold | The 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)\). |
coarsenThreshold | The 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. |
|
inline |
Functor operator to compute the adaptation type for the specifeid element.
element | Index of the element to get the adaptation type for |