OOFEM 3.0
Loading...
Searching...
No Matches
oofem::ErrorEstimator Class Referenceabstract

#include <errorestimator.h>

Inheritance diagram for oofem::ErrorEstimator:
Collaboration diagram for oofem::ErrorEstimator:

Public Member Functions

 ErrorEstimator (int n, Domain *d)
 Constructor.
virtual ~ErrorEstimator ()
 Destructor.
void setDomain (Domain *d) override
 Sets Domain; should also re-initialize attributes if necessary.
virtual double giveElementError (EE_ErrorType type, Element *elem, TimeStep *tStep)=0
virtual double giveValue (EE_ValueType type, TimeStep *tStep)=0
int giveNumberOfSkippedElements ()
virtual int estimateError (EE_ErrorMode mode, TimeStep *tStep)=0
virtual RemeshingCriteriagiveRemeshingCrit ()=0
ErrorEstimatorType giveErrorEstimatorType () const
bool skipRegion (int reg)
virtual void reinitialize ()
void initializeFrom (InputRecord &ir) override
Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
virtual ~FEMComponent ()=default
 Virtual destructor.
virtual const char * giveClassName () const =0
virtual const char * giveInputRecordName () const =0
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).

Protected Attributes

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

The base class for all error estimation or error indicator algorithms. The basic task is to evaluate the error on associated domain. If this task requires the special element algorithms, these should be included using interface concept.

This estimator should also provide the compatible Remeshing Criteria class, which based on various error measures will evaluate the required mesh density of a new domain.

Definition at line 80 of file errorestimator.h.

Constructor & Destructor Documentation

◆ ErrorEstimator()

◆ ~ErrorEstimator()

oofem::ErrorEstimator::~ErrorEstimator ( )
virtual

Destructor.

Definition at line 46 of file errorestimator.C.

Member Function Documentation

◆ estimateError()

virtual int oofem::ErrorEstimator::estimateError ( EE_ErrorMode mode,
TimeStep * tStep )
pure virtual

Estimates the error on associated domain at given time step. The estimated values can be requested using giveElementError and giveValue methods. The type of errors provided depends on error estimator type implementing the service.

Parameters
modeError mode.
tStepTime step.

Implemented in oofem::CombinedZZSIErrorEstimator, oofem::HuertaErrorEstimator, oofem::MeshQualityErrorEstimator, oofem::ScalarErrorIndicator, and oofem::ZZErrorEstimator.

◆ giveElementError()

virtual double oofem::ErrorEstimator::giveElementError ( EE_ErrorType type,
Element * elem,
TimeStep * tStep )
pure virtual

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

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

Implemented in oofem::CombinedZZSIErrorEstimator, oofem::HuertaErrorEstimator, oofem::MeshQualityErrorEstimator, oofem::ScalarErrorIndicator, and oofem::ZZErrorEstimator.

Referenced by oofem::Element::giveIPValue().

◆ giveErrorEstimatorType()

ErrorEstimatorType oofem::ErrorEstimator::giveErrorEstimatorType ( ) const
inline

Returns error estimation type of receiver.

Definition at line 142 of file errorestimator.h.

References eeType.

◆ giveNumberOfSkippedElements()

int oofem::ErrorEstimator::giveNumberOfSkippedElements ( )
inline

Returns number of elements skipped in error estimation.

Returns
Number of skipped elements.

Definition at line 125 of file errorestimator.h.

References skippedNelems.

◆ giveRemeshingCrit()

◆ giveValue()

virtual double oofem::ErrorEstimator::giveValue ( EE_ValueType type,
TimeStep * tStep )
pure virtual

Returns the characteristic value of given type. The estimateError service should be called before. This method is supposed to be used by associated remeshingCriteria to access some characteristic values already computed or known at error estimator level.

Parameters
typeError type.
tStepTime step.
Returns
Error value for given type.

Implemented in oofem::CombinedZZSIErrorEstimator, oofem::HuertaErrorEstimator, oofem::MeshQualityErrorEstimator, oofem::ScalarErrorIndicator, and oofem::ZZErrorEstimator.

◆ initializeFrom()

void oofem::ErrorEstimator::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::FEMComponent.

Reimplemented in oofem::HuertaErrorEstimator, oofem::MeshQualityErrorEstimator, oofem::ScalarErrorIndicator, and oofem::ZZErrorEstimator.

Definition at line 60 of file errorestimator.C.

References _IFT_ErrorEstimator_IStype, _IFT_ErrorEstimator_regionskipmap, IR_GIVE_OPTIONAL_FIELD, IStype, and regionSkipMap.

◆ reinitialize()

void oofem::ErrorEstimator::reinitialize ( )
virtual

Definition at line 70 of file errorestimator.C.

References rc.

◆ setDomain()

void oofem::ErrorEstimator::setDomain ( Domain * d)
overridevirtual

Sets Domain; should also re-initialize attributes if necessary.

Reimplemented from oofem::FEMComponent.

Definition at line 51 of file errorestimator.C.

References giveRemeshingCrit().

◆ skipRegion()

bool oofem::ErrorEstimator::skipRegion ( int reg)

Returns nonzero if region has been skipped in error estimation (user option). It is strongly recommended to use this function, instead of direct access to regionSkipMap variable by derived classes, since the size check is done here.

Parameters
regRegion to check.
Returns
True if region should be skipped.

Definition at line 75 of file errorestimator.C.

References regionSkipMap.

Referenced by oofem::ZZErrorEstimator::estimateError(), oofem::ScalarErrorIndicator::giveElementError(), oofem::ZZErrorEstimator::giveElementError(), oofem::HuertaErrorEstimator::solveRefinedElementProblem(), oofem::HuertaErrorEstimator::solveRefinedPatchProblem(), and oofem::HuertaErrorEstimator::solveRefinedWholeProblem().

Member Data Documentation

◆ eeType

◆ IStype

InternalStateType oofem::ErrorEstimator::IStype
protected

Internal state type of variable to get internal forces.

Definition at line 95 of file errorestimator.h.

Referenced by oofem::ZZErrorEstimator::estimateError(), and initializeFrom().

◆ rc

◆ regionSkipMap

IntArray oofem::ErrorEstimator::regionSkipMap
protected

Map indicating regions to skip (region - cross section model). Do not access this variable directly, since this variable is read from input and could have size different from actual number of regions - use always the skipRegion method, since it performs size check. and handles all regions correctly.

Definition at line 91 of file errorestimator.h.

Referenced by ErrorEstimator(), initializeFrom(), and skipRegion().

◆ skippedNelems

int oofem::ErrorEstimator::skippedNelems
protected

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