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

#include <tmop_amr.hpp>

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

Public Member Functions

 TMOPRefinerEstimator (Mesh &mesh_, NonlinearForm &nlf_, int order_, int amrmetric_)
 
 ~TMOPRefinerEstimator ()
 
virtual const VectorGetLocalErrors ()
 
virtual const Array< int > & GetAnisotropicFlags ()
 For anisotropic refinements, get the refinement type (e.g., x or y) More...
 
void SetEnergyScalingFactor (double scale)
 
void SetSpatialIndicator (GridFunction &spat_gf_, double spat_gf_critical_=0.5)
 
void SetSpatialIndicatorCritical (double val_)
 
virtual void Reset ()
 Reset the error estimator. More...
 
- Public Member Functions inherited from mfem::ErrorEstimator
virtual double GetTotalError () const
 Return the total error from the last error estimate. More...
 
virtual ~ErrorEstimator ()
 Destruct the error estimator. More...
 
- Public Member Functions inherited from mfem::AbstractErrorEstimator
virtual ~AbstractErrorEstimator ()
 

Protected Member Functions

bool MeshIsModified ()
 Check if the mesh of the solution was modified. More...
 
void ComputeEstimates ()
 
void SetQuadIntRules ()
 
void SetTriIntRules ()
 
void SetHexIntRules ()
 
void SetTetIntRules ()
 
void GetTMOPRefinementEnergy (int reftype, Vector &el_energy_vec)
 
IntegrationRuleSetIntRulesFromMesh (Mesh &meshsplit)
 

Protected Attributes

Meshmesh
 
NonlinearFormnlf
 
int order
 
int amrmetric
 
Array< IntegrationRule * > TriIntRule
 
Array< IntegrationRule * > QuadIntRule
 
Array< IntegrationRule * > TetIntRule
 
Array< IntegrationRule * > HexIntRule
 
long current_sequence
 
Vector error_estimates
 
Array< int > aniso_flags
 
double energy_scaling_factor
 
GridFunctionspat_gf
 
double spat_gf_critical
 

Detailed Description

Definition at line 24 of file tmop_amr.hpp.

Constructor & Destructor Documentation

◆ TMOPRefinerEstimator()

mfem::TMOPRefinerEstimator::TMOPRefinerEstimator ( Mesh mesh_,
NonlinearForm nlf_,
int  order_,
int  amrmetric_ 
)
inline

Definition at line 73 of file tmop_amr.hpp.

◆ ~TMOPRefinerEstimator()

mfem::TMOPRefinerEstimator::~TMOPRefinerEstimator ( )
inline

Definition at line 92 of file tmop_amr.hpp.

Member Function Documentation

◆ ComputeEstimates()

void mfem::TMOPRefinerEstimator::ComputeEstimates ( )
protected

Compute the element error estimates. For an element E in the mesh, error(E) = TMOPEnergy(E)*energy_scaling_factor-Mean(TMOPEnergy(ChildofE)), where TMOPEnergy of Children of E is obtained by assuming the element E is refined using the refinement type being considered based on the TMOP mesh quality metric.

Definition at line 19 of file tmop_amr.cpp.

◆ GetAnisotropicFlags()

virtual const Array<int>& mfem::TMOPRefinerEstimator::GetAnisotropicFlags ( )
inlinevirtual

For anisotropic refinements, get the refinement type (e.g., x or y)

Implements mfem::AnisotropicErrorEstimator.

Definition at line 108 of file tmop_amr.hpp.

◆ GetLocalErrors()

virtual const Vector& mfem::TMOPRefinerEstimator::GetLocalErrors ( )
inlinevirtual

Get TMOP-based errors for each element in the mesh computed based on the refinement types being considered.

Implements mfem::ErrorEstimator.

Definition at line 102 of file tmop_amr.hpp.

◆ GetTMOPRefinementEnergy()

void mfem::TMOPRefinerEstimator::GetTMOPRefinementEnergy ( int  reftype,
Vector el_energy_vec 
)
protected

Get TMOP energy for each element corresponding to the refinement type specified.

Definition at line 87 of file tmop_amr.cpp.

◆ MeshIsModified()

bool mfem::TMOPRefinerEstimator::MeshIsModified ( )
inlineprotected

Check if the mesh of the solution was modified.

Definition at line 42 of file tmop_amr.hpp.

◆ Reset()

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

Reset the error estimator.

Implements mfem::ErrorEstimator.

Definition at line 127 of file tmop_amr.hpp.

◆ SetEnergyScalingFactor()

void mfem::TMOPRefinerEstimator::SetEnergyScalingFactor ( double  scale)
inline

Scaling factor for the TMOP refinement energy. An element is refined if [mean TMOPEnergy(children)]*energy_scaling_factor < TMOPEnergy(parent)

Definition at line 116 of file tmop_amr.hpp.

◆ SetHexIntRules()

void mfem::TMOPRefinerEstimator::SetHexIntRules ( )
protected

Definition at line 182 of file tmop_amr.cpp.

◆ SetIntRulesFromMesh()

IntegrationRule * mfem::TMOPRefinerEstimator::SetIntRulesFromMesh ( Mesh meshsplit)
protected

Use a mesh to setup an integration rule that will mimic the different refinement types.

Definition at line 317 of file tmop_amr.cpp.

◆ SetQuadIntRules()

void mfem::TMOPRefinerEstimator::SetQuadIntRules ( )
protected

Construct the integration rules to model how each element type is split using different refinement types. ref_type = 0 is the original element and reftype \ in [1, 7] represent different refinement type based on NCMesh class.

Definition at line 206 of file tmop_amr.cpp.

◆ SetSpatialIndicator()

void mfem::TMOPRefinerEstimator::SetSpatialIndicator ( GridFunction spat_gf_,
double  spat_gf_critical_ = 0.5 
)
inline

Spatial indicator function (eta) that can be used to prevent elements from being refined even if the energy criterion is met. Using this, an element E is not refined if mean(spat_gf(E)) < spat_gf_critical.

Definition at line 121 of file tmop_amr.hpp.

◆ SetSpatialIndicatorCritical()

void mfem::TMOPRefinerEstimator::SetSpatialIndicatorCritical ( double  val_)
inline

Definition at line 124 of file tmop_amr.hpp.

◆ SetTetIntRules()

void mfem::TMOPRefinerEstimator::SetTetIntRules ( )
protected

Definition at line 274 of file tmop_amr.cpp.

◆ SetTriIntRules()

void mfem::TMOPRefinerEstimator::SetTriIntRules ( )
protected

Definition at line 231 of file tmop_amr.cpp.

Member Data Documentation

◆ amrmetric

int mfem::TMOPRefinerEstimator::amrmetric
protected

Definition at line 30 of file tmop_amr.hpp.

◆ aniso_flags

Array<int> mfem::TMOPRefinerEstimator::aniso_flags
protected

Definition at line 34 of file tmop_amr.hpp.

◆ current_sequence

long mfem::TMOPRefinerEstimator::current_sequence
protected

Definition at line 32 of file tmop_amr.hpp.

◆ energy_scaling_factor

double mfem::TMOPRefinerEstimator::energy_scaling_factor
protected

Definition at line 37 of file tmop_amr.hpp.

◆ error_estimates

Vector mfem::TMOPRefinerEstimator::error_estimates
protected

Definition at line 33 of file tmop_amr.hpp.

◆ HexIntRule

Array<IntegrationRule *> mfem::TMOPRefinerEstimator::HexIntRule
protected

Definition at line 31 of file tmop_amr.hpp.

◆ mesh

Mesh* mfem::TMOPRefinerEstimator::mesh
protected

Definition at line 27 of file tmop_amr.hpp.

◆ nlf

NonlinearForm* mfem::TMOPRefinerEstimator::nlf
protected

Definition at line 28 of file tmop_amr.hpp.

◆ order

int mfem::TMOPRefinerEstimator::order
protected

Definition at line 29 of file tmop_amr.hpp.

◆ QuadIntRule

Array<IntegrationRule *> mfem::TMOPRefinerEstimator::QuadIntRule
protected

Definition at line 31 of file tmop_amr.hpp.

◆ spat_gf

GridFunction* mfem::TMOPRefinerEstimator::spat_gf
protected

Definition at line 38 of file tmop_amr.hpp.

◆ spat_gf_critical

double mfem::TMOPRefinerEstimator::spat_gf_critical
protected

Definition at line 39 of file tmop_amr.hpp.

◆ TetIntRule

Array<IntegrationRule *> mfem::TMOPRefinerEstimator::TetIntRule
protected

Definition at line 31 of file tmop_amr.hpp.

◆ TriIntRule

Array<IntegrationRule *> mfem::TMOPRefinerEstimator::TriIntRule
protected

Definition at line 31 of file tmop_amr.hpp.


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