MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
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.
 
void SetThreshold (real_t thresh)
 Set the de-refinement threshold. The default value is zero.
 
void SetOp (int oper)
 
void SetNCLimit (int nc_limit_)
 Set the maximum ratio of refinement levels of adjacent elements (0 = unlimited).
 
virtual void Reset ()
 Reset the associated estimator.
 
- 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.
 
- Protected Member Functions inherited from mfem::MeshOperator
 MeshOperator ()
 Constructor to be used by derived classes.
 

Protected Attributes

ErrorEstimatorestimator
 
real_t 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:

  • op = 0: minimum of the errors
  • op = 1: sum of the errors (default)
  • op = 2: maximum of the errors.

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 ( real_t 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

real_t mfem::ThresholdDerefiner::threshold
protected

Definition at line 276 of file mesh_operators.hpp.


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