OOFEM 3.0
Loading...
Searching...
No Matches
oofem::EnrichmentItem Class Referenceabstract

#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.
virtual ~EnrichmentItem ()
void initializeFrom (InputRecord &ir) override
virtual int instanciateYourself (DataReader &dr)=0
void giveInputRecord (DynamicInputRecord &input) override
virtual void appendInputRecords (DynamicDataReader &oDR)=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)
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 (std::unique_ptr< 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 (std::unique_ptr< EnrichmentFront > ipEnrichmentFrontStart, bool iDeleteOld=true)
EnrichmentFrontgiveEnrichmentFrontEnd ()
void setEnrichmentFrontEnd (std::unique_ptr< EnrichmentFront > ipEnrichmentFrontEnd, bool iDeleteOld=true)
bool tipIsTouchingEI (const TipInfo &iTipInfo)
void setEnrichmentFunction (std::unique_ptr< EnrichmentFunction > ipEnrichmentFunc)
Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
virtual ~FEMComponent ()=default
 Virtual destructor.
virtual const char * giveClassName () const =0
virtual const char * giveInputRecordName () const =0
DomaingiveDomain () const
virtual void setDomain (Domain *d)
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 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 InterfacegiveInterface (InterfaceType t)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

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
virtual void evalLevelSetTangential (double &oLevelSet, const FloatArray &iGlobalCoord, const FloatArray &iN, const IntArray &iNodeInd) const =0
virtual void evalGradLevelSetNormal (FloatArray &oGradLevelSet, const FloatArray &iGlobalCoord, const FloatMatrix &idNdX, const IntArray &iNodeInd) const =0
virtual void updateNodeEnrMarker (XfemManager &ixFemMan)=0

Protected Attributes

std::unique_ptr< EnrichmentFunctionmpEnrichmentFunc
std::unique_ptr< EnrichmentFrontmpEnrichmentFrontStart
std::unique_ptr< EnrichmentFrontmpEnrichmentFrontEnd
int mEnrFrontIndex
 mEnrFrontIndex: nonzero if an enrichment front is present, zero otherwise.
std::unique_ptr< PropagationLawmpPropagationLaw
int mPropLawIndex
 mPropLawIndex: nonzero if a propagation law is present, zero otherwise.
bool mInheritBoundaryConditions
bool mInheritOrderedBoundaryConditions
int startOfDofIdPool
int endOfDofIdPool
IntArray mpEnrichesDofsWithIdArray
 Geometry associated with EnrichmentItem.
std ::unordered_map< int, double > mLevelSetNormalDirMap
std ::unordered_map< int, double > mLevelSetTangDirMap
std ::unordered_map< int, NodeEnrichmentTypemNodeEnrMarkerMap
IntArray mEIDofIdArray
bool mLevelSetsNeedUpdate
const double mLevelSetTol2
std::shared_ptr< InputRecordthisIr
Protected Attributes inherited from oofem::FEMComponent
int number
 Component number.
Domaindomain
 Link to domain object, useful for communicating with other FEM components.

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 107 of file enrichmentitem.h.

Constructor & Destructor Documentation

◆ EnrichmentItem()

◆ ~EnrichmentItem()

oofem::EnrichmentItem::~EnrichmentItem ( )
virtual

Definition at line 80 of file enrichmentitem.C.

Member Function Documentation

◆ appendInputRecords()

virtual void oofem::EnrichmentItem::appendInputRecords ( DynamicDataReader & oDR)
pure virtual

◆ calcPolarCoord()

void oofem::EnrichmentItem::calcPolarCoord ( double & oR,
double & oTheta,
const FloatArray & iOrigin,
const FloatArray & iPos,
const FloatArray & iN,
const FloatArray & iT,
const EfInput & iEfInput,
bool iFlipTangent )
static

◆ calcXiZeroLevel()

double oofem::EnrichmentItem::calcXiZeroLevel ( const double & iQ1,
const double & iQ2 )
static

◆ callGnuplotExportModule()

void oofem::EnrichmentItem::callGnuplotExportModule ( GnuplotExportModule & iExpMod,
TimeStep * tStep )
virtual

Reimplemented in oofem::Crack.

Definition at line 457 of file enrichmentitem.C.

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

◆ canModifyMaterial()

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

Reimplemented in oofem::Inclusion.

Definition at line 142 of file enrichmentitem.h.

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

◆ computeEnrichedDofManDofIdArray()

◆ createEnrichedDofs()

◆ evalGradLevelSetNormal()

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::DirectEI, and oofem::HybridEI.

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

◆ evalLevelSetNormal()

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::DirectEI, and oofem::HybridEI.

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

◆ evalLevelSetNormalInNode()

◆ evalLevelSetTangential()

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::DirectEI, and oofem::HybridEI.

Referenced by tipIsTouchingEI().

◆ evalLevelSetTangInNode()

◆ evalNodeEnrMarkerInNode()

◆ evaluateEnrFuncAt() [1/2]

◆ evaluateEnrFuncAt() [2/2]

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

◆ evaluateEnrFuncDerivAt() [1/2]

virtual void oofem::EnrichmentItem::evaluateEnrFuncDerivAt ( std ::vector< FloatArray > & oEnrFuncDeriv,
const FloatArray & iGlobalCoord,
const FloatArray & iLocalCoord,
int iNodeInd,
const Element & iEl ) const
pure virtual

◆ evaluateEnrFuncDerivAt() [2/2]

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

◆ evaluateEnrFuncInNode()

virtual void oofem::EnrichmentItem::evaluateEnrFuncInNode ( std ::vector< double > & oEnrFunc,
const Node & iNode ) const
pure virtual

◆ giveBoundingSphere()

virtual void oofem::EnrichmentItem::giveBoundingSphere ( FloatArray & oCenter,
double & oRadius )
pure virtual

◆ giveDofPoolSize()

int oofem::EnrichmentItem::giveDofPoolSize ( ) const
virtual

◆ giveEIDofIdArray()

◆ giveElementTipCoord()

virtual bool oofem::EnrichmentItem::giveElementTipCoord ( FloatArray & oCoord,
double & oArcPos,
Element & iEl,
const FloatArray & iElCenter ) const
pure virtual

◆ giveEndOfDofIdPool()

int oofem::EnrichmentItem::giveEndOfDofIdPool ( ) const
inline

Definition at line 159 of file enrichmentitem.h.

References endOfDofIdPool.

Referenced by createEnrichedDofs(), and givePotentialEIDofIdArray().

◆ giveEnrichesDofsWithIdArray()

const IntArray * oofem::EnrichmentItem::giveEnrichesDofsWithIdArray ( ) const
inline

◆ giveEnrichmentFrontEnd()

◆ giveEnrichmentFrontStart()

◆ giveEnrNodeMap()

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

Definition at line 227 of file enrichmentitem.h.

References mNodeEnrMarkerMap.

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

◆ giveInputRecord()

void oofem::EnrichmentItem::giveInputRecord ( DynamicInputRecord & input)
inlineoverridevirtual

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 126 of file enrichmentitem.h.

References OOFEM_ERROR.

◆ giveNumberOfEnrDofs()

int oofem::EnrichmentItem::giveNumberOfEnrDofs ( ) const

◆ giveNumDofManEnrichments()

◆ givePotentialEIDofIdArray()

void oofem::EnrichmentItem::givePotentialEIDofIdArray ( IntArray & answer) const
virtual

◆ givePropagationLaw()

PropagationLaw * oofem::EnrichmentItem::givePropagationLaw ( )
inline

Definition at line 219 of file enrichmentitem.h.

References mpPropagationLaw.

◆ giveStartOfDofIdPool()

int oofem::EnrichmentItem::giveStartOfDofIdPool ( ) const
inline

◆ hasInitiationCriteria()

virtual bool oofem::EnrichmentItem::hasInitiationCriteria ( )
inlinevirtual

Reimplemented in oofem::Delamination.

Definition at line 155 of file enrichmentitem.h.

◆ hasPropagatingFronts()

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

Reimplemented in oofem::Delamination.

Definition at line 170 of file enrichmentitem.C.

References mpPropagationLaw.

Referenced by propagateFronts().

◆ hasPropagationLaw()

bool oofem::EnrichmentItem::hasPropagationLaw ( )
inline

Definition at line 221 of file enrichmentitem.h.

References mPropLawIndex.

◆ initializeFrom()

void oofem::EnrichmentItem::initializeFrom ( InputRecord & ir)
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.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
priorityPriority of the input record. This is used to determine the order of initialization

Reimplemented from oofem::FEMComponent.

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

Definition at line 84 of file enrichmentitem.C.

References _IFT_EnrichmentItem_front, _IFT_EnrichmentItem_inheritbc, _IFT_EnrichmentItem_inheritorderedbc, _IFT_EnrichmentItem_propagationlaw, oofem::InputRecord::clone(), oofem::InputRecord::giveGroupCount(), oofem::InputRecord::hasChild(), oofem::InputRecord::hasField(), mEnrFrontIndex, mInheritBoundaryConditions, mInheritOrderedBoundaryConditions, mPropLawIndex, and thisIr.

◆ instanciateYourself()

virtual int oofem::EnrichmentItem::instanciateYourself ( DataReader & dr)
pure virtual

◆ isDofManEnriched()

◆ isElementEnriched()

◆ isMaterialModified()

bool oofem::EnrichmentItem::isMaterialModified ( GaussPoint & iGP,
Element & iEl,
CrossSection *& opCS ) const
virtual

◆ propagateFronts()

virtual void oofem::EnrichmentItem::propagateFronts ( bool & oFrontsHavePropagated)
pure virtual

◆ setEnrichmentFrontEnd()

void oofem::EnrichmentItem::setEnrichmentFrontEnd ( std::unique_ptr< EnrichmentFront > ipEnrichmentFrontEnd,
bool iDeleteOld = true )
Note
This is bad bad code

Definition at line 471 of file enrichmentitem.C.

References mpEnrichmentFrontEnd.

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

◆ setEnrichmentFrontStart()

void oofem::EnrichmentItem::setEnrichmentFrontStart ( std::unique_ptr< EnrichmentFront > ipEnrichmentFrontStart,
bool iDeleteOld = true )
Note
This is bad bad code

Definition at line 462 of file enrichmentitem.C.

References mpEnrichmentFrontStart.

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

◆ setEnrichmentFunction()

void oofem::EnrichmentItem::setEnrichmentFunction ( std::unique_ptr< EnrichmentFunction > ipEnrichmentFunc)
inline

Definition at line 239 of file enrichmentitem.h.

References mpEnrichmentFunc.

◆ setPropagationLaw()

void oofem::EnrichmentItem::setPropagationLaw ( std::unique_ptr< PropagationLaw > ipPropagationLaw)

Definition at line 451 of file enrichmentitem.C.

References mpPropagationLaw, and mPropLawIndex.

◆ tipIsTouchingEI()

◆ updateGeometry() [1/3]

virtual void oofem::EnrichmentItem::updateGeometry ( )
pure virtual

◆ updateGeometry() [2/3]

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

Definition at line 149 of file enrichmentitem.h.

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

◆ updateGeometry() [3/3]

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

Definition at line 150 of file enrichmentitem.h.

◆ updateNodeEnrMarker()

virtual void oofem::EnrichmentItem::updateNodeEnrMarker ( XfemManager & ixFemMan)
protectedpure virtual

◆ writeVtkDebug()

virtual void oofem::EnrichmentItem::writeVtkDebug ( ) const
inlinevirtual

Reimplemented in oofem::GeometryBasedEI.

Definition at line 133 of file enrichmentitem.h.

Member Data Documentation

◆ endOfDofIdPool

◆ mEIDofIdArray

IntArray oofem::EnrichmentItem::mEIDofIdArray
protected

Definition at line 293 of file enrichmentitem.h.

Referenced by createEnrichedDofs().

◆ mEnrFrontIndex

int oofem::EnrichmentItem::mEnrFrontIndex
protected

◆ mInheritBoundaryConditions

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 269 of file enrichmentitem.h.

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

◆ mInheritOrderedBoundaryConditions

bool oofem::EnrichmentItem::mInheritOrderedBoundaryConditions
protected

◆ mLevelSetNormalDirMap

std :: unordered_map< int, double > oofem::EnrichmentItem::mLevelSetNormalDirMap
protected

◆ mLevelSetRelTol

const double oofem::EnrichmentItem::mLevelSetRelTol = 1.0e-3
staticprotected

Definition at line 298 of file enrichmentitem.h.

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

◆ mLevelSetsNeedUpdate

bool oofem::EnrichmentItem::mLevelSetsNeedUpdate
protected

Definition at line 295 of file enrichmentitem.h.

Referenced by EnrichmentItem(), and oofem::GeometryBasedEI::updateLevelSets().

◆ mLevelSetTangDirMap

std :: unordered_map< int, double > oofem::EnrichmentItem::mLevelSetTangDirMap
protected

◆ mLevelSetTol

const double oofem::EnrichmentItem::mLevelSetTol = 1.0e-12
staticprotected

◆ mLevelSetTol2

const double oofem::EnrichmentItem::mLevelSetTol2
protected

◆ mNodeEnrMarkerMap

◆ mpEnrichesDofsWithIdArray

IntArray oofem::EnrichmentItem::mpEnrichesDofsWithIdArray
protected

Geometry associated with EnrichmentItem.

Definition at line 276 of file enrichmentitem.h.

Referenced by EnrichmentItem(), and giveEnrichesDofsWithIdArray().

◆ mpEnrichmentFrontEnd

◆ mpEnrichmentFrontStart

◆ mpEnrichmentFunc

◆ mpPropagationLaw

◆ mPropLawIndex

int oofem::EnrichmentItem::mPropLawIndex
protected

◆ startOfDofIdPool

◆ thisIr

std::shared_ptr<InputRecord> oofem::EnrichmentItem::thisIr
protected

The documentation for this class was generated from the following files:

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011