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

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>

+ Inheritance diagram for oofem::DirectErrorIndicatorRC:
+ Collaboration diagram for oofem::DirectErrorIndicatorRC:

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...
 
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 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
ErrorEstimatoree
 
CommunicatorBuffcommBuff
 Common Communicator buffer. More...
 
ProblemCommunicatorcommunicator
 Communicator. More...
 
bool initCommMap
 Communication init flag. 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 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.

Constructor & Destructor Documentation

oofem::DirectErrorIndicatorRC::DirectErrorIndicatorRC ( int  n,
ErrorEstimator e 
)

Constructor.

Definition at line 50 of file directerrorindicatorrc.C.

References dofManDensityExchangeFlag, and stateCounter.

oofem::DirectErrorIndicatorRC::~DirectErrorIndicatorRC ( )
virtual

Definition at line 58 of file directerrorindicatorrc.C.

Member Function Documentation

double oofem::DirectErrorIndicatorRC::giveDofManDensity ( int  num)
virtual

Returns existing mesh size for given dof manager.

Parameters
numDofMan 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().

double oofem::DirectErrorIndicatorRC::giveDofManIndicator ( int  num,
TimeStep tStep 
)
protected

Returns dof man indicator values.

Parameters
numDofMan number.
tStepTime 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().

virtual const char* oofem::DirectErrorIndicatorRC::giveInputRecordName ( ) const
inlinevirtual
Returns
Input record name of the receiver.

Implements oofem::FEMComponent.

Definition at line 115 of file directerrorindicatorrc.h.

double oofem::DirectErrorIndicatorRC::giveMinIndicatorDensity ( )
inline
double oofem::DirectErrorIndicatorRC::giveMinIndicatorLimit ( )
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 
)
RemeshingStrategy oofem::DirectErrorIndicatorRC::giveRemeshingStrategy ( TimeStep tStep)
virtual

Determines, if the remeshing is needed, and if needed, the type of strategy used.

Parameters
tStepTime step.

Implements oofem::RemeshingCriteria.

Definition at line 262 of file directerrorindicatorrc.C.

References currStrategy, and estimateMeshDensities().

Referenced by oofem::CombinedZZSIRemeshingCriteria::giveRemeshingStrategy().

double oofem::DirectErrorIndicatorRC::giveRequiredDofManDensity ( int  num,
TimeStep tStep,
int  relative = 0 
)
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).

Parameters
numDofman number.
tStepTime step.
relativeIf 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().

double oofem::DirectErrorIndicatorRC::giveZeroIndicatorDensity ( )
inline

Definition at line 110 of file directerrorindicatorrc.h.

References reinitialize(), setDomain(), and zeroIndicatorDensity.

IRResultType oofem::DirectErrorIndicatorRC::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::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().

void oofem::DirectErrorIndicatorRC::reinitialize ( )
virtual
void oofem::DirectErrorIndicatorRC::setDomain ( Domain d)
virtual

Sets associated Domain.

Parameters
dNew 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().

Member Data Documentation

RemeshingStrategy oofem::DirectErrorIndicatorRC::currStrategy
protected

Definition at line 86 of file directerrorindicatorrc.h.

Referenced by estimateMeshDensities(), and giveRemeshingStrategy().

bool oofem::DirectErrorIndicatorRC::dofManDensityExchangeFlag
protected
double oofem::DirectErrorIndicatorRC::maxIndicatorDensity
protected

Definition at line 74 of file directerrorindicatorrc.h.

Referenced by estimateMeshDensities(), and initializeFrom().

double oofem::DirectErrorIndicatorRC::maxIndicatorLimit
protected

Definition at line 73 of file directerrorindicatorrc.h.

Referenced by estimateMeshDensities(), and initializeFrom().

double oofem::DirectErrorIndicatorRC::minIndicatorDensity
protected
double oofem::DirectErrorIndicatorRC::minIndicatorLimit
protected
FloatArray oofem::DirectErrorIndicatorRC::nodalDensities
protected

Definition at line 83 of file directerrorindicatorrc.h.

Referenced by estimateMeshDensities(), and giveRequiredDofManDensity().

double oofem::DirectErrorIndicatorRC::remeshingDensityRatioToggle
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().

std :: map< int, double > oofem::DirectErrorIndicatorRC::sharedDofManDensities
protected
std :: map< int, double > oofem::DirectErrorIndicatorRC::sharedDofManIndicatorVals
protected
StateCounterType oofem::DirectErrorIndicatorRC::stateCounter
protected

Actual values (densities) state counter.

Definition at line 85 of file directerrorindicatorrc.h.

Referenced by DirectErrorIndicatorRC(), estimateMeshDensities(), and reinitialize().

double oofem::DirectErrorIndicatorRC::zeroIndicatorDensity
protected

Default mesh density for Indicator value < minIndicatorLimit.

Definition at line 76 of file directerrorindicatorrc.h.

Referenced by estimateMeshDensities(), giveZeroIndicatorDensity(), and initializeFrom().


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:34 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011