OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::ZZErrorEstimator Class Reference

The implementation of Zienkiewicz Zhu Error Estimator (Zienkiewicz and Zhu: A simple error estimator and adaptive procedure for practical engineering analysis, International Journal for Numerical Methods in Engineering, vol. More...

#include <zzerrorestimator.h>

+ Inheritance diagram for oofem::ZZErrorEstimator:
+ Collaboration diagram for oofem::ZZErrorEstimator:

Public Types

enum  NormType { L2Norm, EnergyNorm }
 Type of norm used. More...
 
enum  NodalRecoveryType { ZZRecovery, SPRRecovery }
 Nodal recovery type. More...
 

Public Member Functions

 ZZErrorEstimator (int n, Domain *d)
 Constructor. More...
 
virtual ~ZZErrorEstimator ()
 Destructor. More...
 
virtual double giveElementError (EE_ErrorType type, Element *elem, TimeStep *tStep)
 Returns the element error. More...
 
virtual double giveValue (EE_ValueType type, TimeStep *tStep)
 Returns the characteristic value of given type. More...
 
virtual int estimateError (EE_ErrorMode mode, TimeStep *tStep)
 Estimates the error on associated domain at given time step. More...
 
virtual RemeshingCriteriagiveRemeshingCrit ()
 Returns reference to associated remeshing criteria. More...
 
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver according to object description stored in input record. More...
 
virtual const char * giveClassName () const
 
- Public Member Functions inherited from oofem::ErrorEstimator
 ErrorEstimator (int n, Domain *d)
 Constructor. More...
 
virtual ~ErrorEstimator ()
 Destructor. More...
 
void setDomain (Domain *d)
 Sets Domain; should also re-initialize attributes if necessary. More...
 
int giveNumberOfSkippedElements ()
 Returns number of elements skipped in error estimation. More...
 
ErrorEstimatorType giveErrorEstimatorType () const
 Returns error estimation type of receiver. More...
 
bool skipRegion (int reg)
 Returns nonzero if region has been skipped in error estimation (user option). More...
 
virtual void reinitialize ()
 
virtual const char * giveInputRecordName () const
 
- Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
 Regular constructor, creates component with given number and belonging to given domain. More...
 
virtual ~FEMComponent ()
 Virtual destructor. More...
 
DomaingiveDomain () const
 
int giveNumber () const
 
void setNumber (int num)
 Sets number of receiver. More...
 
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
 Local renumbering support. More...
 
virtual void giveInputRecord (DynamicInputRecord &input)
 Setups the input record string of receiver. More...
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Stores receiver state to output stream. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Restores the receiver state previously written in stream. More...
 
virtual int checkConsistency ()
 Allows programmer to test some internal data, before computation begins. More...
 
virtual void printOutputAt (FILE *file, TimeStep *tStep)
 Prints output of receiver to stream, for given time step. More...
 
virtual void printYourself ()
 Prints receiver state on stdout. Useful for debugging. More...
 
virtual InterfacegiveInterface (InterfaceType t)
 Interface requesting service. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 

Protected Attributes

double globalENorm
 Global error norm. More...
 
double globalSNorm
 Global norm of quantity which error is evaluated. More...
 
double globalErrorEstimate
 Global error estimate (relative) More...
 
FloatArray eNorms
 Cache storing element norms. More...
 
NormType normType
 Type of norm used. More...
 
NodalRecoveryType nodalRecoveryType
 Nodal recovery type. More...
 
StateCounterType stateCounter
 Actual state counter. More...
 
- Protected Attributes inherited from oofem::ErrorEstimator
ErrorEstimatorType eeType
 
std::unique_ptr< RemeshingCriteriarc
 
IntArray regionSkipMap
 Map indicating regions to skip (region - cross section model). More...
 
int skippedNelems
 Number of skipped elements. More...
 
InternalStateType IStype
 Internal state type of variable to get internal forces. More...
 
- Protected Attributes inherited from oofem::FEMComponent
int number
 Component number. More...
 
Domaindomain
 Link to domain object, useful for communicating with other FEM components. More...
 

Detailed Description

The implementation of Zienkiewicz Zhu Error Estimator (Zienkiewicz and Zhu: A simple error estimator and adaptive procedure for practical engineering analysis, International Journal for Numerical Methods in Engineering, vol.

24, 337-357, 1987). The basic task is to evaluate the stress error on associated domain. The algorithm is written in general way, so it is possible to to evaluate different errors (for example temperature error). Then corresponding member attribute identifying the type of quantity used should be declared and initialized (for example in instanciateYourself() service). Then the modification is required only when requesting element contributions.

This task requires the special element algorithms, which are supported at element level using interface concept. This estimator also provides the compatible Remeshing Criteria, which based on error measure will evaluate the required mesh density of a new domain.

Definition at line 82 of file zzerrorestimator.h.

Member Enumeration Documentation

Nodal recovery type.

Enumerator
ZZRecovery 
SPRRecovery 

Definition at line 88 of file zzerrorestimator.h.

Type of norm used.

Enumerator
L2Norm 
EnergyNorm 

Definition at line 86 of file zzerrorestimator.h.

Constructor & Destructor Documentation

oofem::ZZErrorEstimator::ZZErrorEstimator ( int  n,
Domain d 
)
inline

Constructor.

Definition at line 111 of file zzerrorestimator.h.

References oofem::EET_ZZEE, oofem::ErrorEstimator::eeType, L2Norm, and ZZRecovery.

virtual oofem::ZZErrorEstimator::~ZZErrorEstimator ( )
inlinevirtual

Destructor.

Definition at line 118 of file zzerrorestimator.h.

References estimateError(), giveElementError(), giveRemeshingCrit(), giveValue(), and initializeFrom().

Member Function Documentation

int oofem::ZZErrorEstimator::estimateError ( EE_ErrorMode  mode,
TimeStep tStep 
)
virtual
virtual const char* oofem::ZZErrorEstimator::giveClassName ( ) const
inlinevirtual
Returns
Class name of the receiver.

Implements oofem::FEMComponent.

Definition at line 127 of file zzerrorestimator.h.

double oofem::ZZErrorEstimator::giveElementError ( EE_ErrorType  type,
Element elem,
TimeStep tStep 
)
virtual
RemeshingCriteria * oofem::ZZErrorEstimator::giveRemeshingCrit ( )
virtual

Returns reference to associated remeshing criteria.

Implements oofem::ErrorEstimator.

Definition at line 205 of file zzerrorestimator.C.

References oofem::ErrorEstimator::rc.

Referenced by initializeFrom(), and ~ZZErrorEstimator().

double oofem::ZZErrorEstimator::giveValue ( EE_ValueType  type,
TimeStep tStep 
)
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.

Implements oofem::ErrorEstimator.

Definition at line 190 of file zzerrorestimator.C.

References oofem::equilibratedEM, estimateError(), globalENorm, oofem::globalErrorEEV, globalErrorEstimate, oofem::globalNormEEV, globalSNorm, and oofem::relativeErrorEstimateEEV.

Referenced by oofem::CombinedZZSIErrorEstimator::giveValue(), and ~ZZErrorEstimator().

IRResultType oofem::ZZErrorEstimator::initializeFrom ( InputRecord ir)
virtual

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.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
Returns
IRResultType

Reimplemented from oofem::ErrorEstimator.

Definition at line 216 of file zzerrorestimator.C.

References _IFT_ZZErrorEstimator_normtype, _IFT_ZZErrorEstimator_recoverytype, EnergyNorm, giveRemeshingCrit(), oofem::FEMComponent::initializeFrom(), oofem::ErrorEstimator::initializeFrom(), IR_GIVE_OPTIONAL_FIELD, L2Norm, nodalRecoveryType, normType, SPRRecovery, and ZZRecovery.

Referenced by oofem::CombinedZZSIErrorEstimator::initializeFrom(), ~ZZErrorEstimator(), and oofem::ZZRemeshingCriteria::~ZZRemeshingCriteria().

Member Data Documentation

FloatArray oofem::ZZErrorEstimator::eNorms
protected

Cache storing element norms.

Definition at line 99 of file zzerrorestimator.h.

Referenced by estimateError(), and giveElementError().

double oofem::ZZErrorEstimator::globalENorm
protected

Global error norm.

Definition at line 92 of file zzerrorestimator.h.

Referenced by estimateError(), and giveValue().

double oofem::ZZErrorEstimator::globalErrorEstimate
protected

Global error estimate (relative)

Definition at line 96 of file zzerrorestimator.h.

Referenced by estimateError(), and giveValue().

double oofem::ZZErrorEstimator::globalSNorm
protected

Global norm of quantity which error is evaluated.

Definition at line 94 of file zzerrorestimator.h.

Referenced by estimateError(), and giveValue().

NodalRecoveryType oofem::ZZErrorEstimator::nodalRecoveryType
protected

Nodal recovery type.

Definition at line 104 of file zzerrorestimator.h.

Referenced by estimateError(), and initializeFrom().

NormType oofem::ZZErrorEstimator::normType
protected

Type of norm used.

Definition at line 102 of file zzerrorestimator.h.

Referenced by estimateError(), giveElementError(), and initializeFrom().

StateCounterType oofem::ZZErrorEstimator::stateCounter
protected

Actual state counter.

Definition at line 107 of file zzerrorestimator.h.

Referenced by estimateError().


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:44 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011