OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
delamination.C
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #include "delamination.h"
36 #include "classfactory.h"
37 #include "fracturemanager.h"
38 #include "element.h"
39 #include "dof.h"
40 #include "../sm/CrossSections/layeredcrosssection.h"
41 #include "dynamicinputrecord.h"
42 #include "dynamicdatareader.h"
44 #include "xfem/propagationlaw.h"
45 #include "xfem/xfemmanager.h"
48 #include "spatiallocalizer.h"
49 
50 namespace oofem {
52 
53 //------------------
54 // DELAMINATION
55 //------------------
56 
57 Delamination :: Delamination(int n, XfemManager *xm, Domain *aDomain) : ListBasedEI(n, xm, aDomain)
58 {
59  mpEnrichesDofsWithIdArray = {
60  D_u, D_v, D_w, W_u, W_v, W_w
61  };
62  this->interfaceNum.clear();
63  this->crossSectionNum.clear();
64  this->matNum = 0;
65  this->xiBottom = -1.0;
66  this->xiTop = -1.0;
67  this->initiationFactor = 1e6; // a high number
68  this->initiationRadius = 0.0;
69  this->recoverStresses = true; // default is to recover transverse stresses
70 }
71 
73 {
74  IRResultType result; // Required by IR_GIVE_FIELD macro
75  std :: string name;
76 
77  // Instantiate enrichment function
79  result = mir->giveRecordKeywordField(name);
80 
81  if ( result != IRRT_OK ) {
82  mir->report_error(this->giveClassName(), __func__, "", result, __FILE__, __LINE__);
83  }
84 
86  if ( mpEnrichmentFunc != NULL ) {
88  } else {
89  OOFEM_ERROR( "failed to create enrichment function (%s)", name.c_str() );
90  }
91 
92 
93  // Instantiate enrichment domain
95  result = mir->giveRecordKeywordField(name);
96  if ( result != IRRT_OK ) {
97  mir->report_error(this->giveClassName(), __func__, "", result, __FILE__, __LINE__);
98  }
99 
100  IntArray idList;
101  IR_GIVE_FIELD(mir, idList, _IFT_ListBasedEI_list);
102  for ( int i = 1; i <= idList.giveSize(); i++ ) {
103  this->dofManList.push_back( idList.at(i) );
104  }
105 
106  std :: sort( dofManList.begin(), this->dofManList.end() );
107  //IR_GIVE_FIELD(ir, this->xi, _IFT_DofManList_DelaminationLevel);
108 
109  // Instantiate EnrichmentFront
110  if ( mEnrFrontIndex == 0 ) {
113  } else {
114  std :: string enrFrontNameStart, enrFrontNameEnd;
115 
117  result = enrFrontStartIr->giveRecordKeywordField(enrFrontNameStart);
118 
119  mpEnrichmentFrontStart = classFactory.createEnrichmentFront( enrFrontNameStart.c_str() );
120  if ( mpEnrichmentFrontStart != NULL ) {
121  mpEnrichmentFrontStart->initializeFrom(enrFrontStartIr);
122  //printf("EnrichmentFrontStart : %s \n", mpEnrichmentFrontStart->giveClassName());
123  } else {
124  OOFEM_ERROR( "Failed to create enrichment front (%s)", enrFrontNameStart.c_str() );
125  }
126 
128  result = enrFrontEndIr->giveRecordKeywordField(enrFrontNameEnd);
129 
130  mpEnrichmentFrontEnd = classFactory.createEnrichmentFront( enrFrontNameEnd.c_str() );
131  if ( mpEnrichmentFrontEnd != NULL ) {
132  mpEnrichmentFrontEnd->initializeFrom(enrFrontEndIr);
133  //printf("EnrichmentFrontEnd : %s \n", mpEnrichmentFrontEnd->giveClassName());
134  } else {
135  OOFEM_ERROR( "Failed to create enrichment front (%s)", enrFrontNameEnd.c_str() );
136  }
137  }
138 
139 
140  // Instantiate PropagationLaw
141  if ( mPropLawIndex == 0 ) {
143  } else {
144  std :: string propLawName;
145 
147  result = propLawir->giveRecordKeywordField(propLawName);
148 
149  mpPropagationLaw = classFactory.createPropagationLaw( propLawName.c_str() );
150  if ( mpPropagationLaw != NULL ) {
151  mpPropagationLaw->initializeFrom(propLawir);
152  } else {
153  OOFEM_ERROR( "Failed to create propagation law (%s)", propLawName.c_str() );
154  }
155  }
156 
157  // Set start of the enrichment dof pool for the given EI
158  int xDofPoolAllocSize = this->giveDofPoolSize();
159  this->startOfDofIdPool = this->giveDomain()->giveNextFreeDofID(xDofPoolAllocSize);
160  this->endOfDofIdPool = this->startOfDofIdPool + xDofPoolAllocSize - 1;
161 
162 
163  XfemManager *xMan = this->giveDomain()->giveXfemManager();
164  // mpEnrichmentDomain->CallNodeEnrMarkerUpdate(* this, * xMan);
165  this->updateNodeEnrMarker(* xMan);
166 
167 
168  //writeVtkDebug();
169 
170  return 1;
171 }
172 
173 #if 0
174 void
176 {
177  OOFEM_ERROR( "UpdateGeometry in Delamination not used" );
178  return;
179 
180  if ( fc->hasFailed( this->giveNumber() ) ) { // interface has failed
181  //printf( "...fails in interface %d \n", this->giveNumber() );
182  IntArray dofManNumbers, elDofMans;
183  Element *el = fc->el;
184  elDofMans = el->giveDofManArray();
185 
186  for ( int i = 1; i <= el->giveNumberOfDofManagers(); i++ ) {
187  // ugly piece of code that will skip enrichment of dofmans that have any bc's
188  // which is not generally what you want
189 
190 #if 1
191  bool hasBc = false;
192  for ( Dof *dof: *el->giveDofManager(i) ) {
193  if ( dof->hasBc(tStep) ) {
194  hasBc = true;
195  continue;
196  }
197  }
198 
199 #endif
200  if ( !hasBc ) {
201  dofManNumbers.followedBy( elDofMans.at(i) );
202  }
203  }
204 
205  for ( int i = 1; i <= dofManNumbers.giveSize(); i++ ) {
206  //std::list< int > :: iterator p;
207  std :: vector< int > :: iterator p;
208  p = std :: find( this->dofManList.begin(), this->dofManList.end(), dofManNumbers.at(i) );
209  if ( p == this->dofManList.end() ) { // if new node
210  this->dofManList.push_back( dofManNumbers.at(i) );
211  }
212  }
213 
214  std :: sort( dofManList.begin(), this->dofManList.end() );
215  }
216 }
217 #endif
218 
219 bool
221 {
222  if (this->initiationFactor < 1e6 ) { // less than default
223  return true;
224  }
225 
226  return false;
227 }
228 
229 
230 void
231 Delamination :: propagateFronts(bool &oFrontsHavePropagated)
232 {
233  oFrontsHavePropagated = false;
234 
235  Domain *d = this->giveDomain();
236  TipPropagation tipProp;
238  // Propagate front
239 
240  // Check if nodes are viable for enrichment
242  IntArray delamNodes, propNodes;
243  for (int CSnum : this->giveDelamCrossSectionNum()) {
244  Set *elSet = d->giveSet(d->giveCrossSection(CSnum)->giveSetNumber());
245  for (int elID : elSet->giveElementList() ) {
246  delamNodes.followedBy(d->giveElement(elID)->giveDofManArray());
247  }
248  }
249  delamNodes.sort();
250 
251  delamNodes.findCommonValuesSorted(tipProp.mPropagationDofManNumbers, propNodes);
252  //propNodes.printYourself("propNodes");
253 
254  bool printed = false;
255  for ( int inode : propNodes ) {
256  //std::list< int > :: iterator p;
257  std :: vector< int > :: iterator p;
258  p = std :: find( this->dofManList.begin(), this->dofManList.end(), inode );
259  if ( p == this->dofManList.end() ) { // if new node
260  if ( !printed ) {
261  printf("\n Enrichment %i - The following nodes will be expanded to:",this->giveNumber());
262  printed = true;
263  }
264  printf(" %i", inode );
265  this->dofManList.push_back( inode );
266  }
267  }
268  printf(" \n");
269 
270  std :: sort( dofManList.begin(), this->dofManList.end() );
271 
272  oFrontsHavePropagated = true;
273  }
274 
275  this->updateGeometry();
276 
277 }
278 
279 void
280 Delamination :: findInitiationFronts(bool &failureChecked, const IntArray &CSnumbers, std :: vector< IntArray > &CSinterfaceNumbers, std :: vector< IntArray > &CSDofManNumbers, std :: vector< FloatArray > &initiationFactors, TimeStep *tStep)
281 {
282  // Loop through all cross sections associated with delaminations
283  // Returns
284  // CSinterfaceNumbers: the failed interface number associated with the cross sections.
285  // CSDofManNumbers: the dofmanagers that should be enriched (associated with the cross sections)
286  IntArray failedElementInterfaces;
287  IntArray elementNumbers;
288  SpatialLocalizer *localizer = this->giveDomain()->giveSpatialLocalizer();
289 
290  // NB: Assumes that elements can only be included in one cross section.
291 
292  for ( int iCS = 1 ; iCS <= CSnumbers.giveSize() ; iCS++ ) {
293 
294  int eltSetNumber = this->giveDomain()->giveCrossSection(CSnumbers.at(iCS))->giveSetNumber();
295  //printf("Cross section No. %i, set No. %i \n",CSnumbers.at(iCS),eltSetNumber);
296  IntArray elementNumbers = this->giveDomain()->giveSet(eltSetNumber)->giveElementList();
297 
298  for ( auto eltNumber : elementNumbers ) {
299  Element *elt = this->giveDomain()->giveGlobalElement(eltNumber);
300 
301  if ( Shell7BaseXFEM *shellElt = dynamic_cast < Shell7BaseXFEM * > (elt) ) {
302 
303  //bool recoverStresses = true;
304  shellElt->giveFailedInterfaceNumber(failedElementInterfaces, initiationFactors[iCS-1], tStep, this->recoverStresses);
305  //failedElementInterfaces.printYourself("failedElementInterfaces");
306  for (int eltInt : failedElementInterfaces ) {
307  CSinterfaceNumbers[iCS-1].insertSortedOnce(eltInt);
308  }
309  if ( !failedElementInterfaces.isEmpty() ) {
310  for (int iDF : shellElt->giveDofManArray() ) {
311  //printf("element node %d \n",iDF);
312  if ( this->initiationRadius > 0.0 ) {
313  const FloatArray gCoords = this->giveDomain()->giveNode(iDF)->giveNodeCoordinates();
314  std :: list< int > nodeList;
315  localizer->giveAllNodesWithinBox(nodeList,gCoords,initiationRadius);
316 
317  for ( int jNode : nodeList ) {
318  //printf("nodeList node %d \n",jNode);
319  CSDofManNumbers[iCS-1].insertSortedOnce(jNode);
320  }
321  } else {
322  CSDofManNumbers[iCS-1].insertSortedOnce(iDF);
323  }
324  }
325  }
326  }
327  }
328  }
329 
330  failureChecked = true;
331 }
332 
333 
334 void Delamination :: evaluateEnrFuncAt(std :: vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const
335 {
336  if ( iLocalCoord.giveSize() != 3 ) {
337  OOFEM_ERROR("iLocalCoord.giveSize() != 3")
338  }
339 
340  double levelSet = iLocalCoord.at(3) - giveDelamXiCoord();
341 
342  oEnrFunc.resize(1, 0.0);
343  mpEnrichmentFunc->evaluateEnrFuncAt(oEnrFunc [ 0 ], iGlobalCoord, levelSet);
344 }
345 
346 
347 void Delamination :: evaluateEnrFuncAt(std :: vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl, const FloatArray &iN, const IntArray &iElNodes) const
348 {
349  evaluateEnrFuncAt(oEnrFunc, iGlobalCoord, iLocalCoord, iNodeInd, iEl);
350 }
351 
352 
354 {
355  IRResultType result; // Required by IR_GIVE_FIELD macro
356 
358  if ( result != IRRT_OK ) return result;
359 
360  // Compute the delamination xi-coord
361  IR_GIVE_FIELD(ir, this->interfaceNum, _IFT_Delamination_interfacenum); // interface number from the bottom
364  this->recoverStresses = false;
365  //printf("averageStresses");
366  }
367 
368 #if 1
369  // update: csnum is now an IntArray of cross sections viable for delamination
370  bool checkCS = false;
371  double totalThickness(0.0);
372  FloatArray layerThicknesses;
373  int numberOfLayers(0);
374  for (int iCS : this->crossSectionNum) {
375  LayeredCrossSection *layeredCS = dynamic_cast< LayeredCrossSection * >( this->giveDomain()->giveCrossSection(iCS) );
376  if ( layeredCS == NULL ) {
377  OOFEM_WARNING("Delamination EI requires a valid layered cross section number input: see record '%s'.", _IFT_Delamination_csnum);
378  return IRRT_BAD_FORMAT;
379  } else if ( this->interfaceNum.giveSize() < 1 || this->interfaceNum.giveSize() > 2 ) {
380  OOFEM_WARNING("Size of record 'interfacenum' must be 1 or 2");
381  return IRRT_BAD_FORMAT;
382  }
383 
384  // check that interface numbers are valid
385  //interfaceNum.printYourself("interface num");
386  for ( int i = 1; i <= this->interfaceNum.giveSize(); i++ ) {
387  if ( this->interfaceNum.at(i) < 1 || this->interfaceNum.at(i) >= layeredCS->giveNumberOfLayers() ) {
388  OOFEM_WARNING( "Cross section does not contain the interface number (%d) specified in the record '%s' since number of layers is %d.", this->interfaceNum.at(i), _IFT_Delamination_interfacenum, layeredCS->giveNumberOfLayers() );
389  return IRRT_BAD_FORMAT;
390  }
391  }
392 
393 
394  if (checkCS) {
395  if ( layeredCS->give(CS_Thickness, FloatArray(), NULL, false) != totalThickness ) {
396  OOFEM_WARNING("Delamination cross section have different totalThickness: see record '%s'.", _IFT_Delamination_csnum);
397  return IRRT_BAD_FORMAT;
398  }
399  if ( layeredCS->giveNumberOfLayers() != numberOfLayers ) {
400  OOFEM_WARNING("Delamination cross section have different number of layers: see record '%s'.", _IFT_Delamination_csnum);
401  return IRRT_BAD_FORMAT;
402  }
403 
404  } else
405  numberOfLayers = layeredCS->giveNumberOfLayers();
406  totalThickness = layeredCS->give(CS_Thickness, FloatArray(), NULL, false); // no position available
407  for ( int i = 1 ; i <= numberOfLayers ; i++) {
408  double layerThickness = layeredCS->giveLayerThickness(i);
409  if (checkCS) {
410  if ( layerThickness != layerThicknesses.at(i) ) {
411  OOFEM_WARNING("Delamination cross section have different layer thicknesses: see record '%s'.", _IFT_Delamination_csnum);
412  return IRRT_BAD_FORMAT;
413  }
414  layerThicknesses.at(i) = layerThickness;
415  } else {
416  layerThicknesses.append(layeredCS->giveLayerThickness(i));
417  }
418  }
419 
420  // compute xi-coord of the delamination
421  this->delamXiCoord = -1.0;
422  this->xiBottom = -1.0;
423  for ( int i = 1; i <= this->interfaceNum.at(1); i++ ) {
424  this->delamXiCoord += layeredCS->giveLayerThickness(i) / totalThickness * 2.0;
425  this->xiBottom += layeredCS->giveLayerThickness(i) / totalThickness * 2.0;
426  }
427 
428  if ( this->interfaceNum.giveSize() == 2 ) {
429  if ( this->interfaceNum.at(1) >= this->interfaceNum.at(2) ) {
430  OOFEM_WARNING("second intercfacenum must be greater than the first one");
431  return IRRT_BAD_FORMAT;
432  }
433  this->xiTop = -1.0;
434  for ( int i = 1; i <= this->interfaceNum.at(2); i++ ) {
435  this->xiTop += layeredCS->giveLayerThickness(i) / totalThickness * 2.0;
436  }
437  } else {
438  this->xiTop = 1.0; // default is the top surface
439  }
440  checkCS = true;
441  }
442 #else
443  // old csnum (int version). NB: this was a bug since element nodes that where not part of the cross section could be enriched.
444  LayeredCrossSection *layeredCS = dynamic_cast< LayeredCrossSection * >( this->giveDomain()->giveCrossSection(this->crossSectionNum) );
445  if ( layeredCS == NULL ) {
446  OOFEM_WARNING("Delamination EI requires a valid layered cross section number input: see record '%s'.", _IFT_Delamination_csnum);
447  return IRRT_BAD_FORMAT;
448  } else if ( this->interfaceNum.giveSize() < 1 || this->interfaceNum.giveSize() > 2 ) {
449  OOFEM_WARNING("Size of record 'interfacenum' must be 1 or 2");
450  return IRRT_BAD_FORMAT;
451  }
452 
453  // check that interface numbers are valid
454  //interfaceNum.printYourself("interface num");
455  for ( int i = 1; i <= this->interfaceNum.giveSize(); i++ ) {
456  if ( this->interfaceNum.at(i) < 1 || this->interfaceNum.at(i) >= layeredCS->giveNumberOfLayers() ) {
457  OOFEM_WARNING( "Cross section does not contain the interface number (%d) specified in the record '%s' since number of layers is %d.", this->interfaceNum.at(i), _IFT_Delamination_interfacenum, layeredCS->giveNumberOfLayers() );
458  return IRRT_BAD_FORMAT;
459  }
460  }
461 
462  // compute xi-coord of the delamination
463  this->delamXiCoord = -1.0;
464  double totalThickness = layeredCS->give(CS_Thickness, FloatArray(), NULL, false); // no position available
465  for ( int i = 1; i <= this->interfaceNum.at(1); i++ ) {
466  this->delamXiCoord += layeredCS->giveLayerThickness(i) / totalThickness * 2.0;
467  this->xiBottom += layeredCS->giveLayerThickness(i) / totalThickness * 2.0;
468  }
469 
470  if ( this->interfaceNum.giveSize() == 2 ) {
471  if ( this->interfaceNum.at(1) >= this->interfaceNum.at(2) ) {
472  OOFEM_WARNING("second intercfacenum must be greater than the first one");
473  return IRRT_BAD_FORMAT;
474  }
475  for ( int i = 1; i <= this->interfaceNum.at(2); i++ ) {
476  this->xiTop += layeredCS->giveLayerThickness(i) / totalThickness * 2.0;
477  }
478  } else {
479  this->xiTop = 1.0; // default is the top surface
480  }
481 #endif
482 
483 
485  if ( this->matNum > 0 ) {
486  this->mat = this->giveDomain()->giveMaterial(this->matNum);
487  }
488 
490  if ( this->initiationFactor <= 0 ) {
491  OOFEM_ERROR("initiation scale factor must be greater than 0.");
492  return IRRT_BAD_FORMAT;
493  }
494 
496  if ( this->initiationRadius < 0 ) {
497  OOFEM_ERROR("initiation radius must be greater or equal than 0.");
498  return IRRT_BAD_FORMAT;
499  }
500 
501 
502  return IRRT_OK;
503 }
504 
505 
506 
507 void
509 {
511  DynamicInputRecord *eiRec = new DynamicInputRecord();
513 
516 
517  // Delamination specific records
524  recoverStresses = false;
525  }
526 
527 
529 
530  // Enrichment function
531  DynamicInputRecord *efRec = new DynamicInputRecord();
534 
535 
536  // Enrichment domain
537 
538  DynamicInputRecord *geoRec = new DynamicInputRecord();
539  geoRec->setRecordKeywordField(this->giveInputRecordName(), 1);
540 
541  IntArray idList;
542  idList.resize( dofManList.size() );
543  for ( size_t i = 0; i < dofManList.size(); i++ ) {
544  idList.at(i + 1) = dofManList [ i ];
545  }
546 
547  geoRec->setField(idList, _IFT_ListBasedEI_list);
548 
550 
551  // Enrichment front
552  if ( mEnrFrontIndex != 0 ) {
553  DynamicInputRecord *efrRecStart = new DynamicInputRecord();
554  mpEnrichmentFrontStart->giveInputRecord(* efrRecStart);
556 
557  DynamicInputRecord *efrRecEnd = new DynamicInputRecord();
560  }
561 
562  if ( mPropLawIndex != 0 ) {
563  // Propagation law
564  DynamicInputRecord *plRec = new DynamicInputRecord();
565  this->mpPropagationLaw->giveInputRecord(* plRec);
567  }
568 }
569 
570 void Delamination :: evalLevelSetNormal(double &oLevelSet, const FloatArray &iGlobalCoord, const FloatArray &iN, const IntArray &iNodeInd) const
571 {
572  // TODO: For consistency, this should be evaluated based on giveDelamXiCoord() /ES
573  // interpLevelSet(oLevelSet, iN, iNodeInd);
574 }
575 
576 void Delamination :: evaluateEnrFuncAt(std :: vector< double > &oEnrFunc, const FloatArray &iPos, const double &iLevelSet) const
577 {
578  oEnrFunc.resize(1, 0.0);
579  mpEnrichmentFunc->evaluateEnrFuncAt(oEnrFunc [ 0 ], iPos, iLevelSet);
580 }
581 } // end namespace oofem
The base class for all spatial localizers.
void setField(int item, InputFieldType id)
virtual int giveDofPoolSize() const
#define _IFT_EnrichmentItem_front
double giveDelamXiCoord() const
Definition: delamination.h:86
virtual IRResultType initializeFrom(InputRecord *ir)=0
Class and object Domain.
Definition: domain.h:115
IntArray giveDelamCrossSectionNum() const
Definition: delamination.h:89
Class representing the implementation of a dynamic data reader for in-code use.
virtual void updateGeometry()
Definition: listbasedei.C:56
virtual void appendInputRecords(DynamicDataReader &oDR)
Definition: delamination.C:508
int giveSetNumber() const
Definition: crosssection.h:129
virtual const char * giveClassName() const
Definition: delamination.h:81
virtual void evaluateEnrFuncAt(std::vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const
Definition: delamination.C:334
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
#define _IFT_ListBasedEI_list
Definition: listbasedei.h:39
int mPropLawIndex
mPropLawIndex: nonzero if a propagation law is present, zero otherwise.
Delamination.
Definition: delamination.h:58
virtual bool hasField(InputFieldType id)=0
Returns true if record contains field identified by idString keyword.
IntArray mPropagationDofManNumbers
Definition: tipinfo.h:46
Abstract base class for all finite elements.
Definition: element.h:145
#define _IFT_Delamination_CohesiveZoneMaterial
Definition: delamination.h:46
virtual void updateNodeEnrMarker(XfemManager &ixFemMan)
Definition: listbasedei.C:120
Class representing the abstraction for input data source.
Definition: datareader.h:50
#define _IFT_Delamination_initiationFactor
Definition: delamination.h:47
EnrichmentFunction * createEnrichmentFunction(const char *name, int num, Domain *domain)
Definition: classfactory.C:301
Dummy propagation law that does nothing.
virtual int instanciateYourself(DataReader &dr)
Definition: delamination.C:72
EnrichmentFront * createEnrichmentFront(const char *name)
Definition: classfactory.C:321
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.
Definition: femcmpnn.C:77
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual void report_error(const char *_class, const char *proc, InputFieldType id, IRResultType result, const char *file, int line)=0
Prints the error message.
XfemManager * giveXfemManager()
Definition: domain.C:375
void sort(IntArray &arry, operation op)
Sorts the receiver using quicksort algorithm.
Definition: intarray.h:416
virtual int giveNumberOfDofManagers() const
Definition: element.h:656
This class implements a layered cross section in a finite element problem.
void sort()
Sorts array.
Definition: intarray.C:420
REGISTER_EnrichmentItem(HybridEI)
Definition: hybridei.C:46
CrossSection * giveCrossSection(int n)
Service for accessing particular domain cross section model.
Definition: domain.C:339
#define _IFT_Delamination_initiationRadius
Definition: delamination.h:48
const IntArray & giveDofManArray() const
Definition: element.h:592
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.
Definition: domain.C:281
Element * giveElement(int n)
Service for accessing particular domain fe element.
Definition: domain.C:160
virtual IRResultType giveRecordKeywordField(std::string &answer, int &value)=0
Reads the record id field (type of record) and its corresponding number.
virtual bool hasField(InputFieldType id)
Returns true if record contains field identified by idString keyword.
#define OOFEM_ERROR(...)
Definition: error.h:61
double giveLayerThickness(int layer)
virtual bool hasInitiationCriteria()
Definition: delamination.C:220
#define _IFT_EnrichmentItem_propagationlaw
#define _IFT_Delamination_averageStresses
Definition: delamination.h:49
virtual bool propagateInterface(Domain &iDomain, EnrichmentFront &iEnrFront, TipPropagation &oTipProp)=0
Set of elements, boundaries, edges and/or nodes.
Definition: set.h:66
SpatialLocalizer * giveSpatialLocalizer()
Returns receiver&#39;s associated spatial localizer.
Definition: domain.C:1184
Set * giveSet(int n)
Service for accessing particular domain set.
Definition: domain.C:363
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void resize(int n)
Checks size of receiver towards requested bounds.
Definition: intarray.C:124
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
IntArray crossSectionNum
Definition: delamination.h:63
std::vector< int > dofManList
Definition: listbasedei.h:73
virtual IRResultType initializeFrom(InputRecord *ir)=0
Element * giveGlobalElement(int n)
Service for accessing particular domain fe element.
Definition: domain.C:171
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.
Definition: domain.C:1411
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: delamination.C:353
PropagationLaw * mpPropagationLaw
This class manages the xfem part.
Definition: xfemmanager.h:109
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
#define _IFT_Delamination_interfacenum
Definition: delamination.h:44
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).
Definition: node.h:120
EnrichmentFunction * mpEnrichmentFunc
EnrichmentItem with geometry defined by a set of nodes to be enriched.
Definition: listbasedei.h:54
Class representing the general Input Record.
Definition: inputrecord.h:101
void append(const FloatArray &a)
Appends array to reciever.
Definition: floatarray.C:664
void followedBy(const IntArray &b, int allocChunk=0)
Appends array b at the end of receiver.
Definition: intarray.C:145
virtual void propagateFronts(bool &oFrontsHavePropagated)
Definition: delamination.C:231
EnrichmentFront * mpEnrichmentFrontEnd
int mEnrFrontIndex
mEnrFrontIndex: nonzero if an enrichment front is present, zero otherwise.
Class representing the a dynamic Input Record.
ClassFactory & classFactory
Definition: classfactory.C:59
virtual void findInitiationFronts(bool &failureChecked, const IntArray &CSnumbers, std::vector< IntArray > &CSinterfaceNumbers, std::vector< IntArray > &CSDofManNumbers, std::vector< FloatArray > &initiationFactors, TimeStep *tStep)
Definition: delamination.C:280
void setRecordKeywordField(std::string keyword, int number)
Domain * giveDomain() const
Definition: femcmpnn.h:100
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
virtual void giveInputRecord(DynamicInputRecord &input)=0
int giveSize() const
Definition: intarray.h:203
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
PropagationLaw * createPropagationLaw(const char *name)
Definition: classfactory.C:331
Node * giveNode(int n)
Service for accessing particular domain node.
Definition: domain.h:371
the oofem namespace is to define a context or scope in which all oofem names are defined.
DofManager * giveDofManager(int i) const
Definition: element.C:514
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
int giveNumber() const
Definition: femcmpnn.h:107
int findCommonValuesSorted(const IntArray &iarray, IntArray &common, int allocChunk=0) const
Extracts common values in receiver and iarray.
Definition: intarray.C:383
#define OOFEM_WARNING(...)
Definition: error.h:62
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
Definition: delamination.h:45
Class representing solution step.
Definition: timestep.h:80
virtual const char * giveInputRecordName() const
Definition: delamination.h:82
const IntArray & giveElementList()
Returns list of elements within set.
Definition: set.C:138
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.
Definition: delamination.C:570

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