OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
xfemstructuremanager.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 "xfemstructuremanager.h"
36 #include "classfactory.h"
37 #include "dynamicinputrecord.h"
38 #include "dynamicdatareader.h"
39 #include "datareader.h"
40 #include "mathfem.h"
41 
44 #include "geometry.h"
45 
46 #include "matforceevaluator.h"
47 
48 namespace oofem {
50 
52  XfemManager(domain),
53  mSplitCracks(false),
54  mNonstandardCz(false),
55  mMinCrackLength(0.0),
56  mCrackMergeTol(0.0),
57  mpMatForceEvaluator( new MaterialForceEvaluator() )
58 {}
59 
61 {}
62 
64 {
65  IRResultType result; // Required by IR_GIVE_FIELD macro
66  int splitCracks = 0;
68  if ( splitCracks == 1 ) {
69  mSplitCracks = true;
70  }
71 
72  int nonStdCz = 0;
74  if ( nonStdCz == 1 ) {
75  mNonstandardCz = true;
76  }
77 
79 
80 #if 0
81  if ( mMinCrackLength < 1.0e-12 ) {
82  printf("mMinCrackLength: %e\n", mMinCrackLength);
83  }
84 #endif
85 
87 
88  if ( mCrackMergeTol > 1.0e-12 ) {
89  printf("mCrackMergeTol: %e\n", mCrackMergeTol);
90  }
91 
93 }
94 
96 {
98 
99  if ( mSplitCracks ) {
101  }
102 
104 
106 
107  if ( mNonstandardCz ) {
109  }
110 }
111 
113 {
114  int result = XfemManager :: instanciateYourself(dr);
115 
116  if ( mSplitCracks ) {
117  splitCracks();
118  }
119 
121 
123 
124  return result;
125 }
126 
127 void XfemStructureManager :: propagateFronts(bool &oAnyFronHasPropagated)
128 {
129  oAnyFronHasPropagated = false;
130 
131  for ( auto &ei: enrichmentItemList ) {
132 
133  bool eiHasPropagated = false;
134  ei->propagateFronts(eiHasPropagated);
135 
136  if ( eiHasPropagated ) {
137  oAnyFronHasPropagated = true;
138  }
139  }
140 
142 }
143 
144 
146 {
148 }
149 
151 {
152  // Loop over cracks
153  for ( int i = 1; i <= giveNumberOfEnrichmentItems(); i++ ) {
154  Crack *crack_i = dynamic_cast< Crack * >( this->giveEnrichmentItem(i) );
155  if ( crack_i ) {
156  // Check if crack i intersects with any of the cracks [1,i-1]:
157  for ( int j = 1; j < i; j++ ) {
158  // TODO: To improve performance, we may wish to use
159  // a tree structure here.
160  bool splittedCrack = false;
161 
162  Crack *crack_j = dynamic_cast< Crack * >( this->giveEnrichmentItem(j) );
163  if ( crack_j ) {
164  // If so, find the arc length positions of the intersections on crack i ...
165 
166  std :: vector< FloatArray >intersectionPoints;
167  std :: vector< double >arcPositions_i, arcPositions_j;
168  crack_i->computeCrackIntersectionPoints(* crack_j, intersectionPoints, arcPositions_i);
169  crack_j->computeArcPoints(intersectionPoints, arcPositions_j);
170 
171  const double arcLengthTol = 1.0e-6;
172 
173  for ( int k = 0; k < int( arcPositions_i.size() ); k++ ) {
174  if ( arcPositions_i [ k ] < arcLengthTol || arcPositions_i [ k ] > ( 1.0 - arcLengthTol ) || arcPositions_j [ k ] < arcLengthTol || arcPositions_j [ k ] > ( 1.0 - arcLengthTol ) ) {
175  arcPositions_i.erase(arcPositions_i.begin() + k);
176  arcPositions_j.erase(arcPositions_j.begin() + k);
177  k--;
178  }
179  }
180 
181  if ( arcPositions_i.size() > 0 ) {
182  arcPositions_i.insert(arcPositions_i.begin(), 0.0);
183  arcPositions_i.push_back(1.0);
184  arcPositions_j.insert(arcPositions_j.begin(), 0.0);
185  arcPositions_j.push_back(1.0);
186 
187  for ( int k = 1; k < int( arcPositions_i.size() ); k++ ) {
188  // Only include segments of finite length
189  if ( fabs(arcPositions_i [ k ] - arcPositions_i [ k - 1 ]) > arcLengthTol ) {
190  //printf("arcPositions.size(): %lu\n", arcPositions.size() );
191 
192  DynamicDataReader dataReader("xfem-crack");
193  crack_i->appendInputRecords(dataReader);
194  // ... split crack i at the intersection and add intersection enrichment
195  // fronts at the newly detected intersections.
196 
197  int n1 = this->giveNumberOfEnrichmentItems() + 1;
198  // EnrichmentItem *newEI_1 = new Crack(n1, this, this->giveDomain() );
199  Crack *newCrack = new Crack( n1, this, this->giveDomain() );
200  std :: unique_ptr< EnrichmentItem >newEI_1(newCrack);
201 
203  newEI_1->initializeFrom(ir);
204  newEI_1->instanciateYourself(dataReader);
205 
206  PolygonLine *new_pl = dynamic_cast< PolygonLine * >( newCrack->giveGeometry() );
207  // EDCrack *ed = dynamic_cast<EDCrack*>( newEI_1->giveEnrichmentDomain() );
208 
209  if ( !new_pl ) {
210  OOFEM_ERROR("Failed to cast PolygonLine *new_pl.")
211  } else {
212  //printf("arcPositions_i[k-1]: %e arcPositions_i[k]: %e\n", arcPositions_i[k-1], arcPositions_i[k] );
213  new_pl->cropPolygon(arcPositions_i [ k - 1 ], arcPositions_i [ k ]);
214 
215 
216  PolygonLine *polygonLine_j = dynamic_cast< PolygonLine * >( crack_j->giveGeometry() );
217 
218  if ( polygonLine_j == NULL ) {
219  OOFEM_ERROR("Failed to cast PolygonLine *polygonLine_j.")
220  }
221 
222  PolygonLine *polygonLine_i = dynamic_cast< PolygonLine * >( crack_i->giveGeometry() );
223 
224  if ( polygonLine_i == NULL ) {
225  OOFEM_ERROR("Failed to cast PolygonLine *polygonLine_i.")
226  }
227 
228  // Take enrichment front tangent direction
229  // as the normal direction of crack_j
230  // EnrichmentDomain_BG *ed_crack_j = dynamic_cast<EnrichmentDomain_BG*>( crack_j->giveEnrichmentDomain() );
231  // if(ed_crack_j == NULL) {
232  // OOFEM_ERROR("Failed to cast EnrichmentDomain_BG *ed_crack_j.")
233  // }
234  //
235  // PolygonLine *polygonLine_j = dynamic_cast<PolygonLine*>( ed_crack_j->bg );
236  // if(polygonLine_j == NULL) {
237  // OOFEM_ERROR("Failed to cast PolygonLine *polygonLine_j.")
238  // }
239  //
240  // EnrichmentDomain_BG *ed_crack_i = dynamic_cast<EnrichmentDomain_BG*>( crack_i->giveEnrichmentDomain() );
241  // if(ed_crack_i == NULL) {
242  // OOFEM_ERROR("Failed to cast EnrichmentDomain_BG *ed_crack_i.")
243  // }
244  //
245  // PolygonLine *polygonLine_i = dynamic_cast<PolygonLine*>( ed_crack_i->bg );
246  // if(polygonLine_i == NULL) {
247  // OOFEM_ERROR("Failed to cast PolygonLine *polygonLine_i.")
248  // }
249 
250 
251  // Change enrichment fronts
252  if ( k - 1 > 0 ) {
253  FloatArray frontTangent1;
254  polygonLine_j->giveNormal(frontTangent1, arcPositions_j [ k - 1 ]);
255 
256  FloatArray crackTangent1;
257  polygonLine_i->giveTangent(crackTangent1, arcPositions_i [ k - 1 ]);
258  crackTangent1.times(-1.0);
259 
261 
262  if ( frontTangent1.dotProduct(crackTangent1) < 0.0 ) {
263  frontTangent1.times(-1.0);
264  }
265  ef->setTangent(frontTangent1);
266 
267  newEI_1->setEnrichmentFrontStart(ef);
268  }
269 
270  if ( k < int( arcPositions_i.size() ) - 1 ) {
271  FloatArray frontTangent1;
272  polygonLine_j->giveNormal(frontTangent1, arcPositions_j [ k ]);
273 
274  FloatArray crackTangent1;
275  polygonLine_i->giveTangent(crackTangent1, arcPositions_i [ k ]);
276 
278 
279  if ( frontTangent1.dotProduct(crackTangent1) < 0.0 ) {
280  frontTangent1.times(-1.0);
281  }
282  ef->setTangent(frontTangent1);
283 
284  newEI_1->setEnrichmentFrontEnd(ef);
285  }
286  }
287  //this->enrichmentItemList[i-1] = std :: move(ei);
288 
289  this->enrichmentItemList.push_back(NULL);
290  newEI_1->updateGeometry();
291  this->enrichmentItemList [ enrichmentItemList.size() - 1 ] = std :: move(newEI_1);
292 
293 
294  splittedCrack = true;
295  }
296  }
297  }
298  }
299 
300  if ( splittedCrack ) {
301  enrichmentItemList.erase(enrichmentItemList.begin() + i - 1);
303  i--;
304  break;
305  }
306  }
307  }
308  }
309 
311 
312  //printf("After splitting: Number of ei: %d\n", giveNumberOfEnrichmentItems() );
313 
315 
316  for ( size_t i = 0; i < enrichmentItemList.size(); i++ ) {
317  enrichmentItemList [ i ]->setNumber(i + 1);
318  }
319 
320  for ( size_t i = 0; i < enrichmentItemList.size(); i++ ) {
321  enrichmentItemList [ i ]->updateGeometry();
322  }
323 }
324 
326 {
327  //printf("Entering XfemStructureManager :: removeShortCracks()\n");
328 
329  //printf("Number of ei before removal: %d\n", giveNumberOfEnrichmentItems());
330 
331  double l_tol = mMinCrackLength;
332 
333  for ( int i = 1; i <= giveNumberOfEnrichmentItems(); i++ ) {
334  Crack *crack = dynamic_cast< Crack * >( this->giveEnrichmentItem(i) );
335  if ( crack ) {
336  double l = crack->computeLength();
337 
338  if ( l < l_tol ) {
339  printf("Removing short crack with l: %e\n", l);
340 
341  // Explicitly erasing things is a mess...
342  //crack->removeEnrichedDofs();
343  //enrichmentItemList.erase(enrichmentItemList.begin() + i - 1);
344  //i--;
345 
346  // ...therefore, just remove the geometry.
347  PolygonLine *polygonLine = dynamic_cast< PolygonLine * >( crack->giveGeometry() );
348  polygonLine->clear();
349  //FloatArray tmp = {0.0, 0.0, 0.0};
350  FloatArray tmp = {-1.0e3, -1.0e3, -1.0e3};
351  polygonLine->insertVertexBack(tmp);
352 
353  }
354  }
355  }
356 
357  //printf("Number of ei after removal: %d\n", giveNumberOfEnrichmentItems());
358 
359 }
360 
362 {
363  const TipInfo &t1 = iEf1->giveTipInfo();
364  const TipInfo &t2 = iEf2->giveTipInfo();
365 
366  return t1.mTangDir.dotProduct( t2.mTangDir ) <= 0.0;
367 }
368 
370 {
371  //printf("Entering XfemStructureManager :: mergeCloseCracks().\n");
372 
373  const double &dist_tol = mCrackMergeTol;
374 
375  // Loop over cracks and check if two crack tips are closer to
376  // each other than a predefined distance. If so, merge the cracks.
377  // Loop over cracks
378  for ( int i = 1; i <= giveNumberOfEnrichmentItems(); i++ ) {
379  Crack *crack_i = dynamic_cast< Crack * >( this->giveEnrichmentItem(i) );
380  if ( crack_i ) {
381 
382  BasicGeometry *bg_i = crack_i->giveGeometry();
383  TipInfo startTip_i, endTip_i;
384  bg_i->giveTips(startTip_i, endTip_i) ;
385 
386  const FloatArray &ps_i =startTip_i.mGlobalCoord;
387  const FloatArray &pe_i =endTip_i.mGlobalCoord;
388 
389  PolygonLine *polygonLine_i = dynamic_cast< PolygonLine * >( crack_i->giveGeometry() );
390 
391  if ( !polygonLine_i ) {
392  OOFEM_ERROR("Failed to cast PolygonLine *polygonLine_i.")
393  }
394 
395  for ( int j = i+1; j <= giveNumberOfEnrichmentItems(); j++ ) {
396  // TODO: To improve performance, we may wish to use
397  // a tree structure here.
398 // bool mergedCrack = false;
399 
400  Crack *crack_j = dynamic_cast< Crack * >( this->giveEnrichmentItem(j) );
401 
402  if ( crack_i->computeLength() < 1.0e-18 || crack_j->computeLength() < 1.0e-18 ) {
403  continue;
404  }
405 
406  if ( crack_j ) {
407  BasicGeometry *bg_j = crack_j->giveGeometry();
408  TipInfo startTip_j, endTip_j;
409  bg_j->giveTips(startTip_j, endTip_j) ;
410 
411  const FloatArray &ps_j =startTip_j.mGlobalCoord;
412  const FloatArray &pe_j =endTip_j.mGlobalCoord;
413 
414  PolygonLine *polygonLine_j = dynamic_cast< PolygonLine * >( crack_j->giveGeometry() );
415 
416  if ( !polygonLine_j ) {
417  OOFEM_ERROR("Failed to cast PolygonLine *polygonLine_j.")
418  }
419 
421  if ( ps_i.distance(ps_j) < dist_tol ) {
422  printf("ps_i.distance(ps_j) < dist_tol\n");
423 
424  // Merging is not reasonable if the tips are close to parallel
426  printf("Preventing merge due to parallel tips.\n");
427  } else {
428  // Append points to the start of polygonLine_i
429  int n = polygonLine_j->giveNrVertices();
430  for (int k = 1; k <= n; k++) {
431  polygonLine_i->insertVertexFront( polygonLine_j->giveVertex(k) );
432  }
433 
434  polygonLine_i->removeDuplicatePoints(1.0e-18);
435 
436 
437  polygonLine_j->clear();
438  //FloatArray tmp = { 0.0, 0.0, 0.0};
439  FloatArray tmp = {-1.0e3, -1.0e3, -1.0e3};
440  polygonLine_j->insertVertexBack(tmp);
441 
442  // Fix tips
443  EnrichmentFront *ef_tmp = crack_i->giveEnrichmentFrontStart();
444  crack_i->setEnrichmentFrontStart( crack_j->giveEnrichmentFrontEnd(), false );
445  crack_j->setEnrichmentFrontEnd(ef_tmp, false);
446 
447 
448  //mergedCrack = true;
449  break;
450  }
451 
452  }
453 
455  if ( ps_i.distance(pe_j) < dist_tol ) {
456  printf("ps_i.distance(pe_j) < dist_tol\n");
457 
458 #if 1
460  printf("Preventing merge due to parallel tips.\n");
461  } else {
462 
463  // Append points to the start of polygonLine_i
464  int n = polygonLine_j->giveNrVertices();
465  for(int k = n; k > 0; k--) {
466  polygonLine_i->insertVertexFront( polygonLine_j->giveVertex(k) );
467  }
468 
469  polygonLine_i->removeDuplicatePoints(1.0e-18);
470 
471 
472  polygonLine_j->clear();
473  //FloatArray tmp = {0.0, 0.0, 0.0};
474  FloatArray tmp = {-1.0e3, -1.0e3, -1.0e3};
475  polygonLine_j->insertVertexBack(tmp);
476 
477  // Fix tips
478  EnrichmentFront *ef_tmp = crack_i->giveEnrichmentFrontStart();
479  crack_i->setEnrichmentFrontStart( crack_j->giveEnrichmentFrontStart(), false );
480  crack_j->setEnrichmentFrontStart(ef_tmp, false);
481 
482  //mergedCrack = true;
483  break;
484  }
485 #endif
486  }
487 
488 
490  if ( pe_i.distance(ps_j) < dist_tol ) {
491  printf("pe_i.distance(ps_j) < dist_tol\n");
492 
494  printf("Preventing merge due to parallel tips.\n");
495  } else {
496 
497  // Append points to the end of polygonLine_i
498  int n = polygonLine_j->giveNrVertices();
499  for(int k = 1; k <= n; k++) {
500  polygonLine_i->insertVertexBack( polygonLine_j->giveVertex(k) );
501  }
502 
503  polygonLine_i->removeDuplicatePoints(1.0e-18);
504 
505 
506  polygonLine_j->clear();
507  //FloatArray tmp = {0.0, 0.0, 0.0};
508  FloatArray tmp = {-1.0e3, -1.0e3, -1.0e3};
509  polygonLine_j->insertVertexBack(tmp);
510 
511 
512  // Fix tips
513  EnrichmentFront *ef_tmp = crack_i->giveEnrichmentFrontEnd();
514  crack_i->setEnrichmentFrontEnd( crack_j->giveEnrichmentFrontEnd(), false );
515  crack_j->setEnrichmentFrontEnd(ef_tmp, false);
516 
517  //mergedCrack = true;
518  break;
519  }
520  }
521 
523  if ( pe_i.distance(pe_j) < dist_tol ) {
524  printf("pe_i.distance(pe_j) < dist_tol\n");
525 
527  printf("Preventing merge due to parallel tips.\n");
528  } else {
529 
530  // Append points to the end of polygonLine_i
531  int n = polygonLine_j->giveNrVertices();
532  for(int k = n; k > 0; k--) {
533  polygonLine_i->insertVertexBack( polygonLine_j->giveVertex(k) );
534  }
535 
536  polygonLine_i->removeDuplicatePoints(1.0e-18);
537 
538  polygonLine_j->clear();
539  //FloatArray tmp = {0.0, 0.0, 0.0};
540  FloatArray tmp = {-1.0e3, -1.0e3, -1.0e3};
541  polygonLine_j->insertVertexBack(tmp);
542 
543 
544  // Fix tips
545  EnrichmentFront *ef_tmp = crack_i->giveEnrichmentFrontEnd();
546  crack_i->setEnrichmentFrontEnd( crack_j->giveEnrichmentFrontStart(), false );
547  crack_j->setEnrichmentFrontStart(ef_tmp, false);
548 
549  //mergedCrack = true;
550  break;
551  }
552  }
553  }
554  }
555  }
556  }
557 
559 
560  for ( size_t i = 0; i < enrichmentItemList.size(); i++ ) {
561  enrichmentItemList [ i ]->setNumber(i + 1);
562  }
563 
564 
565  for ( size_t i = 0; i < enrichmentItemList.size(); i++ ) {
566  enrichmentItemList [ i ]->updateGeometry();
567  }
568 
570 
571 }
572 
573 
575 {
576  double l_tot = 0.0;
577 
578  for ( int i = 1; i <= giveNumberOfEnrichmentItems(); i++ ) {
579  auto crack = dynamic_cast< Crack * >( this->giveEnrichmentItem(i) );
580  if ( crack ) {
581  l_tot += crack->computeLength();
582  }
583  }
584 
585  return l_tot;
586 }
587 
588 
589 } /* namespace oofem */
void setField(int item, InputFieldType id)
const FloatArray & giveVertex(int n) const
Definition: geometry.h:124
void setEnrichmentFrontStart(EnrichmentFront *ipEnrichmentFrontStart, bool iDeleteOld=true)
void removeDuplicatePoints(const double &iTolSquare)
Definition: geometry.C:67
EnrichmentFront * giveEnrichmentFrontStart()
Class and object Domain.
Definition: domain.h:115
virtual void giveInputRecord(DynamicInputRecord &input)
Definition: xfemmanager.C:188
Class representing the implementation of a dynamic data reader for in-code use.
virtual void updateYourself(TimeStep *tStep)
Update enrichment items (level sets).
Definition: xfemmanager.C:329
virtual void updateYourself(TimeStep *tStep)
Update enrichment items (level sets).
int giveNrVertices() const
Returns number of Geometry vertices.
Definition: geometry.h:144
void insertVertexBack(const FloatArray &iP)
Definition: geometry.h:131
TipInfo gathers useful information about a crack tip, like its position and tangent direction...
Definition: tipinfo.h:24
void giveNormal(FloatArray &oNormal, const double &iArcPosition) const
Definition: geometry.C:1193
Class representing the abstraction for input data source.
Definition: datareader.h:50
XfemStructureManager: XFEM manager with extra functionality specific for the sm module.
void computeCrackIntersectionPoints(Crack &iCrack, std::vector< FloatArray > &oIntersectionPoints, std::vector< double > &oArcPositions)
Definition: crack.C:100
Abstract representation of Geometry.
Definition: geometry.h:81
void setEnrichmentFrontEnd(EnrichmentFront *ipEnrichmentFrontEnd, bool iDeleteOld=true)
virtual void giveInputRecord(DynamicInputRecord &input)
virtual void propagateFronts(bool &oAnyFronHasPropagated)
double distance(const FloatArray &x) const
Computes the distance between position represented by receiver and position given as parameter...
Definition: floatarray.C:489
int giveNumberOfEnrichmentItems() const
Definition: xfemmanager.h:185
bool mSplitCracks
If cracks should be splitted at intersections as a pre-processing step.
Crack.
Definition: crack.h:54
std::vector< std::unique_ptr< EnrichmentItem > > enrichmentItemList
Enrichment item list.
Definition: xfemmanager.h:114
virtual InputRecord * giveInputRecord(InputRecordType, int recordId)
Returns input record corresponding to given InputRecordType value and its record_id.
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
Definition: floatarray.C:463
#define OOFEM_ERROR(...)
Definition: error.h:61
Class EnrichmentFront: describes the edge or tip of an XFEM enrichment.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void computeArcPoints(const std::vector< FloatArray > &iIntersectionPoints, std::vector< double > &oArcPositions)
Definition: crack.C:127
REGISTER_XfemManager(XfemManager)
Definition: xfemmanager.C:59
void updateNodeEnrichmentItemMap()
Definition: xfemmanager.C:513
#define _IFT_XfemStructureManager_nonstandardCZ
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: xfemmanager.C:154
Class representing vector of real numbers.
Definition: floatarray.h:82
This class manages the xfem part.
Definition: xfemmanager.h:109
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
BasicGeometry * giveGeometry()
double computeLength()
Definition: crack.C:149
void setTangent(FloatArray iTangent)
virtual int instanciateYourself(DataReader &dr)
Definition: xfemmanager.C:210
bool tipsHaveOppositeDirection(EnrichmentFront *iEf1, EnrichmentFront *iEf2)
bool mNonstandardCz
If a non-standard cohesive zone formulation should be used.
Class representing the a dynamic Input Record.
void times(double s)
Multiplies receiver with scalar.
Definition: floatarray.C:818
EnrichmentItem * giveEnrichmentItem(int n)
Definition: xfemmanager.h:184
#define new
void insertVertexFront(const FloatArray &iP)
Definition: geometry.h:130
virtual bool giveTips(TipInfo &oStartTipInfo, TipInfo &oEndTipInfo) const
Returns start and end tip of the geometry, if applicable.
Definition: geometry.h:183
FloatArray mTangDir
Definition: tipinfo.h:32
virtual int instanciateYourself(DataReader &dr)
const TipInfo & giveTipInfo() const
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
void cropPolygon(const double &iArcPosStart, const double &iArcPosEnd)
Keep only a part of the underlying geometry, characterized by iArcPosStart and iArcPosEnd.
Definition: geometry.C:1800
double computeTotalCrackLength()
Compute the total length of all cracks in the domain.
Evaluates material forces.
FloatArray mGlobalCoord
Definition: tipinfo.h:30
double mMinCrackLength
Cracks shorter than this length are automatically removed.
the oofem namespace is to define a context or scope in which all oofem names are defined.
double mCrackMergeTol
Cracks with tips closer than this distance are automatically merged.
Domain * giveDomain()
Definition: xfemmanager.h:202
Class representing solution step.
Definition: timestep.h:80
#define _IFT_XfemStructureManager_crackMergeTol
virtual void appendInputRecords(DynamicDataReader &oDR)
EnrichmentFront * giveEnrichmentFrontEnd()
#define _IFT_XfemStructureManager_splitCracks
#define _IFT_XfemStructureManager_minCrackLength
virtual void giveTangent(FloatArray &oTangent, const double &iArcPosition) const
Computes tangential direction at given local coordinate (arcPos)
Definition: geometry.C:1228

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