Functor object that can be passed to FEMesh::Adapt(Func, bool) to perform Fixed Fraction marking for refinement of elements based on refining/coarsening a set fraction of the largest/smallest error indicators. More...
#include <ptems/refinements.hpp>
Public Member Functions | |
template<typename Estimators > | |
FixedFractionMarking (const Estimators &estimators, double refinePercent, double coarsenPercent=0) | |
Create a functor for performing Fixed Fraction 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 Fixed Fraction marking for refinement of elements based on refining/coarsening a set fraction of the largest/smallest error indicators.
Given a mesh \(\mathcal{T}_h\) and per-element error indicators \(\eta_K\), \(K\in\mathcal{T}_h\), this marking strategy marks \(\theta_R #\mathcal{T}_h\) elements for refinement with the largest values of \(\eta_K\) and marks \(\theta_C #\mathcal{T}_h\) elements for coarsening with the smallest values of \(\eta_K\), where \(\theta_R\in(0,1)\) and \(\theta_C\in[0,1)\) are percentages.
|
inline |
Create a functor for performing Fixed Fraction marking.
std::invalid_argument | If estimators.empty() is true |
std::invalid_argument | If refinePercent is not in \([0,1]\) |
std::invalid_argument | If coarsenPercent is not in \((0,1)\) |
std::invalid_argument | If refinePercent+coarsenPercent 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. |
refinePercent | The constant \(\theta_R\) denoting the percentage of the elements with the largest error indicators to mark for refinement. Must be in range \((0,1)\). |
coarsenPercent | The constant \(\theta_C\) denoting the percentage of the elements with the smallest error indicators to mark for refinement. Must be in range \([0,1)\) and refinePercent+coarsenPercent 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 |