Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform marking for refinement of elements based on a threshold condition for the error indicator.
More...
#include <ptems/refinements.hpp>
|
template<typename Estimators > |
| ThresholdMarking (const Estimators &estimators, double refineThreshold, double coarsenThreshold=0) |
| Create a functor for performing threshold marking. More...
|
|
AdaptationType | operator() (std::size_t element) const |
| Functor operator to compute the adaptation type for the specifeid element. More...
|
|
|
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 marking for refinement of elements based on a threshold condition for the error 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\) and marks all elements for coarsening where \(\eta_K<\theta_C\). Here, \(\theta_R>0\) and \(\theta_C\geq 0\) are threshold parameters
- Note
- While this can be used directly, it is mainly used as a base type for other refinement strategies (e.g., MaximalMarking and EquidistributionMarking)
◆ ThresholdMarking()
template<typename Estimators >
ptems::ThresholdMarking::ThresholdMarking |
( |
const Estimators & |
estimators, |
|
|
double |
refineThreshold, |
|
|
double |
coarsenThreshold = 0 |
|
) |
| |
|
inline |
Create a functor for performing threshold marking.
- Exceptions
-
- Template Parameters
-
Estimators | Type of the list of estimators. Must by an STL-like container supporting size() and operator[](std::size_t) |
- Parameters
-
estimators | List of error indicators \(\eta_K\) (one per element) to use for marking. |
refineThreshold | The constant \(\theta_R\) denoting the threshold the indicators of elements marked for refinement should be greater than. |
coarsenThreshold | The constant \(\theta_R\) denoting the threshold the indicators of elements marked for refinement should be less than. |
◆ operator()()
Functor operator to compute the adaptation type for the specifeid element.
- Parameters
-
element | Index of the element to get the adaptation type for |
- Returns
- Adaptation type (Refine, coarsen, or none)
◆ SetThresholds()
void ptems::ThresholdMarking::SetThresholds |
( |
double |
refineThreshold, |
|
|
double |
coarsenThreshold |
|
) |
| |
|
inlineprotected |
Sets the threshold for the refinement and coarsening.
This allows a subclass to set the thresholds as two-stage construction.
- Parameters
-
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. |
The documentation for this struct was generated from the following file: