12#include "libmesh/error_vector.h"
22 "coarsen>=0 & coarsen<=1",
23 "Elements within this percentage of the min error "
24 "will be coarsened. Must be between 0 and 1!");
27 "refine>=0 & refine<=1",
28 "Elements within this percentage of the max error will "
29 "be refined. Must be between 0 and 1!");
31 params.
addParam<
bool>(
"clear_extremes",
33 "Whether or not to clear the extremes during each error calculation. "
34 " Changing this to `false` will result in the global extremes ever "
35 "encountered during the run to be used as the min and max error.");
37 params.
addClassDescription(
"Marks elements for refinement or coarsening based on the fraction of "
38 "the min/max error from the supplied indicator.");
44 _coarsen(parameters.get<Real>(
"coarsen")),
45 _refine(parameters.get<Real>(
"refine")),
46 _clear_extremes(parameters.get<bool>(
"clear_extremes")),
48 _min(
std::numeric_limits<Real>::max())
57 _min = std::numeric_limits<Real>::max();
64 _min = std::min(
_min,
static_cast<Real
>(val));
65 _max = std::max(
_max,
static_cast<Real
>(val));
registerMooseObject("MooseApp", ErrorFractionMarker)
virtual MarkerValue computeElementMarker() override
virtual void markerSetup() override
Is called before any element looping is started so any "global" computation can be done.
ErrorFractionMarker(const InputParameters ¶meters)
static InputParameters validParams()
ErrorVector & _error_vector
static InputParameters validParams()
const Elem *const & _current_elem
Pointer to the current element being considered in the marker element-based loop.
MarkerValue
This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark"...