OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
The class is an implementation of "direct" remeshing criteria, which maps the error indication, which is usually the value of observed internal variable to the corresponding required element size. More...
#include <directerrorindicatorrc.h>
Public Member Functions | |
DirectErrorIndicatorRC (int n, ErrorEstimator *e) | |
Constructor. More... | |
virtual | ~DirectErrorIndicatorRC () |
virtual double | giveRequiredDofManDensity (int num, TimeStep *tStep, int relative=0) |
Returns the required mesh size n given dof manager. More... | |
virtual double | giveDofManDensity (int num) |
Returns existing mesh size for given dof manager. More... | |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
virtual int | estimateMeshDensities (TimeStep *tStep) |
Estimates the nodal densities. More... | |
virtual RemeshingStrategy | giveRemeshingStrategy (TimeStep *tStep) |
Determines, if the remeshing is needed, and if needed, the type of strategy used. More... | |
double | giveMinIndicatorLimit () |
Returns the minimum indicator limit. More... | |
double | giveMinIndicatorDensity () |
void | giveNodeChar (int inode, TimeStep *tStep, double &indicatorVal, double &currDensity) |
double | giveZeroIndicatorDensity () |
virtual void | reinitialize () |
virtual void | setDomain (Domain *d) |
Sets associated Domain. More... | |
virtual const char * | giveInputRecordName () const |
virtual const char * | giveClassName () const |
Public Member Functions inherited from oofem::RemeshingCriteria | |
RemeshingCriteria (int n, ErrorEstimator *e) | |
Constructor. More... | |
virtual | ~RemeshingCriteria () |
Destructor. More... | |
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... | |
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 Member Functions | |
double | giveLocalDofManDensity (int num) |
double | giveDofManIndicator (int num, TimeStep *tStep) |
Returns dof man indicator values. More... | |
double | giveLocalDofManIndicator (int num, TimeStep *tStep) |
void | exchangeDofManDensities () |
int | packSharedDofManLocalDensities (ProcessCommunicator &processComm) |
int | unpackSharedDofManLocalDensities (ProcessCommunicator &processComm) |
void | exchangeDofManIndicatorVals (TimeStep *tStep) |
int | packSharedDofManLocalIndicatorVals (ProcessCommunicator &processComm) |
int | unpackSharedDofManLocalIndicatorVals (ProcessCommunicator &processComm) |
Protected Attributes | |
double | minIndicatorLimit |
double | maxIndicatorLimit |
double | minIndicatorDensity |
double | maxIndicatorDensity |
double | zeroIndicatorDensity |
Default mesh density for Indicator value < minIndicatorLimit. More... | |
double | remeshingDensityRatioToggle |
Ratio between proposedDensity and currDensity. More... | |
FloatArray | nodalDensities |
StateCounterType | stateCounter |
Actual values (densities) state counter. More... | |
RemeshingStrategy | currStrategy |
std::map< int, double > | sharedDofManDensities |
std::map< int, double > | sharedDofManIndicatorVals |
bool | dofManDensityExchangeFlag |
Protected Attributes inherited from oofem::RemeshingCriteria | |
ErrorEstimator * | ee |
CommunicatorBuff * | commBuff |
Common Communicator buffer. More... | |
ProblemCommunicator * | communicator |
Communicator. More... | |
bool | initCommMap |
Communication init flag. 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 class is an implementation of "direct" remeshing criteria, which maps the error indication, which is usually the value of observed internal variable to the corresponding required element size.
The error estimate and global error for error indicator could not be obtained. The error indication value only tells, that the remeshing is necessary, but no information about the actual error are provided. The task of this class is to simply transform the indicator value to corresponding mesh size.
Definition at line 70 of file directerrorindicatorrc.h.
oofem::DirectErrorIndicatorRC::DirectErrorIndicatorRC | ( | int | n, |
ErrorEstimator * | e | ||
) |
Constructor.
Definition at line 50 of file directerrorindicatorrc.C.
References dofManDensityExchangeFlag, and stateCounter.
|
virtual |
Definition at line 58 of file directerrorindicatorrc.C.
|
virtual |
Estimates the nodal densities.
tStep | Time step. |
Implements oofem::RemeshingCriteria.
Definition at line 160 of file directerrorindicatorrc.C.
References oofem::FloatArray::at(), oofem::RemeshingCriteria::communicator, currStrategy, exchangeDofManDensities(), exchangeDofManIndicatorVals(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), giveNodeChar(), oofem::Domain::giveNumberOfDofManagers(), oofem::TimeStep::giveSolutionStateCounter(), oofem::RemeshingCriteria::initCommMap, maxIndicatorDensity, maxIndicatorLimit, minIndicatorDensity, minIndicatorLimit, nodalDensities, oofem::NoRemeshing_RS, OOFEM_LOG_DEBUG, OOFEM_LOG_INFO, remeshingDensityRatioToggle, oofem::RemeshingFromCurrentState_RS, oofem::FloatArray::resize(), oofem::ProblemCommunicator::setUpCommunicationMaps(), stateCounter, and zeroIndicatorDensity.
Referenced by oofem::CombinedZZSIRemeshingCriteria::estimateMeshDensities(), giveRemeshingStrategy(), and giveRequiredDofManDensity().
|
protected |
Definition at line 292 of file directerrorindicatorrc.C.
References oofem::RemeshingCriteria::communicator, oofem::DofManager_shared, dofManDensityExchangeFlag, oofem::FEMComponent::domain, oofem::Communicator::finishExchange(), oofem::Domain::giveDofManager(), oofem::FEMComponent::giveDomain(), giveLocalDofManDensity(), oofem::Domain::giveNumberOfDofManagers(), oofem::DofManager::giveParallelMode(), oofem::Communicator::initExchange(), oofem::Communicator::packAllData(), packSharedDofManLocalDensities(), sharedDofManDensities, oofem::Communicator::unpackAllData(), and unpackSharedDofManLocalDensities().
Referenced by estimateMeshDensities(), and giveClassName().
|
protected |
Definition at line 356 of file directerrorindicatorrc.C.
References oofem::RemeshingCriteria::communicator, oofem::DofManager_shared, oofem::FEMComponent::domain, oofem::Communicator::finishExchange(), oofem::Domain::giveDofManager(), oofem::FEMComponent::giveDomain(), giveLocalDofManIndicator(), oofem::Domain::giveNumberOfDofManagers(), oofem::DofManager::giveParallelMode(), oofem::Communicator::initExchange(), oofem::Communicator::packAllData(), packSharedDofManLocalIndicatorVals(), sharedDofManIndicatorVals, oofem::Communicator::unpackAllData(), and unpackSharedDofManLocalIndicatorVals().
Referenced by estimateMeshDensities(), and giveClassName().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 116 of file directerrorindicatorrc.h.
References exchangeDofManDensities(), exchangeDofManIndicatorVals(), giveDofManIndicator(), giveLocalDofManDensity(), giveLocalDofManIndicator(), packSharedDofManLocalDensities(), packSharedDofManLocalIndicatorVals(), unpackSharedDofManLocalDensities(), and unpackSharedDofManLocalIndicatorVals().
|
virtual |
Returns existing mesh size for given dof manager.
num | DofMan number. |
Implements oofem::RemeshingCriteria.
Definition at line 71 of file directerrorindicatorrc.C.
References oofem::Domain::giveDofManager(), oofem::FEMComponent::giveDomain(), giveLocalDofManDensity(), oofem::DofManager::isShared(), and sharedDofManDensities.
Referenced by giveNodeChar(), and giveRequiredDofManDensity().
|
protected |
Returns dof man indicator values.
num | DofMan number. |
tStep | Time step. |
Definition at line 115 of file directerrorindicatorrc.C.
References oofem::Domain::giveDofManager(), oofem::FEMComponent::giveDomain(), giveLocalDofManIndicator(), oofem::DofManager::isShared(), and sharedDofManIndicatorVals.
Referenced by giveClassName(), and giveNodeChar().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 115 of file directerrorindicatorrc.h.
|
protected |
Definition at line 88 of file directerrorindicatorrc.C.
References oofem::IntArray::at(), oofem::Element::computeMeanSize(), oofem::Domain::giveConnectivityTable(), oofem::ConnectivityTable::giveDofManConnectivityArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::IntArray::giveSize(), and oofem::max().
Referenced by exchangeDofManDensities(), giveClassName(), and giveDofManDensity().
|
protected |
Definition at line 132 of file directerrorindicatorrc.C.
References oofem::IntArray::at(), oofem::RemeshingCriteria::ee, oofem::Domain::giveConnectivityTable(), oofem::ConnectivityTable::giveDofManConnectivityArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::ErrorEstimator::giveElementError(), oofem::IntArray::giveSize(), oofem::indicatorET, and oofem::max().
Referenced by exchangeDofManIndicatorVals(), giveClassName(), and giveDofManIndicator().
|
inline |
Definition at line 107 of file directerrorindicatorrc.h.
References giveNodeChar(), and minIndicatorDensity.
Referenced by oofem::CombinedZZSIRemeshingCriteria::giveRequiredDofManDensity().
|
inline |
Returns the minimum indicator limit.
Definition at line 106 of file directerrorindicatorrc.h.
References minIndicatorLimit.
Referenced by oofem::CombinedZZSIRemeshingCriteria::giveRequiredDofManDensity().
void oofem::DirectErrorIndicatorRC::giveNodeChar | ( | int | inode, |
TimeStep * | tStep, | ||
double & | indicatorVal, | ||
double & | currDensity | ||
) |
Definition at line 63 of file directerrorindicatorrc.C.
References giveDofManDensity(), and giveDofManIndicator().
Referenced by estimateMeshDensities(), giveMinIndicatorDensity(), and oofem::CombinedZZSIRemeshingCriteria::giveRequiredDofManDensity().
|
virtual |
Determines, if the remeshing is needed, and if needed, the type of strategy used.
tStep | Time step. |
Implements oofem::RemeshingCriteria.
Definition at line 262 of file directerrorindicatorrc.C.
References currStrategy, and estimateMeshDensities().
Referenced by oofem::CombinedZZSIRemeshingCriteria::giveRemeshingStrategy().
|
virtual |
Returns the required mesh size n given dof manager.
The mesh density is defined as a required element size (in 1D the element length, in 2D the square from element area).
num | Dofman number. |
tStep | Time step. |
relative | If zero, then actual density is returned, otherwise the relative density to current is returned. |
Implements oofem::RemeshingCriteria.
Definition at line 225 of file directerrorindicatorrc.C.
References oofem::FloatArray::at(), estimateMeshDensities(), giveDofManDensity(), and nodalDensities.
Referenced by oofem::CombinedZZSIRemeshingCriteria::giveRequiredDofManDensity().
|
inline |
Definition at line 110 of file directerrorindicatorrc.h.
References reinitialize(), setDomain(), and zeroIndicatorDensity.
|
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.
Definition at line 239 of file directerrorindicatorrc.C.
References _IFT_DirectErrorIndicatorRC_defdens, _IFT_DirectErrorIndicatorRC_maxdens, _IFT_DirectErrorIndicatorRC_maxlim, _IFT_DirectErrorIndicatorRC_mindens, _IFT_DirectErrorIndicatorRC_minlim, _IFT_DirectErrorIndicatorRC_remeshingdensityratio, oofem::CBT_dynamic, oofem::RemeshingCriteria::commBuff, oofem::RemeshingCriteria::communicator, oofem::FEMComponent::domain, oofem::Domain::giveEngngModel(), oofem::EngngModel::giveNumberOfProcesses(), oofem::EngngModel::giveRank(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_OK, maxIndicatorDensity, maxIndicatorLimit, minIndicatorDensity, minIndicatorLimit, remeshingDensityRatioToggle, and zeroIndicatorDensity.
Referenced by oofem::CombinedZZSIRemeshingCriteria::initializeFrom().
|
protected |
Definition at line 317 of file directerrorindicatorrc.C.
References oofem::IntArray::at(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::IntArray::giveSize(), oofem::ProcessCommunicator::giveToSendMap(), sharedDofManDensities, and oofem::ProcessCommunicatorBuff::write().
Referenced by exchangeDofManDensities(), and giveClassName().
|
protected |
Definition at line 377 of file directerrorindicatorrc.C.
References oofem::IntArray::at(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::IntArray::giveSize(), oofem::ProcessCommunicator::giveToSendMap(), sharedDofManIndicatorVals, and oofem::ProcessCommunicatorBuff::write().
Referenced by exchangeDofManIndicatorVals(), and giveClassName().
|
virtual |
Reimplemented from oofem::RemeshingCriteria.
Definition at line 269 of file directerrorindicatorrc.C.
References dofManDensityExchangeFlag, oofem::RemeshingCriteria::initCommMap, and stateCounter.
Referenced by giveZeroIndicatorDensity().
|
virtual |
Sets associated Domain.
d | New domain which receiver should belong to. |
Reimplemented from oofem::FEMComponent.
Definition at line 280 of file directerrorindicatorrc.C.
References dofManDensityExchangeFlag, oofem::RemeshingCriteria::initCommMap, and oofem::FEMComponent::setDomain().
Referenced by giveZeroIndicatorDensity(), and oofem::CombinedZZSIRemeshingCriteria::setDomain().
|
protected |
Definition at line 332 of file directerrorindicatorrc.C.
References oofem::IntArray::at(), oofem::FEMComponent::domain, oofem::Domain::giveDofManager(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::IntArray::giveSize(), oofem::ProcessCommunicator::giveToRecvMap(), oofem::max(), OOFEM_LOG_INFO, oofem::ProcessCommunicatorBuff::read(), and sharedDofManDensities.
Referenced by exchangeDofManDensities(), and giveClassName().
|
protected |
Definition at line 393 of file directerrorindicatorrc.C.
References oofem::IntArray::at(), oofem::FEMComponent::domain, oofem::Domain::giveDofManager(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::IntArray::giveSize(), oofem::ProcessCommunicator::giveToRecvMap(), oofem::max(), OOFEM_LOG_INFO, oofem::ProcessCommunicatorBuff::read(), and sharedDofManIndicatorVals.
Referenced by exchangeDofManIndicatorVals(), and giveClassName().
|
protected |
Definition at line 86 of file directerrorindicatorrc.h.
Referenced by estimateMeshDensities(), and giveRemeshingStrategy().
|
protected |
Definition at line 90 of file directerrorindicatorrc.h.
Referenced by DirectErrorIndicatorRC(), exchangeDofManDensities(), reinitialize(), and setDomain().
|
protected |
Definition at line 74 of file directerrorindicatorrc.h.
Referenced by estimateMeshDensities(), and initializeFrom().
|
protected |
Definition at line 73 of file directerrorindicatorrc.h.
Referenced by estimateMeshDensities(), and initializeFrom().
|
protected |
Definition at line 74 of file directerrorindicatorrc.h.
Referenced by estimateMeshDensities(), giveMinIndicatorDensity(), and initializeFrom().
|
protected |
Definition at line 73 of file directerrorindicatorrc.h.
Referenced by estimateMeshDensities(), giveMinIndicatorLimit(), and initializeFrom().
|
protected |
Definition at line 83 of file directerrorindicatorrc.h.
Referenced by estimateMeshDensities(), and giveRequiredDofManDensity().
|
protected |
Ratio between proposedDensity and currDensity.
The remeshing is forced, whenever the actual ratio is smaller than this value. Default value is 0.80
Definition at line 82 of file directerrorindicatorrc.h.
Referenced by estimateMeshDensities(), and initializeFrom().
|
protected |
Definition at line 88 of file directerrorindicatorrc.h.
Referenced by exchangeDofManDensities(), giveDofManDensity(), packSharedDofManLocalDensities(), and unpackSharedDofManLocalDensities().
|
protected |
Definition at line 89 of file directerrorindicatorrc.h.
Referenced by exchangeDofManIndicatorVals(), giveDofManIndicator(), packSharedDofManLocalIndicatorVals(), and unpackSharedDofManLocalIndicatorVals().
|
protected |
Actual values (densities) state counter.
Definition at line 85 of file directerrorindicatorrc.h.
Referenced by DirectErrorIndicatorRC(), estimateMeshDensities(), and reinitialize().
|
protected |
Default mesh density for Indicator value < minIndicatorLimit.
Definition at line 76 of file directerrorindicatorrc.h.
Referenced by estimateMeshDensities(), giveZeroIndicatorDensity(), and initializeFrom().