MFEM v4.7.0
Finite element discretization library
|
Refinement operator to control data oscillation. More...
#include <mesh_operators.hpp>
Public Member Functions | |
CoefficientRefiner (Coefficient &coeff_, int order_) | |
Constructor. | |
virtual int | PreprocessMesh (Mesh &mesh, int max_it) |
Apply the operator to the mesh max_it times or until tolerance achieved. | |
int | PreprocessMesh (Mesh &mesh) |
void | SetThreshold (real_t threshold_) |
Set the refinement threshold. The default value is 1.0e-2. | |
void | SetMaxElements (long long max_elements_) |
Set the maximum number of elements stopping criterion: stop when the input mesh has num_elements >= max_elem. The default value is LONG_MAX. | |
void | ResetCoefficient (Coefficient &coeff_) |
Reset the function f. | |
void | SetOrder (int order_) |
Reset the oscillation order. | |
void | SetNCLimit (int nc_limit_) |
Set the maximum ratio of refinement levels of adjacent elements (0 = unlimited). The default value is 1, which helps ensure appropriate refinements in pathological situations where the default quadrature order is too low. | |
void | SetIntRule (const IntegrationRule *irs_[]) |
void | PrintWarnings () |
real_t | GetOsc () const |
const Vector & | GetLocalOscs () const |
virtual void | Reset () |
Reset. | |
Public Member Functions inherited from mfem::MeshOperator | |
bool | Apply (Mesh &mesh) |
Perform the mesh operation. | |
bool | Stop () const |
Check if STOP action is requested, e.g. stopping criterion is satisfied. | |
bool | Repeat () const |
Check if REPEAT action is requested, i.e. FiniteElementSpaces and GridFunctions need to be updated, and Apply() must be called again. | |
bool | Continue () const |
Check if CONTINUE action is requested, i.e. FiniteElementSpaces and GridFunctions need to be updated and computations should continue. | |
bool | Refined () const |
Check if the mesh was refined. | |
bool | Derefined () const |
Check if the mesh was de-refined. | |
bool | Rebalanced () const |
Check if the mesh was rebalanced. | |
int | GetActionInfo () const |
Get the full ActionInfo value generated by the last call to Apply(). | |
virtual | ~MeshOperator () |
The destructor is virtual. | |
Protected Member Functions | |
virtual int | ApplyImpl (Mesh &mesh) |
Apply the operator to the mesh once. | |
Protected Member Functions inherited from mfem::MeshOperator | |
MeshOperator () | |
Constructor to be used by derived classes. | |
Protected Attributes | |
bool | print_level = false |
int | nc_limit = 1 |
int | nonconforming = -1 |
int | order |
long long | max_elements = std::numeric_limits<long long>::max() |
real_t | threshold = 1.0e-2 |
real_t | global_osc = NAN |
Array< int > | mesh_refinements |
Vector | element_oscs |
Coefficient * | coeff = NULL |
const IntegrationRule * | ir_default [Geometry::NumGeom] |
const IntegrationRule ** | irs = NULL |
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 } |
Refinement operator to control data oscillation.
This class computes osc_K(f) := || h ⋅ (I - Π) f ||_K at each element K. Here, Π is the L2-projection and ||⋅||_K is the L2-norm, restricted to the element K. All elements satisfying the inequality
are refined. Here, threshold is a positive parameter, ||⋅|| is the L2-norm over the entire domain Ω, and n_el is the number of elements in the mesh.
Note that if osc(f) = threshold ⋅ ||f|| / sqrt(n_el) for each K, then
This is the reason for the 1/sqrt(n_el) factor.
Definition at line 331 of file mesh_operators.hpp.
|
inline |
Constructor.
Definition at line 354 of file mesh_operators.hpp.
|
protectedvirtual |
Apply the operator to the mesh once.
Implements mfem::MeshOperator.
Definition at line 160 of file mesh_operators.cpp.
|
inline |
Definition at line 414 of file mesh_operators.hpp.
|
inline |
Definition at line 411 of file mesh_operators.hpp.
|
inline |
Definition at line 369 of file mesh_operators.hpp.
|
virtual |
Apply the operator to the mesh max_it times or until tolerance achieved.
Definition at line 166 of file mesh_operators.cpp.
|
inline |
Definition at line 408 of file mesh_operators.hpp.
|
virtual |
|
inline |
Reset the function f.
Definition at line 384 of file mesh_operators.hpp.
|
inline |
Definition at line 405 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 381 of file mesh_operators.hpp.
|
inline |
Set the maximum ratio of refinement levels of adjacent elements (0 = unlimited). The default value is 1, which helps ensure appropriate refinements in pathological situations where the default quadrature order is too low.
Definition at line 398 of file mesh_operators.hpp.
|
inline |
Reset the oscillation order.
Definition at line 392 of file mesh_operators.hpp.
|
inline |
Set the refinement threshold. The default value is 1.0e-2.
Definition at line 376 of file mesh_operators.hpp.
|
protected |
Definition at line 343 of file mesh_operators.hpp.
|
protected |
Definition at line 342 of file mesh_operators.hpp.
|
protected |
Definition at line 340 of file mesh_operators.hpp.
|
protected |
Definition at line 344 of file mesh_operators.hpp.
|
protected |
Definition at line 345 of file mesh_operators.hpp.
|
protected |
Definition at line 338 of file mesh_operators.hpp.
|
protected |
Definition at line 341 of file mesh_operators.hpp.
|
protected |
Definition at line 335 of file mesh_operators.hpp.
|
protected |
Definition at line 336 of file mesh_operators.hpp.
|
protected |
Definition at line 337 of file mesh_operators.hpp.
|
protected |
Definition at line 334 of file mesh_operators.hpp.
|
protected |
Definition at line 339 of file mesh_operators.hpp.