40 #include "../sm/CrossSections/layeredcrosssection.h" 59 mpEnrichesDofsWithIdArray = {
60 D_u, D_v, D_w, W_u, W_v, W_w
62 this->interfaceNum.clear();
63 this->crossSectionNum.clear();
65 this->xiBottom = -1.0;
67 this->initiationFactor = 1e6;
68 this->initiationRadius = 0.0;
69 this->recoverStresses =
true;
89 OOFEM_ERROR(
"failed to create enrichment function (%s)", name.c_str() );
97 mir->report_error(this->
giveClassName(), __func__,
"", result, __FILE__, __LINE__);
102 for (
int i = 1; i <= idList.
giveSize(); i++ ) {
114 std :: string enrFrontNameStart, enrFrontNameEnd;
124 OOFEM_ERROR(
"Failed to create enrichment front (%s)", enrFrontNameStart.c_str() );
135 OOFEM_ERROR(
"Failed to create enrichment front (%s)", enrFrontNameEnd.c_str() );
144 std :: string propLawName;
153 OOFEM_ERROR(
"Failed to create propagation law (%s)", propLawName.c_str() );
177 OOFEM_ERROR(
"UpdateGeometry in Delamination not used" );
180 if ( fc->
hasFailed( this->giveNumber() ) ) {
193 if ( dof->hasBc(tStep) ) {
205 for (
int i = 1; i <= dofManNumbers.
giveSize(); i++ ) {
207 std :: vector< int > :: iterator p;
233 oFrontsHavePropagated =
false;
254 bool printed =
false;
255 for (
int inode : propNodes ) {
257 std :: vector< int > :: iterator p;
261 printf(
"\n Enrichment %i - The following nodes will be expanded to:",this->
giveNumber());
264 printf(
" %i", inode );
272 oFrontsHavePropagated =
true;
292 for (
int iCS = 1 ; iCS <= CSnumbers.
giveSize() ; iCS++ ) {
298 for (
auto eltNumber : elementNumbers ) {
301 if (
Shell7BaseXFEM *shellElt = dynamic_cast < Shell7BaseXFEM * > (elt) ) {
304 shellElt->giveFailedInterfaceNumber(failedElementInterfaces, initiationFactors[iCS-1], tStep, this->
recoverStresses);
306 for (
int eltInt : failedElementInterfaces ) {
307 CSinterfaceNumbers[iCS-1].insertSortedOnce(eltInt);
309 if ( !failedElementInterfaces.isEmpty() ) {
310 for (
int iDF : shellElt->giveDofManArray() ) {
314 std :: list< int > nodeList;
317 for (
int jNode : nodeList ) {
319 CSDofManNumbers[iCS-1].insertSortedOnce(jNode);
322 CSDofManNumbers[iCS-1].insertSortedOnce(iDF);
330 failureChecked =
true;
336 if ( iLocalCoord.
giveSize() != 3 ) {
342 oEnrFunc.resize(1, 0.0);
358 if ( result !=
IRRT_OK )
return result;
370 bool checkCS =
false;
371 double totalThickness(0.0);
373 int numberOfLayers(0);
376 if ( layeredCS == NULL ) {
380 OOFEM_WARNING(
"Size of record 'interfacenum' must be 1 or 2");
407 for (
int i = 1 ; i <= numberOfLayers ; i++) {
410 if ( layerThickness != layerThicknesses.
at(i) ) {
414 layerThicknesses.
at(i) = layerThickness;
430 OOFEM_WARNING(
"second intercfacenum must be greater than the first one");
445 if ( layeredCS == NULL ) {
449 OOFEM_WARNING(
"Size of record 'interfacenum' must be 1 or 2");
472 OOFEM_WARNING(
"second intercfacenum must be greater than the first one");
491 OOFEM_ERROR(
"initiation scale factor must be greater than 0.");
497 OOFEM_ERROR(
"initiation radius must be greater or equal than 0.");
543 for (
size_t i = 0; i <
dofManList.size(); i++ ) {
578 oEnrFunc.resize(1, 0.0);
The base class for all spatial localizers.
virtual int giveDofPoolSize() const
#define _IFT_EnrichmentItem_front
double giveDelamXiCoord() const
virtual IRResultType initializeFrom(InputRecord *ir)=0
IntArray giveDelamCrossSectionNum() const
Class representing the implementation of a dynamic data reader for in-code use.
virtual void updateGeometry()
virtual void appendInputRecords(DynamicDataReader &oDR)
int giveSetNumber() const
virtual const char * giveClassName() const
virtual void evaluateEnrFuncAt(std::vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const
double & at(int i)
Coefficient access function.
#define _IFT_ListBasedEI_list
int mPropLawIndex
mPropLawIndex: nonzero if a propagation law is present, zero otherwise.
IntArray mPropagationDofManNumbers
Abstract base class for all finite elements.
#define _IFT_Delamination_CohesiveZoneMaterial
virtual void updateNodeEnrMarker(XfemManager &ixFemMan)
Class representing the abstraction for input data source.
#define _IFT_Delamination_initiationFactor
EnrichmentFunction * createEnrichmentFunction(const char *name, int num, Domain *domain)
Dummy propagation law that does nothing.
virtual int instanciateYourself(DataReader &dr)
EnrichmentFront * createEnrichmentFront(const char *name)
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
XfemManager * giveXfemManager()
void sort(IntArray &arry, operation op)
Sorts the receiver using quicksort algorithm.
virtual int giveNumberOfDofManagers() const
This class implements a layered cross section in a finite element problem.
REGISTER_EnrichmentItem(HybridEI)
CrossSection * giveCrossSection(int n)
Service for accessing particular domain cross section model.
#define _IFT_Delamination_initiationRadius
const IntArray & giveDofManArray() const
virtual void giveAllNodesWithinBox(nodeContainerType &nodeList, const FloatArray &coords, const double radius)=0
Returns container (list) of all domain nodes within given box.
Material * giveMaterial(int n)
Service for accessing particular domain material model.
Element * giveElement(int n)
Service for accessing particular domain fe element.
double giveLayerThickness(int layer)
virtual bool hasInitiationCriteria()
#define _IFT_EnrichmentItem_propagationlaw
#define _IFT_Delamination_averageStresses
virtual bool propagateInterface(Domain &iDomain, EnrichmentFront &iEnrFront, TipPropagation &oTipProp)=0
Set of elements, boundaries, edges and/or nodes.
SpatialLocalizer * giveSpatialLocalizer()
Returns receiver's associated spatial localizer.
Set * giveSet(int n)
Service for accessing particular domain set.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void resize(int n)
Checks size of receiver towards requested bounds.
virtual void giveInputRecord(DynamicInputRecord &input)=0
virtual InputRecord * giveInputRecord(InputRecordType irType, int recordId)=0
Returns input record corresponding to given InputRecordType value and its record_id.
virtual void evaluateEnrFuncAt(double &oEnrFunc, const FloatArray &iPos, const double &iLevelSet) const =0
std::vector< int > dofManList
virtual IRResultType initializeFrom(InputRecord *ir)=0
Element * giveGlobalElement(int n)
Service for accessing particular domain fe element.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
int giveNextFreeDofID(int increment=1)
Gives the next free dof ID.
Class representing vector of real numbers.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
PropagationLaw * mpPropagationLaw
This class manages the xfem part.
IRResultType
Type defining the return values of InputRecord reading operations.
#define _IFT_Delamination_interfacenum
EnrichmentFront * mpEnrichmentFrontStart
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
const FloatArray & giveNodeCoordinates() const
As giveCoordinates, but non-virtual and therefore faster (because it can be inlined).
EnrichmentFunction * mpEnrichmentFunc
EnrichmentItem with geometry defined by a set of nodes to be enriched.
void append(const FloatArray &a)
Appends array to reciever.
void followedBy(const IntArray &b, int allocChunk=0)
Appends array b at the end of receiver.
virtual void propagateFronts(bool &oFrontsHavePropagated)
EnrichmentFront * mpEnrichmentFrontEnd
int mEnrFrontIndex
mEnrFrontIndex: nonzero if an enrichment front is present, zero otherwise.
ClassFactory & classFactory
virtual void findInitiationFronts(bool &failureChecked, const IntArray &CSnumbers, std::vector< IntArray > &CSinterfaceNumbers, std::vector< IntArray > &CSDofManNumbers, std::vector< FloatArray > &initiationFactors, TimeStep *tStep)
Domain * giveDomain() const
virtual void giveInputRecord(DynamicInputRecord &input)=0
int giveSize() const
Returns the size of receiver.
PropagationLaw * createPropagationLaw(const char *name)
Node * giveNode(int n)
Service for accessing particular domain node.
the oofem namespace is to define a context or scope in which all oofem names are defined.
DofManager * giveDofManager(int i) const
Abstract class Dof represents Degree Of Freedom in finite element mesh.
int findCommonValuesSorted(const IntArray &iarray, IntArray &common, int allocChunk=0) const
Extracts common values in receiver and iarray.
#define OOFEM_WARNING(...)
void insertInputRecord(InputRecordType type, InputRecord *record)
Main purpose of this class it the possibility to add new input records in code.
#define _IFT_Delamination_csnum
Class representing solution step.
virtual const char * giveInputRecordName() const
const IntArray & giveElementList()
Returns list of elements within set.
virtual void evalLevelSetNormal(double &oLevelSet, const FloatArray &iGlobalCoord, const FloatArray &iN, const IntArray &iNodeInd) const
Evaluate the normal direction level set in the point iGlobalCoord.