Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform Maximal marking [6] for refinement of elements based on the maximum erro indicator. More...
#include <ptems/refinements.hpp>
Public Member Functions | |
template<typename Estimators > | |
MaximalMarking (const Estimators &estimators, double refineThreshold, double coarsenThreshold=0) | |
Create a functor for performing Maximal marking. More... | |
AdaptationType | operator() (std::size_t element) const |
Functor operator to compute the adaptation type for the specifeid element. More... | |
Protected Member Functions | |
void | SetThresholds (double refineThreshold, double coarsenThreshold) |
Sets the threshold for the refinement and coarsening. More... | |
Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform Maximal marking [6] for refinement of elements based on the maximum erro indicator.
Given a mesh \(\mathcal{T}_h\) and per-element error indicators \(\eta_K\), \(K\in\mathcal{T}_h\), this marking strategy marks all elements for refinement where
\[ \eta_K> \theta_R \max_{T\in\mathcal{T}_h}\eta_K \]
and marks all elements for coarsening where
\[ \eta_K< \theta_C \max_{T\in\mathcal{T}_h}\eta_K \]
Here, \(\theta_R\in(0,1)\) and \(\theta_C\in[0,\theta_R)\) are threshold parameters.
|
inline |
Create a functor for performing Maximal 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,\textrm{refineThreshold}})\) |
Estimators | Type of the list of estimators. Must by an STL-like container supporting size() and operator[](std::size_t) |
estimators | List of error indicators \(\eta_K\) (one per element) to use for Maximal marking. |
refineThreshold | The constant \(\theta_R\) denoting the percentage of the maximum error indicator over which an element is marked for refinement. Must be in range \([0,1]\). |
coarsenThreshold | The constant \(\theta_C\) denoting the percentage of the maximum error indicator under which an element is marked for coarsening. Must be in range \([0,\textrm{refineThreshold}})\). |
|
inlineinherited |
Functor operator to compute the adaptation type for the specifeid element.
element | Index of the element to get the adaptation type for |
|
inlineprotectedinherited |
Sets the threshold for the refinement and coarsening.
This allows a subclass to set the thresholds as two-stage construction.
refineThreshold | The constant \(\theta_R\) denoting the threshold the indicators of elements marked for refinement should be greater than. |
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. |