OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::EnrichmentItem Class Referenceabstract

Abstract class representing entity, which is included in the FE model using one (or more) global functions. More...

#include <enrichmentitem.h>

+ Inheritance diagram for oofem::EnrichmentItem:
+ Collaboration diagram for oofem::EnrichmentItem:

Public Member Functions

 EnrichmentItem (int n, XfemManager *xm, Domain *aDomain)
 Constructor / destructor. More...
 
virtual ~EnrichmentItem ()
 
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver according to object description stored in input record. More...
 
virtual void giveInputRecord (DynamicInputRecord &input)
 Note the special treatment here, the "normal" syntax would be giveInputRecord(DynamicInputRecord &input). More...
 
virtual void appendInputRecords (DynamicDataReader &oDR)=0
 
virtual int instanciateYourself (DataReader &dr)=0
 
virtual const char * giveClassName () const =0
 
const IntArraygiveEnrichesDofsWithIdArray () const
 
int giveNumberOfEnrDofs () const
 
virtual void writeVtkDebug () const
 
bool isElementEnriched (const Element *element) const
 
bool isDofManEnriched (const DofManager &iDMan) const
 
int giveNumDofManEnrichments (const DofManager &iDMan) const
 
virtual bool canModifyMaterial () const
 
virtual bool isMaterialModified (GaussPoint &iGP, Element &iEl, CrossSection *&opCS) const
 
virtual void updateGeometry (FailureCriteriaStatus *fc, TimeStep *tStep)
 
virtual void updateGeometry (TimeStep *tStep)
 
virtual void updateGeometry ()=0
 
virtual void propagateFronts (bool &oFrontsHavePropagated)=0
 
virtual bool hasPropagatingFronts () const
 
virtual bool hasInitiationCriteria ()
 
int giveStartOfDofIdPool () const
 
int giveEndOfDofIdPool () const
 
virtual int giveDofPoolSize () const
 
virtual void computeEnrichedDofManDofIdArray (IntArray &oDofIdArray, DofManager &iDMan)
 Compute Id's of enriched dofs for a given DofManager. More...
 
virtual void giveEIDofIdArray (IntArray &answer) const
 
virtual void givePotentialEIDofIdArray (IntArray &answer) const
 
virtual void evaluateEnrFuncInNode (std::vector< double > &oEnrFunc, const Node &iNode) const =0
 
virtual void evaluateEnrFuncAt (std::vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const =0
 
virtual void evaluateEnrFuncAt (std::vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl, const FloatArray &iN, const IntArray &iElNodes) const =0
 
virtual void evaluateEnrFuncDerivAt (std::vector< FloatArray > &oEnrFuncDeriv, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const =0
 
virtual void evaluateEnrFuncDerivAt (std::vector< FloatArray > &oEnrFuncDeriv, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl, const FloatArray &iN, const FloatMatrix &idNdX, const IntArray &iElNodes) const =0
 
bool evalLevelSetNormalInNode (double &oLevelSet, int iNodeInd, const FloatArray &iGlobalCoord) const
 
bool evalLevelSetTangInNode (double &oLevelSet, int iNodeInd, const FloatArray &iGlobalCoord) const
 
bool evalNodeEnrMarkerInNode (double &oNodeEnrMarker, int iNodeInd) const
 
virtual void createEnrichedDofs ()
 
virtual bool giveElementTipCoord (FloatArray &oCoord, double &oArcPos, Element &iEl, const FloatArray &iElCenter) const =0
 
PropagationLawgivePropagationLaw ()
 
void setPropagationLaw (PropagationLaw *ipPropagationLaw)
 
bool hasPropagationLaw ()
 
virtual void callGnuplotExportModule (GnuplotExportModule &iExpMod, TimeStep *tStep)
 
const std::unordered_map< int, NodeEnrichmentType > & giveEnrNodeMap () const
 
virtual void giveBoundingSphere (FloatArray &oCenter, double &oRadius)=0
 
EnrichmentFrontgiveEnrichmentFrontStart ()
 
void setEnrichmentFrontStart (EnrichmentFront *ipEnrichmentFrontStart, bool iDeleteOld=true)
 
EnrichmentFrontgiveEnrichmentFrontEnd ()
 
void setEnrichmentFrontEnd (EnrichmentFront *ipEnrichmentFrontEnd, bool iDeleteOld=true)
 
bool tipIsTouchingEI (const TipInfo &iTipInfo)
 
void setEnrichmentFunction (EnrichmentFunction *ipEnrichmentFunc)
 
- 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 * giveInputRecordName () const =0
 
DomaingiveDomain () const
 
virtual void setDomain (Domain *d)
 Sets associated Domain. More...
 
int giveNumber () const
 
void setNumber (int num)
 Sets number of receiver. More...
 
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
 Local renumbering support. 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...
 

Static Public Member Functions

static double calcXiZeroLevel (const double &iQ1, const double &iQ2)
 
static void calcPolarCoord (double &oR, double &oTheta, const FloatArray &iOrigin, const FloatArray &iPos, const FloatArray &iN, const FloatArray &iT, const EfInput &iEfInput, bool iFlipTangent)
 

Protected Member Functions

virtual void evalLevelSetNormal (double &oLevelSet, const FloatArray &iGlobalCoord, const FloatArray &iN, const IntArray &iNodeInd) const =0
 Evaluate the normal direction level set in the point iGlobalCoord. More...
 
virtual void evalLevelSetTangential (double &oLevelSet, const FloatArray &iGlobalCoord, const FloatArray &iN, const IntArray &iNodeInd) const =0
 Evaluate the tangential direction level set in the point iGlobalCoord. More...
 
virtual void evalGradLevelSetNormal (FloatArray &oGradLevelSet, const FloatArray &iGlobalCoord, const FloatMatrix &idNdX, const IntArray &iNodeInd) const =0
 Evaluate the gradient of the normal direction level set in the point iGlobalCoord. More...
 
virtual void updateNodeEnrMarker (XfemManager &ixFemMan)=0
 

Protected Attributes

EnrichmentFunctionmpEnrichmentFunc
 
EnrichmentFrontmpEnrichmentFrontStart
 
EnrichmentFrontmpEnrichmentFrontEnd
 
int mEnrFrontIndex
 mEnrFrontIndex: nonzero if an enrichment front is present, zero otherwise. More...
 
PropagationLawmpPropagationLaw
 
int mPropLawIndex
 mPropLawIndex: nonzero if a propagation law is present, zero otherwise. More...
 
bool mInheritBoundaryConditions
 If newly created enriched dofs should inherit boundary conditions from the node they are introduced in. More...
 
bool mInheritOrderedBoundaryConditions
 
int startOfDofIdPool
 
int endOfDofIdPool
 
IntArray mpEnrichesDofsWithIdArray
 Geometry associated with EnrichmentItem. More...
 
std::unordered_map< int, double > mLevelSetNormalDirMap
 
std::unordered_map< int, double > mLevelSetTangDirMap
 
std::unordered_map< int, NodeEnrichmentTypemNodeEnrMarkerMap
 
IntArray mEIDofIdArray
 
bool mLevelSetsNeedUpdate
 
const double mLevelSetTol2
 
- Protected Attributes inherited from oofem::FEMComponent
int number
 Component number. More...
 
Domaindomain
 Link to domain object, useful for communicating with other FEM components. More...
 

Static Protected Attributes

static const double mLevelSetTol = 1.0e-12
 
static const double mLevelSetRelTol = 1.0e-3
 

Detailed Description

Abstract class representing entity, which is included in the FE model using one (or more) global functions.

Such entity may represent crack, material interface, etc. As the geometry of such entity may be represented in a number of ways, the hierarchy of classes derived from base Geometry class is used to achieve flexibility of geometry representation.

Each EnrichmentItem keeps its DOF labels (assigned/allocated by XFemManager, its geometry representation, and keeps the list of its EnrichmentFunctions.

Author
chamrova
Jim Brouzoulis
Erik Svenning

Definition at line 106 of file enrichmentitem.h.

Constructor & Destructor Documentation

oofem::EnrichmentItem::EnrichmentItem ( int  n,
XfemManager xm,
Domain aDomain 
)

Constructor / destructor.

Definition at line 68 of file enrichmentitem.C.

oofem::EnrichmentItem::~EnrichmentItem ( )
virtual

Member Function Documentation

virtual void oofem::EnrichmentItem::appendInputRecords ( DynamicDataReader oDR)
pure virtual
double oofem::EnrichmentItem::calcXiZeroLevel ( const double &  iQ1,
const double &  iQ2 
)
static
void oofem::EnrichmentItem::callGnuplotExportModule ( GnuplotExportModule iExpMod,
TimeStep tStep 
)
virtual

Reimplemented in oofem::Crack.

Definition at line 476 of file enrichmentitem.C.

Referenced by oofem::GnuplotExportModule::doOutput().

virtual bool oofem::EnrichmentItem::canModifyMaterial ( ) const
inlinevirtual

Reimplemented in oofem::Inclusion.

Definition at line 140 of file enrichmentitem.h.

Referenced by oofem::XfemManager::updateNodeEnrichmentItemMap().

virtual void oofem::EnrichmentItem::evalGradLevelSetNormal ( FloatArray oGradLevelSet,
const FloatArray iGlobalCoord,
const FloatMatrix idNdX,
const IntArray iNodeInd 
) const
protectedpure virtual

Evaluate the gradient of the normal direction level set in the point iGlobalCoord.

To improve performance, basis function values corresponding to that point should also be provided.

Implemented in oofem::Delamination, oofem::HybridEI, and oofem::DirectEI.

Referenced by oofem::GeometryBasedEI::evaluateEnrFuncDerivAt().

virtual void oofem::EnrichmentItem::evalLevelSetNormal ( double &  oLevelSet,
const FloatArray iGlobalCoord,
const FloatArray iN,
const IntArray iNodeInd 
) const
protectedpure virtual

Evaluate the normal direction level set in the point iGlobalCoord.

To improve performance, basis function values corresponding to that point should also be provided.

Implemented in oofem::Delamination, oofem::HybridEI, and oofem::DirectEI.

Referenced by oofem::GeometryBasedEI::evaluateEnrFuncAt(), oofem::GeometryBasedEI::evaluateEnrFuncDerivAt(), oofem::GeometryBasedEI::evaluateEnrFuncJumps(), and tipIsTouchingEI().

virtual void oofem::EnrichmentItem::evalLevelSetTangential ( double &  oLevelSet,
const FloatArray iGlobalCoord,
const FloatArray iN,
const IntArray iNodeInd 
) const
protectedpure virtual

Evaluate the tangential direction level set in the point iGlobalCoord.

To improve performance, basis function values corresponding to that point should also be provided.

Implemented in oofem::Delamination, oofem::HybridEI, and oofem::DirectEI.

Referenced by tipIsTouchingEI().

virtual void oofem::EnrichmentItem::evaluateEnrFuncAt ( std::vector< double > &  oEnrFunc,
const FloatArray iGlobalCoord,
const FloatArray iLocalCoord,
int  iNodeInd,
const Element iEl,
const FloatArray iN,
const IntArray iElNodes 
) const
pure virtual
virtual void oofem::EnrichmentItem::evaluateEnrFuncDerivAt ( std::vector< FloatArray > &  oEnrFuncDeriv,
const FloatArray iGlobalCoord,
const FloatArray iLocalCoord,
int  iNodeInd,
const Element iEl 
) const
pure virtual
virtual void oofem::EnrichmentItem::evaluateEnrFuncDerivAt ( std::vector< FloatArray > &  oEnrFuncDeriv,
const FloatArray iGlobalCoord,
const FloatArray iLocalCoord,
int  iNodeInd,
const Element iEl,
const FloatArray iN,
const FloatMatrix idNdX,
const IntArray iElNodes 
) const
pure virtual
virtual void oofem::EnrichmentItem::evaluateEnrFuncInNode ( std::vector< double > &  oEnrFunc,
const Node iNode 
) const
pure virtual
virtual void oofem::EnrichmentItem::giveBoundingSphere ( FloatArray oCenter,
double &  oRadius 
)
pure virtual
virtual const char* oofem::EnrichmentItem::giveClassName ( ) const
pure virtual
virtual bool oofem::EnrichmentItem::giveElementTipCoord ( FloatArray oCoord,
double &  oArcPos,
Element iEl,
const FloatArray iElCenter 
) const
pure virtual
int oofem::EnrichmentItem::giveEndOfDofIdPool ( ) const
inline

Definition at line 158 of file enrichmentitem.h.

Referenced by createEnrichedDofs(), and givePotentialEIDofIdArray().

const IntArray* oofem::EnrichmentItem::giveEnrichesDofsWithIdArray ( ) const
inline
const std :: unordered_map< int, NodeEnrichmentType >& oofem::EnrichmentItem::giveEnrNodeMap ( ) const
inline

Definition at line 226 of file enrichmentitem.h.

Referenced by oofem::XfemManager::updateNodeEnrichmentItemMap().

virtual void oofem::EnrichmentItem::giveInputRecord ( DynamicInputRecord input)
inlinevirtual

Note the special treatment here, the "normal" syntax would be giveInputRecord(DynamicInputRecord &input).

Passing the entire DataReader instead allows us to have separate InputRecords for the EnrichmentDomain, EnrichmentFront and PropagationLaw without have to keep track of them globally.

Reimplemented from oofem::FEMComponent.

Definition at line 123 of file enrichmentitem.h.

References OOFEM_ERROR.

void oofem::EnrichmentItem::givePotentialEIDofIdArray ( IntArray answer) const
virtual
PropagationLaw* oofem::EnrichmentItem::givePropagationLaw ( )
inline

Definition at line 218 of file enrichmentitem.h.

int oofem::EnrichmentItem::giveStartOfDofIdPool ( ) const
inline
virtual bool oofem::EnrichmentItem::hasInitiationCriteria ( )
inlinevirtual

Reimplemented in oofem::Delamination.

Definition at line 153 of file enrichmentitem.h.

bool oofem::EnrichmentItem::hasPropagatingFronts ( ) const
virtual

Reimplemented in oofem::Delamination.

Definition at line 185 of file enrichmentitem.C.

References oofem::PropagationLaw::hasPropagation(), and mpPropagationLaw.

bool oofem::EnrichmentItem::hasPropagationLaw ( )
inline

Definition at line 220 of file enrichmentitem.h.

IRResultType oofem::EnrichmentItem::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.

Reimplemented in oofem::Delamination, oofem::Inclusion, oofem::ShellCrack, and oofem::Crack.

Definition at line 92 of file enrichmentitem.C.

References _IFT_EnrichmentItem_front, _IFT_EnrichmentItem_inheritbc, _IFT_EnrichmentItem_inheritorderedbc, _IFT_EnrichmentItem_propagationlaw, oofem::InputRecord::hasField(), IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_OK, mEnrFrontIndex, mInheritBoundaryConditions, mInheritOrderedBoundaryConditions, and mPropLawIndex.

Referenced by oofem::Crack::initializeFrom(), oofem::Inclusion::initializeFrom(), and oofem::Delamination::initializeFrom().

virtual int oofem::EnrichmentItem::instanciateYourself ( DataReader dr)
pure virtual
bool oofem::EnrichmentItem::isMaterialModified ( GaussPoint iGP,
Element iEl,
CrossSection *&  opCS 
) const
virtual
virtual void oofem::EnrichmentItem::propagateFronts ( bool &  oFrontsHavePropagated)
pure virtual
void oofem::EnrichmentItem::setEnrichmentFrontEnd ( EnrichmentFront ipEnrichmentFrontEnd,
bool  iDeleteOld = true 
)

Definition at line 490 of file enrichmentitem.C.

References mpEnrichmentFrontEnd.

Referenced by oofem::XfemStructureManager::mergeCloseCracks().

void oofem::EnrichmentItem::setEnrichmentFrontStart ( EnrichmentFront ipEnrichmentFrontStart,
bool  iDeleteOld = true 
)

Definition at line 481 of file enrichmentitem.C.

References mpEnrichmentFrontStart.

Referenced by oofem::XfemStructureManager::mergeCloseCracks().

void oofem::EnrichmentItem::setEnrichmentFunction ( EnrichmentFunction ipEnrichmentFunc)
inline

Definition at line 238 of file enrichmentitem.h.

void oofem::EnrichmentItem::setPropagationLaw ( PropagationLaw ipPropagationLaw)

Definition at line 466 of file enrichmentitem.C.

References mpPropagationLaw, and mPropLawIndex.

virtual void oofem::EnrichmentItem::updateGeometry ( FailureCriteriaStatus fc,
TimeStep tStep 
)
inlinevirtual

Definition at line 147 of file enrichmentitem.h.

Referenced by oofem::FractureManager::updateXFEM().

virtual void oofem::EnrichmentItem::updateGeometry ( TimeStep tStep)
inlinevirtual

Definition at line 148 of file enrichmentitem.h.

virtual void oofem::EnrichmentItem::updateGeometry ( )
pure virtual
virtual void oofem::EnrichmentItem::updateNodeEnrMarker ( XfemManager ixFemMan)
protectedpure virtual
virtual void oofem::EnrichmentItem::writeVtkDebug ( ) const
inlinevirtual

Reimplemented in oofem::GeometryBasedEI.

Definition at line 131 of file enrichmentitem.h.

Member Data Documentation

int oofem::EnrichmentItem::endOfDofIdPool
protected
IntArray oofem::EnrichmentItem::mEIDofIdArray
protected

Definition at line 292 of file enrichmentitem.h.

Referenced by createEnrichedDofs().

int oofem::EnrichmentItem::mEnrFrontIndex
protected
bool oofem::EnrichmentItem::mInheritBoundaryConditions
protected

If newly created enriched dofs should inherit boundary conditions from the node they are introduced in.

Default is false, i.e. XFEM dofs are free by default. Two alternatives exists: mInheritBoundaryConditions takes the first Dirichlet BC it finds in the node. Therefore, we may get in trouble if the node has different Dirichlet BCs for different dofs. mInheritOrderedBoundaryConditions assumes that the enriched dofs are of the same type and in the same order as the original dofs and uses the same BC on the enriched dofs NB: These routines basically only works for zero Dirichlet BC, since enriched dofs often are related to the existing dofs. If nonzero BC are prescibed this will be a problem.

Definition at line 268 of file enrichmentitem.h.

Referenced by oofem::GeometryBasedEI::appendInputRecords(), createEnrichedDofs(), and initializeFrom().

bool oofem::EnrichmentItem::mInheritOrderedBoundaryConditions
protected
std :: unordered_map< int, double > oofem::EnrichmentItem::mLevelSetNormalDirMap
protected
const double oofem::EnrichmentItem::mLevelSetRelTol = 1.0e-3
staticprotected

Definition at line 297 of file enrichmentitem.h.

Referenced by oofem::GeometryBasedEI::computeIntersectionPoints().

bool oofem::EnrichmentItem::mLevelSetsNeedUpdate
protected

Definition at line 294 of file enrichmentitem.h.

Referenced by oofem::GeometryBasedEI::updateLevelSets().

std :: unordered_map< int, double > oofem::EnrichmentItem::mLevelSetTangDirMap
protected
const double oofem::EnrichmentItem::mLevelSetTol = 1.0e-12
staticprotected
const double oofem::EnrichmentItem::mLevelSetTol2
protected

Definition at line 298 of file enrichmentitem.h.

Referenced by oofem::GeometryBasedEI::computeIntersectionPoints().

IntArray oofem::EnrichmentItem::mpEnrichesDofsWithIdArray
protected

Geometry associated with EnrichmentItem.

Definition at line 275 of file enrichmentitem.h.

int oofem::EnrichmentItem::mPropLawIndex
protected
int oofem::EnrichmentItem::startOfDofIdPool
protected

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