MFEM  v4.6.0
Finite element discretization library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mfem::ThresholdDerefiner Class Reference

De-refinement operator using an error threshold. More...

#include <mesh_operators.hpp>

Inheritance diagram for mfem::ThresholdDerefiner:
[legend]
Collaboration diagram for mfem::ThresholdDerefiner:
[legend]

Public Member Functions

 ThresholdDerefiner (ErrorEstimator &est)
 Construct a ThresholdDerefiner using the given ErrorEstimator. More...
 
void SetThreshold (double thresh)
 Set the de-refinement threshold. The default value is zero. More...
 
void SetOp (int oper)
 
void SetNCLimit (int nc_limit_)
 Set the maximum ratio of refinement levels of adjacent elements (0 = unlimited). 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

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

ErrorEstimatorestimator
 
double threshold
 
int nc_limit
 
int op
 

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 }
 

Detailed Description

De-refinement operator using an error threshold.

This de-refinement operator marks elements in the hierarchy whose children are leaves and their combined error is below a given threshold. The errors of the children are combined by one of the following operations:

Definition at line 271 of file mesh_operators.hpp.

Constructor & Destructor Documentation

◆ ThresholdDerefiner()

mfem::ThresholdDerefiner::ThresholdDerefiner ( ErrorEstimator est)
inline

Construct a ThresholdDerefiner using the given ErrorEstimator.

Definition at line 286 of file mesh_operators.hpp.

Member Function Documentation

◆ ApplyImpl()

int mfem::ThresholdDerefiner::ApplyImpl ( Mesh mesh)
protectedvirtual

Apply the operator to the mesh.

Returns
DEREFINED + CONTINUE if some elements were de-refined; NONE otherwise.

Implements mfem::MeshOperator.

Definition at line 149 of file mesh_operators.cpp.

◆ Reset()

virtual void mfem::ThresholdDerefiner::Reset ( )
inlinevirtual

Reset the associated estimator.

Implements mfem::MeshOperator.

Definition at line 310 of file mesh_operators.hpp.

◆ SetNCLimit()

void mfem::ThresholdDerefiner::SetNCLimit ( int  nc_limit_)
inline

Set the maximum ratio of refinement levels of adjacent elements (0 = unlimited).

Definition at line 303 of file mesh_operators.hpp.

◆ SetOp()

void mfem::ThresholdDerefiner::SetOp ( int  oper)
inline

Definition at line 299 of file mesh_operators.hpp.

◆ SetThreshold()

void mfem::ThresholdDerefiner::SetThreshold ( double  thresh)
inline

Set the de-refinement threshold. The default value is zero.

Definition at line 297 of file mesh_operators.hpp.

Member Data Documentation

◆ estimator

ErrorEstimator& mfem::ThresholdDerefiner::estimator
protected

Definition at line 274 of file mesh_operators.hpp.

◆ nc_limit

int mfem::ThresholdDerefiner::nc_limit
protected

Definition at line 277 of file mesh_operators.hpp.

◆ op

int mfem::ThresholdDerefiner::op
protected

Definition at line 277 of file mesh_operators.hpp.

◆ threshold

double mfem::ThresholdDerefiner::threshold
protected

Definition at line 276 of file mesh_operators.hpp.


The documentation for this class was generated from the following files: