OOFEM 3.0
Loading...
Searching...
No Matches
oofem::MeshQualityErrorEstimator Class Reference

#include <meshqualityerrorestimator.h>

Inheritance diagram for oofem::MeshQualityErrorEstimator:
Collaboration diagram for oofem::MeshQualityErrorEstimator:

Public Member Functions

 MeshQualityErrorEstimator (int n, Domain *d)
 Constructor.
virtual ~MeshQualityErrorEstimator ()
 Destructor.
double giveElementError (EE_ErrorType type, Element *elem, TimeStep *tStep) override
double giveValue (EE_ValueType type, TimeStep *tStep) override
 Gives the max error from any element in the domain.
int estimateError (EE_ErrorMode mode, TimeStep *tStep) override
 Empty implementation.
RemeshingCriteriagiveRemeshingCrit () override
void initializeFrom (InputRecord &ir) override
const char * giveClassName () const override
const char * giveInputRecordName () const override
Public Member Functions inherited from oofem::ErrorEstimator
 ErrorEstimator (int n, Domain *d)
 Constructor.
virtual ~ErrorEstimator ()
 Destructor.
void setDomain (Domain *d) override
 Sets Domain; should also re-initialize attributes if necessary.
int giveNumberOfSkippedElements ()
ErrorEstimatorType giveErrorEstimatorType () const
bool skipRegion (int reg)
virtual void reinitialize ()
Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
virtual ~FEMComponent ()=default
 Virtual destructor.
DomaingiveDomain () const
int giveNumber () const
void setNumber (int num)
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
virtual void initializeFrom (InputRecord &ir, int priority)
virtual void initializeFinish ()
virtual void postInitialize ()
 Performs post initialization steps. Called after all components are created and initialized.
virtual void giveInputRecord (DynamicInputRecord &input)
virtual void saveContext (DataStream &stream, ContextMode mode)
virtual void restoreContext (DataStream &stream, ContextMode mode)
virtual int checkConsistency ()
virtual void printOutputAt (FILE *file, TimeStep *tStep)
virtual void printYourself ()
 Prints receiver state on stdout. Useful for debugging.
virtual InterfacegiveInterface (InterfaceType t)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Static Protected Member Functions

static double computeTriangleRadiusError (Element *elem)
static double computeJacobianError (FEInterpolation &fei, IntegrationRule &ir, Element *elem)

Additional Inherited Members

Protected Attributes inherited from oofem::ErrorEstimator
ErrorEstimatorType eeType
std ::unique_ptr< RemeshingCriteriarc
IntArray regionSkipMap
int skippedNelems
 Number of skipped elements.
InternalStateType IStype
 Internal state type of variable to get internal forces.
Protected Attributes inherited from oofem::FEMComponent
int number
 Component number.
Domaindomain
 Link to domain object, useful for communicating with other FEM components.

Detailed Description

This error estimator measures the quality of the elements. This is useful when elements are deformed during the simulation.

Error estimates should be unitless, positive, and scaled properly. Zero error should reflect a perfect element. Error value of one should reflect an element of acceptable quality.

Note
Its open for discussion whether the routine should give the reciprocal error to handle extremely badly shaped elements.
Author
Mikael Öhman

Definition at line 61 of file meshqualityerrorestimator.h.

Constructor & Destructor Documentation

◆ MeshQualityErrorEstimator()

oofem::MeshQualityErrorEstimator::MeshQualityErrorEstimator ( int n,
Domain * d )
inline

◆ ~MeshQualityErrorEstimator()

virtual oofem::MeshQualityErrorEstimator::~MeshQualityErrorEstimator ( )
inlinevirtual

Destructor.

Definition at line 82 of file meshqualityerrorestimator.h.

Member Function Documentation

◆ computeJacobianError()

double oofem::MeshQualityErrorEstimator::computeJacobianError ( FEInterpolation & fei,
IntegrationRule & ir,
Element * elem )
staticprotected

Computes the error based on the conditioning of the Jacobian.

Returns
Error value for the element.

Definition at line 86 of file meshqualityerrorestimator.C.

References oofem::FloatMatrix::computeReciprocalCondition(), oofem::FloatMatrix::giveDeterminant(), oofem::FEInterpolation::giveJacobianMatrixAt(), oofem::rcond(), and oofem::sgn().

Referenced by giveElementError().

◆ computeTriangleRadiusError()

double oofem::MeshQualityErrorEstimator::computeTriangleRadiusError ( Element * elem)
staticprotected

Computes error based on the inscribed triangle/circle ratio.

Returns
Error value for the element. Zero for equilateral triangle.

Definition at line 70 of file meshqualityerrorestimator.C.

References oofem::distance(), oofem::DofManager::giveCoordinates(), and oofem::Element::giveNode().

Referenced by giveElementError().

◆ estimateError()

int oofem::MeshQualityErrorEstimator::estimateError ( EE_ErrorMode mode,
TimeStep * tStep )
overridevirtual

Empty implementation.

Implements oofem::ErrorEstimator.

Definition at line 113 of file meshqualityerrorestimator.C.

◆ giveClassName()

const char * oofem::MeshQualityErrorEstimator::giveClassName ( ) const
inlineoverridevirtual
Returns
Class name of the receiver.

Implements oofem::FEMComponent.

Definition at line 95 of file meshqualityerrorestimator.h.

◆ giveElementError()

double oofem::MeshQualityErrorEstimator::giveElementError ( EE_ErrorType type,
Element * elem,
TimeStep * tStep )
overridevirtual

Returns the element error. The estimateError service should be called before.

Parameters
typeError type.
elemElement for which error requested.
tStepTime step.
Returns
Element error.

Implements oofem::ErrorEstimator.

Definition at line 45 of file meshqualityerrorestimator.C.

References computeJacobianError(), computeTriangleRadiusError(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::Element::giveGeometryType(), and oofem::Element::giveInterpolation().

Referenced by giveValue().

◆ giveInputRecordName()

const char * oofem::MeshQualityErrorEstimator::giveInputRecordName ( ) const
inlineoverridevirtual
Returns
Input record name of the receiver.

Implements oofem::FEMComponent.

Definition at line 96 of file meshqualityerrorestimator.h.

References _IFT_MeshQualityErrorEstimator_Name.

◆ giveRemeshingCrit()

RemeshingCriteria * oofem::MeshQualityErrorEstimator::giveRemeshingCrit ( )
inlineoverridevirtual

Returns reference to associated remeshing criteria.

Implements oofem::ErrorEstimator.

Definition at line 92 of file meshqualityerrorestimator.h.

◆ giveValue()

double oofem::MeshQualityErrorEstimator::giveValue ( EE_ValueType type,
TimeStep * tStep )
overridevirtual

Gives the max error from any element in the domain.

Implements oofem::ErrorEstimator.

Definition at line 101 of file meshqualityerrorestimator.C.

References oofem::FEMComponent::domain, giveElementError(), and oofem::unknownET.

◆ initializeFrom()

void oofem::MeshQualityErrorEstimator::initializeFrom ( InputRecord & ir)
overridevirtual

Initializes receiver according to object description stored in input record. This function is called immediately after creating object using constructor. Input record can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record. Note that initializeFrom may be called mutiple times.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
priorityPriority of the input record. This is used to determine the order of initialization

Reimplemented from oofem::ErrorEstimator.

Definition at line 118 of file meshqualityerrorestimator.C.


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011