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

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FixedFractionMarking()

template<typename Estimators >
ptems::FixedFractionMarking::FixedFractionMarking ( const Estimators &  estimators,
double  refinePercent,
double  coarsenPercent = 0 
)
inline

Create a functor for performing Fixed Fraction marking.

Exceptions
std::invalid_argumentIf estimators.empty() is true
std::invalid_argumentIf refinePercent is not in \([0,1]\)
std::invalid_argumentIf coarsenPercent is not in \((0,1)\)
std::invalid_argumentIf refinePercent+coarsenPercent 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.
refinePercentThe constant \(\theta_R\) denoting the percentage of the elements with the largest error indicators to mark for refinement. Must be in range \((0,1)\).
coarsenPercentThe 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.

Member Function Documentation

◆ operator()()

AdaptationType ptems::FixedFractionMarking::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: