OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
The base class for all error estimation or error indicator algorithms. More...
#include <errorestimator.h>
Public Member Functions | |
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... | |
virtual double | giveElementError (EE_ErrorType type, Element *elem, TimeStep *tStep)=0 |
Returns the element error. More... | |
virtual double | giveValue (EE_ValueType type, TimeStep *tStep)=0 |
Returns the characteristic value of given type. More... | |
int | giveNumberOfSkippedElements () |
Returns number of elements skipped in error estimation. More... | |
virtual int | estimateError (EE_ErrorMode mode, TimeStep *tStep)=0 |
Estimates the error on associated domain at given time step. More... | |
virtual RemeshingCriteria * | giveRemeshingCrit ()=0 |
Returns reference to associated remeshing criteria. 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 IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
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... | |
virtual const char * | giveClassName () const =0 |
Domain * | giveDomain () 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 Interface * | giveInterface (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 | |
ErrorEstimatorType | eeType |
std::unique_ptr< RemeshingCriteria > | rc |
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... | |
Domain * | domain |
Link to domain object, useful for communicating with other FEM components. More... | |
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.
oofem::ErrorEstimator::ErrorEstimator | ( | int | n, |
Domain * | d | ||
) |
Constructor.
Definition at line 40 of file errorestimator.C.
References oofem::IntArray::clear(), regionSkipMap, and skippedNelems.
|
virtual |
Destructor.
Definition at line 46 of file errorestimator.C.
|
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.
mode | Error mode. |
tStep | Time step. |
Implemented in oofem::HuertaErrorEstimator, oofem::ZZErrorEstimator, oofem::MeshQualityErrorEstimator, oofem::CombinedZZSIErrorEstimator, and oofem::ScalarErrorIndicator.
Referenced by oofem::AdaptiveNonLinearStatic::solveYourselfAt(), oofem::AdaptiveLinearStatic::updateYourself(), and oofem::EngngModel::updateYourself().
|
pure virtual |
Returns the element error.
The estimateError service should be called before.
type | Error type. |
elem | Element for which error requested. |
tStep | Time step. |
Implemented in oofem::HuertaErrorEstimator, oofem::ZZErrorEstimator, oofem::MeshQualityErrorEstimator, oofem::ScalarErrorIndicator, and oofem::CombinedZZSIErrorEstimator.
Referenced by oofem::ZZRemeshingCriteria::estimateMeshDensities(), oofem::HuertaRemeshingCriteria::estimateMeshDensities(), oofem::Element::giveIPValue(), and oofem::DirectErrorIndicatorRC::giveLocalDofManIndicator().
|
inline |
Returns error estimation type of receiver.
Definition at line 142 of file errorestimator.h.
Referenced by oofem::HuertaRemeshingCriteria::estimateMeshDensities().
|
inlinevirtual |
Implements oofem::FEMComponent.
Reimplemented in oofem::HuertaErrorEstimator, and oofem::CombinedZZSIErrorEstimator.
Definition at line 156 of file errorestimator.h.
|
inline |
Returns number of elements skipped in error estimation.
Definition at line 125 of file errorestimator.h.
Referenced by oofem::HuertaRemeshingCriteria::estimateMeshDensities().
|
pure virtual |
Returns reference to associated remeshing criteria.
Implemented in oofem::HuertaErrorEstimator, oofem::ZZErrorEstimator, oofem::MeshQualityErrorEstimator, oofem::CombinedZZSIErrorEstimator, and oofem::ScalarErrorIndicator.
Referenced by oofem::Targe2Interface::createInput(), oofem::FreemInterface::createInput(), oofem::T3DInterface::createInput(), oofem::Subdivision::createMesh(), oofem::Element::giveInternalStateAtNode(), setDomain(), oofem::AdaptiveNonLinearStatic::solveYourselfAt(), and oofem::AdaptiveLinearStatic::updateYourself().
|
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.
type | Error type. |
tStep | Time step. |
Implemented in oofem::HuertaErrorEstimator, oofem::ZZErrorEstimator, oofem::MeshQualityErrorEstimator, oofem::ScalarErrorIndicator, and oofem::CombinedZZSIErrorEstimator.
Referenced by oofem::ZZRemeshingCriteria::estimateMeshDensities(), oofem::HuertaRemeshingCriteria::estimateMeshDensities(), and oofem::AdaptiveLinearStatic::printOutputAt().
|
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.
ir | Input record to initialize from. |
Reimplemented from oofem::FEMComponent.
Reimplemented in oofem::HuertaErrorEstimator, oofem::ZZErrorEstimator, oofem::MeshQualityErrorEstimator, oofem::ScalarErrorIndicator, and oofem::CombinedZZSIErrorEstimator.
Definition at line 60 of file errorestimator.C.
References _IFT_ErrorEstimator_IStype, _IFT_ErrorEstimator_regionskipmap, oofem::IntArray::clear(), IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_OK, IStype, and regionSkipMap.
Referenced by oofem::ScalarErrorIndicator::initializeFrom(), oofem::MeshQualityErrorEstimator::initializeFrom(), oofem::ZZErrorEstimator::initializeFrom(), oofem::HuertaErrorEstimator::initializeFrom(), and oofem::EngngModel::initializeFrom().
|
virtual |
Definition at line 74 of file errorestimator.C.
References rc.
Referenced by oofem::NonLinearDynamic::unpackMigratingData(), and oofem::NonLinearStatic::unpackMigratingData().
|
virtual |
Sets Domain; should also re-initialize attributes if necessary.
Reimplemented from oofem::FEMComponent.
Reimplemented in oofem::CombinedZZSIErrorEstimator.
Definition at line 51 of file errorestimator.C.
References giveRemeshingCrit(), and oofem::FEMComponent::setDomain().
Referenced by oofem::CombinedZZSIErrorEstimator::setDomain(), oofem::AdaptiveLinearStatic::updateDomainLinks(), and oofem::AdaptiveNonLinearStatic::updateDomainLinks().
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.
reg | Region to check. |
Definition at line 79 of file errorestimator.C.
References oofem::IntArray::at(), oofem::IntArray::giveSize(), and regionSkipMap.
Referenced by oofem::ZZErrorEstimator::estimateError(), oofem::HuertaErrorEstimator::estimateError(), oofem::ZZRemeshingCriteria::estimateMeshDensities(), oofem::ScalarErrorIndicator::giveElementError(), and oofem::ZZErrorEstimator::giveElementError().
|
protected |
|
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().
|
protected |
Definition at line 84 of file errorestimator.h.
Referenced by oofem::CombinedZZSIErrorEstimator::giveRemeshingCrit(), oofem::ScalarErrorIndicator::giveRemeshingCrit(), oofem::ZZErrorEstimator::giveRemeshingCrit(), oofem::HuertaErrorEstimator::giveRemeshingCrit(), and reinitialize().
|
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().
|
protected |
Number of skipped elements.
Definition at line 93 of file errorestimator.h.
Referenced by ErrorEstimator(), and oofem::HuertaErrorEstimator::estimateError().