|
OOFEM 3.0
|
#include <zzerrorestimator.h>
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. | |
| virtual | ~ZZErrorEstimator () |
| Destructor. | |
| double | giveElementError (EE_ErrorType type, Element *elem, TimeStep *tStep) override |
| double | giveValue (EE_ValueType type, TimeStep *tStep) override |
| int | estimateError (EE_ErrorMode mode, TimeStep *tStep) override |
| RemeshingCriteria * | giveRemeshingCrit () 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. | |
| Domain * | giveDomain () 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 Interface * | giveInterface (InterfaceType t) |
| std::string | errorInfo (const char *func) const |
| Returns string for prepending output (used by error reporting macros). | |
Protected Attributes | |
| double | globalENorm |
| Global error norm. | |
| double | globalSNorm |
| Global norm of quantity which error is evaluated. | |
| double | globalErrorEstimate |
| Global error estimate (relative). | |
| FloatArray | eNorms |
| Cache storing element norms. | |
| NormType | normType |
| Type of norm used. | |
| NodalRecoveryType | nodalRecoveryType |
| Nodal recovery type. | |
| StateCounterType | stateCounter |
| Actual state counter. | |
| Protected Attributes inherited from oofem::ErrorEstimator | |
| ErrorEstimatorType | eeType |
| std ::unique_ptr< RemeshingCriteria > | rc |
| 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. | |
| Domain * | domain |
| Link to domain object, useful for communicating with other FEM components. | |
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.
Nodal recovery type.
| Enumerator | |
|---|---|
| ZZRecovery | |
| SPRRecovery | |
Definition at line 88 of file zzerrorestimator.h.
|
inline |
Constructor.
Definition at line 111 of file zzerrorestimator.h.
References oofem::EET_ZZEE, oofem::ErrorEstimator::eeType, oofem::ErrorEstimator::ErrorEstimator(), L2Norm, nodalRecoveryType, normType, stateCounter, and ZZRecovery.
|
inlinevirtual |
Destructor.
Definition at line 118 of file zzerrorestimator.h.
|
overridevirtual |
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.
| mode | Error mode. |
| tStep | Time step. |
Implements oofem::ErrorEstimator.
Definition at line 67 of file zzerrorestimator.C.
References oofem::ParallelContext::accumulate(), oofem::Set::addAllElements(), oofem::FloatArray::at(), oofem::FEMComponent::domain, eNorms, oofem::FEMComponent::giveInterface(), oofem::TimeStep::giveSolutionStateCounter(), globalENorm, globalErrorEstimate, globalSNorm, oofem::ErrorEstimator::IStype, nodalRecoveryType, normType, OOFEM_ERROR, OOFEM_LOG_RELEVANT, oofem::NodalRecoveryModel::recoverValues(), oofem::FloatArray::resize(), oofem::ErrorEstimator::skipRegion(), SPRRecovery, stateCounter, oofem::temporaryEM, oofem::Vec2(), oofem::ZZErrorEstimatorInterface::ZZErrorEstimatorI_computeElementContributions(), oofem::ZZErrorEstimatorInterfaceType, and ZZRecovery.
Referenced by giveElementError(), and giveValue().
|
inlineoverridevirtual |
Implements oofem::FEMComponent.
Definition at line 127 of file zzerrorestimator.h.
|
overridevirtual |
Returns the element error. The estimateError service should be called before.
| type | Error type. |
| elem | Element for which error requested. |
| tStep | Time step. |
Implements oofem::ErrorEstimator.
Definition at line 159 of file zzerrorestimator.C.
References eNorms, oofem::equilibratedEM, estimateError(), oofem::FEMComponent::giveInterface(), oofem::FEMComponent::giveNumber(), oofem::Element::giveRegionNumber(), oofem::internalStressET, normType, oofem::ErrorEstimator::skipRegion(), oofem::ZZErrorEstimatorInterface::ZZErrorEstimatorI_computeElementContributions(), and oofem::ZZErrorEstimatorInterfaceType.
|
inlineoverridevirtual |
Implements oofem::FEMComponent.
Definition at line 128 of file zzerrorestimator.h.
References _IFT_ZZErrorEstimator_Name.
|
overridevirtual |
Returns reference to associated remeshing criteria.
Implements oofem::ErrorEstimator.
Definition at line 205 of file zzerrorestimator.C.
References oofem::ErrorEstimator::rc.
Referenced by initializeFrom().
|
overridevirtual |
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.
| type | Error type. |
| tStep | Time step. |
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.
|
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.
| ir | Input record to initialize from. |
| priority | Priority of the input record. This is used to determine the order of initialization |
Reimplemented from oofem::ErrorEstimator.
Definition at line 216 of file zzerrorestimator.C.
References _IFT_ZZErrorEstimator_normtype, _IFT_ZZErrorEstimator_recoverytype, EnergyNorm, giveRemeshingCrit(), IR_GIVE_OPTIONAL_FIELD, L2Norm, nodalRecoveryType, normType, SPRRecovery, and ZZRecovery.
|
protected |
Cache storing element norms.
Definition at line 99 of file zzerrorestimator.h.
Referenced by estimateError(), and giveElementError().
|
protected |
Global error norm.
Definition at line 92 of file zzerrorestimator.h.
Referenced by estimateError(), and giveValue().
|
protected |
Global error estimate (relative).
Definition at line 96 of file zzerrorestimator.h.
Referenced by estimateError(), and giveValue().
|
protected |
Global norm of quantity which error is evaluated.
Definition at line 94 of file zzerrorestimator.h.
Referenced by estimateError(), and giveValue().
|
protected |
Nodal recovery type.
Definition at line 104 of file zzerrorestimator.h.
Referenced by estimateError(), initializeFrom(), and ZZErrorEstimator().
|
protected |
Type of norm used.
Definition at line 102 of file zzerrorestimator.h.
Referenced by estimateError(), giveElementError(), initializeFrom(), and ZZErrorEstimator().
|
protected |
Actual state counter.
Definition at line 107 of file zzerrorestimator.h.
Referenced by estimateError(), and ZZErrorEstimator().