MFEM
v4.2.0
Finite element discretization library
|
Mesh refinement operator using an error threshold. More...
#include <mesh_operators.hpp>
Public Member Functions | |
ThresholdRefiner (ErrorEstimator &est) | |
Construct a ThresholdRefiner using the given ErrorEstimator. More... | |
void | SetTotalErrorNormP (double norm_p=infinity()) |
Set the exponent, p, of the discrete p-norm used to compute the total error from the local element errors. More... | |
void | SetTotalErrorGoal (double err_goal) |
Set the total error stopping criterion: stop when total_err <= total_err_goal. The default value is zero. More... | |
void | SetTotalErrorFraction (double fraction) |
Set the total fraction used in the computation of the threshold. The default value is 1/2. More... | |
void | SetLocalErrorGoal (double err_goal) |
Set the local stopping criterion: stop when local_err_i <= local_err_goal. The default value is zero. More... | |
void | SetMaxElements (long max_elem) |
Set the maximum number of elements stopping criterion: stop when the input mesh has num_elements >= max_elem. The default value is LONG_MAX. More... | |
void | PreferNonconformingRefinement () |
Use nonconforming refinement, if possible (triangles, quads, hexes). More... | |
void | PreferConformingRefinement () |
Use conforming refinement, if possible (triangles, tetrahedra) – this is the default. More... | |
void | SetNCLimit (int nc_limit) |
Set the maximum ratio of refinement levels of adjacent elements (0 = unlimited). More... | |
long | GetNumMarkedElements () const |
Get the number of marked elements in the last Apply() call. More... | |
double | GetThreshold () const |
Get the threshold used in the last Apply() call. More... | |
virtual void | Reset () |
Reset the associated estimator. More... | |
Public Member Functions inherited from mfem::MeshOperator | |
bool | Apply (Mesh &mesh) |
Perform the mesh operation. More... | |
bool | Stop () const |
Check if STOP action is requested, e.g. stopping criterion is satisfied. More... | |
bool | Repeat () const |
Check if REPEAT action is requested, i.e. FiniteElementSpaces and GridFunctions need to be updated, and Apply() must be called again. More... | |
bool | Continue () const |
Check if CONTINUE action is requested, i.e. FiniteElementSpaces and GridFunctions need to be updated and computations should continue. More... | |
bool | Refined () const |
Check if the mesh was refined. More... | |
bool | Derefined () const |
Check if the mesh was de-refined. More... | |
bool | Rebalanced () const |
Check if the mesh was rebalanced. More... | |
int | GetActionInfo () const |
Get the full ActionInfo value generated by the last call to Apply(). More... | |
virtual | ~MeshOperator () |
The destructor is virtual. More... | |
Protected Member Functions | |
double | GetNorm (const Vector &local_err, Mesh &mesh) const |
virtual int | ApplyImpl (Mesh &mesh) |
Apply the operator to the mesh. More... | |
Protected Member Functions inherited from mfem::MeshOperator | |
MeshOperator () | |
Constructor to be used by derived classes. More... | |
Protected Attributes | |
ErrorEstimator & | estimator |
AnisotropicErrorEstimator * | aniso_estimator |
double | total_norm_p |
double | total_err_goal |
double | total_fraction |
double | local_err_goal |
long | max_elements |
double | threshold |
long | num_marked_elements |
Array< Refinement > | marked_elements |
long | current_sequence |
int | non_conforming |
int | nc_limit |
Additional Inherited Members | |
Public Types inherited from mfem::MeshOperator | |
enum | Action { NONE = 0, CONTINUE = 1, STOP = 2, REPEAT = 3, MASK_UPDATE = 1, MASK_ACTION = 3 } |
Action and information constants and masks. More... | |
enum | Info { REFINED = 4*1, DEREFINED = 4*2, REBALANCED = 4*3, MASK_INFO = ~3 } |
Mesh refinement operator using an error threshold.
This class uses the given ErrorEstimator to estimate local element errors and then marks for refinement all elements i such that loc_err_i > threshold. The threshold is computed as
where p (=total_norm_p), total_fraction, and local_err_goal are settable parameters, total_err = (sum_i local_err_i^p)^{1/p}, when p < inf, or total_err = max_i local_err_i, when p = inf.
Definition at line 172 of file mesh_operators.hpp.
mfem::ThresholdRefiner::ThresholdRefiner | ( | ErrorEstimator & | est | ) |
Construct a ThresholdRefiner using the given ErrorEstimator.
Definition at line 54 of file mesh_operators.cpp.
|
protectedvirtual |
Apply the operator to the mesh.
Implements mfem::MeshOperator.
Definition at line 84 of file mesh_operators.cpp.
Definition at line 72 of file mesh_operators.cpp.
|
inline |
Get the number of marked elements in the last Apply() call.
Definition at line 248 of file mesh_operators.hpp.
|
inline |
Get the threshold used in the last Apply() call.
Definition at line 251 of file mesh_operators.hpp.
|
inline |
Use conforming refinement, if possible (triangles, tetrahedra) – this is the default.
Definition at line 237 of file mesh_operators.hpp.
|
inline |
Use nonconforming refinement, if possible (triangles, quads, hexes).
Definition at line 233 of file mesh_operators.hpp.
|
virtual |
Reset the associated estimator.
Implements mfem::MeshOperator.
Definition at line 140 of file mesh_operators.cpp.
|
inline |
Set the local stopping criterion: stop when local_err_i <= local_err_goal. The default value is zero.
Definition at line 225 of file mesh_operators.hpp.
|
inline |
Set the maximum number of elements stopping criterion: stop when the input mesh has num_elements >= max_elem. The default value is LONG_MAX.
Definition at line 230 of file mesh_operators.hpp.
|
inline |
Set the maximum ratio of refinement levels of adjacent elements (0 = unlimited).
Definition at line 241 of file mesh_operators.hpp.
|
inline |
Set the total fraction used in the computation of the threshold. The default value is 1/2.
Definition at line 219 of file mesh_operators.hpp.
|
inline |
Set the total error stopping criterion: stop when total_err <= total_err_goal. The default value is zero.
Definition at line 213 of file mesh_operators.hpp.
|
inline |
Set the exponent, p, of the discrete p-norm used to compute the total error from the local element errors.
Definition at line 208 of file mesh_operators.hpp.
|
protected |
Definition at line 176 of file mesh_operators.hpp.
|
protected |
Definition at line 188 of file mesh_operators.hpp.
|
protected |
Definition at line 175 of file mesh_operators.hpp.
|
protected |
Definition at line 181 of file mesh_operators.hpp.
|
protected |
Definition at line 187 of file mesh_operators.hpp.
|
protected |
Definition at line 182 of file mesh_operators.hpp.
|
protected |
Definition at line 191 of file mesh_operators.hpp.
|
protected |
Definition at line 190 of file mesh_operators.hpp.
|
protected |
Definition at line 185 of file mesh_operators.hpp.
|
protected |
Definition at line 184 of file mesh_operators.hpp.
|
protected |
Definition at line 179 of file mesh_operators.hpp.
|
protected |
Definition at line 180 of file mesh_operators.hpp.
|
protected |
Definition at line 178 of file mesh_operators.hpp.