OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
xfemmanager.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 "xfemmanager.h"
36 #include "inputrecord.h"
37 #include "intarray.h"
38 #include "connectivitytable.h"
39 #include "floatarray.h"
40 #include "domain.h"
41 #include "element.h"
42 #include "dofmanager.h"
43 #include "cltypes.h"
44 #include "xfemelementinterface.h"
45 #include "classfactory.h"
46 #include "masterdof.h"
47 #include "datareader.h"
48 #include "datastream.h"
49 #include "contextioerr.h"
50 #include "dynamicinputrecord.h"
51 #include "internalstatevaluetype.h"
52 #include "XFEMDebugTools.h"
53 #include "xfemtolerances.h"
54 #include "nucleationcriterion.h"
57 
58 namespace oofem {
60 
61 XfemManager :: XfemManager(Domain *domain)
62 {
63  this->domain = domain;
64  numberOfEnrichmentItems = -1;
65  numberOfNucleationCriteria = 0;
66  mNumGpPerTri = 12;
67 
68  // Default is no refinement of triangles.
69  mNumTriRef = 0;
70 
71  // Default is no scaling of enrichment dofs.
72  mEnrDofScaleFac = 1.0;
73 
74  doVTKExport = false;
75  mDebugVTK = false;
76  vtkExportFields.clear();
77 
78  mNodeEnrichmentItemIndices.resize(0);
79  mElementEnrichmentItemIndices.clear();
80  mMaterialModifyingEnrItemIndices.clear();
81 }
82 
84 {}
85 
86 
89 {
90  switch ( type ) {
91  case XFEMST_Enrichment:
92  case XFEMST_LevelSetPhi:
93  case XFEMST_LevelSetGamma:
94  case XFEMST_NumIntersecPoints:
95  case XFEMST_NodeEnrMarker:
96  return ISVT_SCALAR;
97 
98  default:
99  return ISVT_UNDEFINED;
100  }
101 }
102 
103 
105 {
106 #if 0
107  // Loop over all EI which asks if el is enriched.
108  for ( int i = 1; i <= this->giveNumberOfEnrichmentItems(); i++ ) {
109  if ( this->giveEnrichmentItem(i)->isElementEnriched(elem) ) {
110  return true;
111  }
112  }
113 #else
114  // An element is enriched if one of its nodes is enriched.
115  for ( int n: elem->giveDofManArray() ) {
116  if ( mNodeEnrichmentItemIndices [ n - 1 ].size() > 0 ) {
117  return true;
118  }
119  }
120 
121 #endif
122 
123  return false;
124 }
125 
126 void
128 {
129  // Creates new dofs due to enrichment and appends them to the dof managers
131 
132  for ( auto &ei: enrichmentItemList ) {
133  IntArray dofIdArray;
134  ei->createEnrichedDofs();
135  ei->givePotentialEIDofIdArray(dofIdArray);
136 // printf("dofIdArray: "); dofIdArray.printYourself();
137  mXFEMPotentialDofIDs.followedBy(dofIdArray);
138  }
139 }
140 
142 {
143  IntArray dofIdArray;
144 
145  for(int id : mXFEMPotentialDofIDs) {
146  if(iDMan.hasDofID( DofIDItem(id) )) {
147  dofIdArray.followedBy(id);
148  }
149  }
150 
151  return dofIdArray;
152 }
153 
155 {
156  IRResultType result; // Required by IR_GIVE_FIELD macro
157 
159 
161 // printf("numberOfNucleationCriteria: %d\n", numberOfNucleationCriteria);
162 
165 
167  //printf("mEnrDofScaleFac: %e\n", mEnrDofScaleFac );
168 
170  if ( doVTKExport ) {
171  IntArray exportFields;
173  }
174 
175  int vtkDebug = 0;
177  if ( vtkDebug == 1 ) {
178  mDebugVTK = true;
179  }
180 
181  // TODO: Read as input.
183 
184  return IRRT_OK;
185 }
186 
187 
189 {
191 
194 
197 
198 
204 
205  if ( mDebugVTK ) {
207  }
208 }
209 
211 {
212  IRResultType result; // Required by IR_GIVE_FIELD macro
213  std :: string name;
214 
216  for ( int i = 1; i <= numberOfEnrichmentItems; i++ ) {
218  result = mir->giveRecordKeywordField(name);
219 
220  if ( result != IRRT_OK ) {
221  mir->report_error(this->giveClassName(), __func__, "", result, __FILE__, __LINE__);
222  }
223 
224  std :: unique_ptr< EnrichmentItem >ei( classFactory.createEnrichmentItem( name.c_str(), i, this, this->giveDomain() ) );
225  if ( ei.get() == NULL ) {
226  OOFEM_ERROR( "unknown enrichment item (%s)", name.c_str() );
227  }
228 
229  ei->initializeFrom(mir);
230  ei->instanciateYourself(dr);
231  this->enrichmentItemList [ i - 1 ] = std :: move(ei);
232  }
233 
235  for ( int i = 1; i <= numberOfNucleationCriteria; i++ ) {
237  result = mir->giveRecordKeywordField(name);
238 
239  if ( result != IRRT_OK ) {
240  mir->report_error(this->giveClassName(), __func__, "", result, __FILE__, __LINE__);
241  }
242 
243  std :: unique_ptr< NucleationCriterion >nc( classFactory.createNucleationCriterion( name.c_str(), this->giveDomain() ) );
244  if ( nc.get() == NULL ) {
245  OOFEM_ERROR( "Unknown nucleation criterion: (%s)", name.c_str() );
246  }
247 
248  nc->initializeFrom(mir);
249  nc->instanciateYourself(dr);
250  this->mNucleationCriteria [ i - 1 ] = std :: move(nc);
251  }
252 
253 
255 
256  return 1;
257 }
258 
260 {
261  domain = ipDomain;
262 
263  for ( auto &ei : enrichmentItemList ) {
264  ei->setDomain(ipDomain);
265  }
266 }
267 
269 {
270  contextIOResultType iores;
271 
272  if ( mode & CM_Definition ) {
273  if ( !stream.write(this->numberOfEnrichmentItems) ) {
275  }
276  }
277 
278  for ( int i = 1; i <= this->numberOfEnrichmentItems; i++ ) {
279  EnrichmentItem *object = this->giveEnrichmentItem(i);
280  if ( ( mode & CM_Definition ) ) {
281  if ( !stream.write( object->giveInputRecordName() ) ) {
283  }
284  }
285 
286  if ( ( iores = object->saveContext(stream, mode) ) != CIO_OK ) {
287  THROW_CIOERR(iores);
288  }
289  }
290 
291  return CIO_OK;
292 }
293 
294 
296 {
297  contextIOResultType iores;
298 
299  if ( mode & CM_Definition ) {
300  if ( !stream.read(this->numberOfEnrichmentItems) ) {
302  }
303  this->enrichmentItemList.resize(this->numberOfEnrichmentItems);
304  }
305 
306  for ( int i = 1; i <= this->numberOfEnrichmentItems; i++ ) {
307  EnrichmentItem *obj;
308  if ( mode & CM_Definition ) {
309  std :: string name;
310  if ( !stream.read(name) ) {
312  }
313 
314  std :: unique_ptr< EnrichmentItem >ei( classFactory.createEnrichmentItem(name.c_str(), i, this, this->domain) );
315  obj = ei.get();
316  enrichmentItemList.insert( enrichmentItemList.begin() + i - 1, std :: move(ei) );
317  } else {
318  obj = this->giveEnrichmentItem(i);
319  }
320 
321  if ( ( iores = obj->restoreContext(stream, mode) ) != CIO_OK ) {
323  }
324  }
325 
326  return CIO_OK;
327 }
328 
330 {
331  // Update level sets
332  for ( auto &ei: enrichmentItemList ) {
333  ei->updateGeometry();
334  }
335 
337 }
338 
339 void XfemManager :: propagateFronts(bool &oAnyFronHasPropagated)
340 {
341  oAnyFronHasPropagated = false;
342 
343  for ( auto &ei: enrichmentItemList ) {
344 
345  bool eiHasPropagated = false;
346  ei->propagateFronts(eiHasPropagated);
347 
348  if(eiHasPropagated) {
349  oAnyFronHasPropagated = true;
350  }
351 #if 0
352  if ( giveVtkDebug() ) {
353  GeometryBasedEI *geoEI = dynamic_cast< GeometryBasedEI * >( ei );
354  if ( geoEI != NULL ) {
355  std :: vector< FloatArray >points;
356  geoEI->giveSubPolygon(points, -0.1, 1.1);
357 
358  std :: vector< double >x, y;
359  for ( size_t j = 0; j < points.size(); j++ ) {
360  x.push_back( points [ j ].at(1) );
361  y.push_back( points [ j ].at(2) );
362  }
363 
364 
365  char fileName [ 200 ];
366  sprintf( fileName, "crack%d.dat", ei->giveNumber() );
368  }
369  }
370 #endif
371  }
372 
374 }
375 
376 void XfemManager :: initiateFronts(bool &oAnyFronHasPropagated, TimeStep *tStep)
377 {
378  oAnyFronHasPropagated = false;
379 
380  // Loop over EI:s and collect cross sections which have delaminaion EI:s
381  IntArray CSnumbers;
382  std :: vector < FloatArray > initiationFactors; initiationFactors.resize(this->domain->giveNumberOfCrossSectionModels());
383  for ( auto &ei: enrichmentItemList ) {
384  if ( Delamination *dei = dynamic_cast< Delamination * >( ei.get() ) ) {
385  int CSinterfaceNumber = dei->giveDelamInterfaceNum();
386  for (int CSnumber : dei->giveDelamCrossSectionNum()) {
387  CSnumbers.insertSortedOnce(CSnumber);
388  if (initiationFactors[CSnumber-1].giveSize() < CSinterfaceNumber) {
389  initiationFactors[CSnumber-1].resizeWithValues(CSinterfaceNumber);
390  }
391  initiationFactors[CSnumber-1].at(CSinterfaceNumber) = dei->giveInitiationFactor();
392  }
393  }
394  }
395 
396  bool failureChecked = false;
397  std :: vector < IntArray > CSinterfaceNumbers; CSinterfaceNumbers.resize(CSnumbers.giveSize());
398  std :: vector < IntArray > CSDofManNumbers; CSDofManNumbers.resize(CSnumbers.giveSize());
399 
400  for ( auto &ei: enrichmentItemList ) {
401 
402  bool eiHasPropagated = false;
403 
404  if ( Delamination *dei = dynamic_cast< Delamination * >( ei.get() ) ) {
405 
406  if ( !failureChecked ) {
407  dei->findInitiationFronts(failureChecked, CSnumbers, CSinterfaceNumbers, CSDofManNumbers, initiationFactors, tStep);
408  }
409 
410  for (int CSnum : dei->giveDelamCrossSectionNum()) {
411 
412  int iCS = CSnumbers.findSorted(CSnum);
413  int iInt = CSinterfaceNumbers[iCS-1].findSorted(dei->giveDelamInterfaceNum());
414  if ( iInt ) {
415  // Check if nodes are viable for enrichment
417  IntArray delamNodes, propNodes;
418  Set *elSet = this->giveDomain()->giveSet(this->giveDomain()->giveCrossSection(CSnum)->giveSetNumber());
419  for (int elID : elSet->giveElementList() ) {
420  delamNodes.followedBy(this->giveDomain()->giveElement(elID)->giveDofManArray());
421  }
422  delamNodes.sort();
423  delamNodes.findCommonValuesSorted(CSDofManNumbers[iCS-1], propNodes);
424  dei->initiateFronts(eiHasPropagated,propNodes);
425  }
426  }
427  } else {
428  OOFEM_ERROR(" XfemManager :: initiateFronts not implemented for other than Delamination.")
429  }
430 
431  if(eiHasPropagated) {
432  oAnyFronHasPropagated = true;
433  }
434  }
435 
437 }
438 
440 {
441  for ( auto &ei: enrichmentItemList ) {
442  if ( ei->hasPropagatingFronts() ) {
443  return true;
444  }
445  }
446 
447  return false;
448 }
449 
451 {
452  for ( auto &ei: enrichmentItemList ) {
453  if ( ei->hasInitiationCriteria() ) {
454  return true;
455  }
456  }
457 
458  return false;
459 }
460 
462 {
463  enrichmentItemList.clear();
465 }
466 
467 void XfemManager :: appendEnrichmentItems(std :: vector< std :: unique_ptr< EnrichmentItem > > &iEIlist)
468 {
469  for( auto &ei : iEIlist ) {
470  enrichmentItemList.push_back(std::move(ei));
471  }
472 
475 }
476 
477 void XfemManager :: nucleateEnrichmentItems(bool &oNewItemsWereNucleated)
478 {
479 // printf("Entering XfemManager :: nucleateEnrichmentItems\n");
480 
481  for(auto &nucCrit : mNucleationCriteria) {
482  std::vector<std::unique_ptr<EnrichmentItem>> eiList = std::move(nucCrit->nucleateEnrichmentItems());
483 
484  if(eiList.size() > 0) {
485 // printf("eiList.size(): %lu\n", eiList.size() );
486 
487 // if(giveNumberOfEnrichmentItems() == 0) {
488 // printf("giveNumberOfEnrichmentItems() == 0\n");
489 
490  for(auto &ei : eiList) {
491  enrichmentItemList.push_back(std::move(ei));
492  }
493 
494  // enrichmentItemList.push_back(std::move(ei));
496  oNewItemsWereNucleated = true;
498 
499  return;
500 // }
501  }
502  }
503 
504  oNewItemsWereNucleated = false;
505  return;
506 }
507 
509 {
510  return ( mNucleationCriteria.size() > 0 );
511 }
512 
514 {
515  Domain *domain = giveDomain();
516  int nDMan = domain->giveNumberOfDofManagers();
518  mNodeEnrichmentItemIndices.resize(nDMan);
519 
520  int nElem = domain->giveNumberOfElements();
522 
523  for ( int i = 1; i <= nElem; i++ ) {
524  int elIndex = domain->giveElement(i)->giveGlobalNumber();
525  int elPlaceInArray = domain->giveElementPlaceInArray(elIndex);
526  if ( i != elPlaceInArray ) {
527  printf("i != elPlaceInArray.\n");
528  exit(0);
529  }
530  mElementEnrichmentItemIndices [ elPlaceInArray ].clear();
531  }
532 
533  int nEI = giveNumberOfEnrichmentItems();
534 
535  for ( int eiIndex = 1; eiIndex <= nEI; eiIndex++ ) {
536  EnrichmentItem *ei = giveEnrichmentItem(eiIndex);
537 
538  const std :: unordered_map< int, NodeEnrichmentType > &enrNodeInd = ei->giveEnrNodeMap();
539 
540  //for(size_t i = 0; i < enrNodeInd.size(); i++) {
541  for ( auto &nodeEiPair: enrNodeInd ) {
542  mNodeEnrichmentItemIndices [ nodeEiPair.first - 1 ].push_back(eiIndex);
543 
545  //const IntArray *nodeElements = ct->giveDofManConnectivityArray(nodeEiPair.first);
546  IntArray nodeElements;
547  IntArray nodeList = {
548  nodeEiPair.first
549  };
550  ct->giveNodeNeighbourList(nodeElements, nodeList);
551 
552  for ( int i = 1; i <= nodeElements.giveSize(); i++ ) {
553  int elInd = nodeElements.at(i);
554 
555  bool found = false;
556  for ( size_t j = 0; j < mElementEnrichmentItemIndices [ elInd ].size(); j++ ) {
557  if ( mElementEnrichmentItemIndices [ elInd ] [ j ] == eiIndex ) {
558  found = true;
559  break;
560  }
561  }
562 
563  if ( !found ) {
564  mElementEnrichmentItemIndices [ elInd ].push_back(eiIndex);
565  }
566  }
567  }
568  }
569 
570 
571 
572 
574  for ( int eiIndex = 1; eiIndex <= nEI; eiIndex++ ) {
575  EnrichmentItem *ei = giveEnrichmentItem(eiIndex);
576 
577  if ( ei->canModifyMaterial() ) {
578  mMaterialModifyingEnrItemIndices.push_back(eiIndex);
579  }
580  }
581 }
582 
583 void XfemManager :: giveElementEnrichmentItemIndices(std :: vector< int > &oElemEnrInd, int iElementIndex) const
584 {
585  auto res = mElementEnrichmentItemIndices.find(iElementIndex);
586  if ( res != mElementEnrichmentItemIndices.end() ) {
587  oElemEnrInd = res->second;
588  }
589 }
590 } // end namespace oofem
void setField(int item, InputFieldType id)
std::vector< std::unique_ptr< NucleationCriterion > > mNucleationCriteria
Nucleation of new enrichment items.
Definition: xfemmanager.h:157
const std::unordered_map< int, NodeEnrichmentType > & giveEnrNodeMap() const
bool isElementEnriched(const Element *element) const
virtual ~XfemManager()
Destructor.
Definition: xfemmanager.C:83
IntArray mXFEMPotentialDofIDs
Definition: xfemmanager.h:160
Abstract class representing entity, which is included in the FE model using one (or more) global func...
void clearEnrichmentItems()
Remove all enrichment items.
Definition: xfemmanager.C:461
Class and object Domain.
Definition: domain.h:115
void giveSubPolygon(std::vector< FloatArray > &oPoints, const double &iXiStart, const double &iXiEnd) const
EnrichmentItem * createEnrichmentItem(const char *name, int num, XfemManager *xm, Domain *domain)
Definition: classfactory.C:281
virtual void giveInputRecord(DynamicInputRecord &input)
Definition: xfemmanager.C:188
virtual void updateYourself(TimeStep *tStep)
Update enrichment items (level sets).
Definition: xfemmanager.C:329
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
Definition: domain.h:432
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
bool hasInitiationCriteria()
Definition: xfemmanager.C:450
std::vector< int > mMaterialModifyingEnrItemIndices
Keep track of enrichment items that may assign a different material to some Gauss points...
Definition: xfemmanager.h:152
int giveGlobalNumber() const
Definition: element.h:1059
InternalStateValueType giveXFEMStateValueType(XFEMStateType type)
Definition: xfemmanager.C:88
void giveElementEnrichmentItemIndices(std::vector< int > &oElemEnrInd, int iElementIndex) const
Definition: xfemmanager.C:583
virtual const char * giveInputRecordName() const =0
virtual void propagateFronts(bool &oAnyFronHasPropagated)
Definition: xfemmanager.C:339
ConnectivityTable * giveConnectivityTable()
Returns receiver&#39;s associated connectivity table.
Definition: domain.C:1170
void setDomain(Domain *ipDomain)
Definition: xfemmanager.C:259
bool insertSortedOnce(int value, int allocChunk=0)
Inserts given value into a receiver, which is assumed to be sorted.
Definition: intarray.C:360
Delamination.
Definition: delamination.h:58
contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores the state of receiver to output stream.
Definition: xfemmanager.C:268
static void setCharacteristicElementLength(double iCharElLength)
Abstract base class for all finite elements.
Definition: element.h:145
InternalStateValueType
Determines the type of internal variable.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: femcmpnn.C:51
Base class for dof managers.
Definition: dofmanager.h:113
General IO error.
Class representing the abstraction for input data source.
Definition: datareader.h:50
int giveNumberOfElements() const
Returns number of elements in domain.
Definition: domain.h:434
virtual const char * giveInputRecordName() const
Definition: xfemmanager.h:200
int mNumTriRef
The number of times a subtriangle should be refined.
Definition: xfemmanager.h:129
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
virtual void report_error(const char *_class, const char *proc, InputFieldType id, IRResultType result, const char *file, int line)=0
Prints the error message.
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
void sort()
Sorts array.
Definition: intarray.C:420
#define _IFT_XfemManager_VTKExport
Definition: xfemmanager.h:65
bool giveVtkDebug() const
Definition: xfemmanager.h:243
int giveNumberOfEnrichmentItems() const
Definition: xfemmanager.h:185
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
const IntArray & giveDofManArray() const
Definition: element.h:592
std::vector< std::unique_ptr< EnrichmentItem > > enrichmentItemList
Enrichment item list.
Definition: xfemmanager.h:114
bool hasPropagatingFronts()
Definition: xfemmanager.C:439
virtual const char * giveClassName() const
Definition: xfemmanager.h:199
Element * giveElement(int n)
Service for accessing particular domain fe element.
Definition: domain.C:160
int numberOfNucleationCriteria
Definition: xfemmanager.h:118
virtual IRResultType giveRecordKeywordField(std::string &answer, int &value)=0
Reads the record id field (type of record) and its corresponding number.
virtual bool canModifyMaterial() const
contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the state of receiver from output stream.
Definition: xfemmanager.C:295
#define OOFEM_ERROR(...)
Definition: error.h:61
void clear()
Clears the array (zero size).
Definition: intarray.h:177
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
static void WriteArrayToGnuplot(const std::string &iName, const std::vector< double > &iX, const std::vector< double > &iY)
std::unordered_map< int, std::vector< int > > mElementEnrichmentItemIndices
Definition: xfemmanager.h:146
Set of elements, boundaries, edges and/or nodes.
Definition: set.h:66
int giveNumberOfCrossSectionModels() const
Returns number of cross section models in domain.
Definition: domain.h:438
Class representing connectivity table.
Set * giveSet(int n)
Service for accessing particular domain set.
Definition: domain.C:363
REGISTER_XfemManager(XfemManager)
Definition: xfemmanager.C:59
void resize(int n)
Checks size of receiver towards requested bounds.
Definition: intarray.C:124
void updateNodeEnrichmentItemMap()
Definition: xfemmanager.C:513
virtual InputRecord * giveInputRecord(InputRecordType irType, int recordId)=0
Returns input record corresponding to given InputRecordType value and its record_id.
#define _IFT_XfemManager_numberOfGpPerTri
Definition: xfemmanager.h:57
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: xfemmanager.C:154
int findSorted(int value) const
Finds the first occurrence of given value, assuming that the receiver is sorted.
Definition: intarray.C:344
bool hasDofID(DofIDItem id) const
Checks if receiver contains dof with given ID.
Definition: dofmanager.C:166
This class manages the xfem part.
Definition: xfemmanager.h:109
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
void giveNodeNeighbourList(IntArray &answer, IntArray &nodeList)
Returns list of elements sharing given nodes.
IntArray vtkExportFields
List with the fields that should be exported to VTK.
Definition: xfemmanager.h:167
int giveNumberOfNucleationCriteria() const
Definition: xfemmanager.h:188
void appendEnrichmentItems(std::vector< std::unique_ptr< EnrichmentItem > > &iEIlist)
Definition: xfemmanager.C:467
Class representing the general Input Record.
Definition: inputrecord.h:101
NucleationCriterion * createNucleationCriterion(const char *name, Domain *domain)
Definition: classfactory.C:291
bool isElementEnriched(const Element *elem)
Definition: xfemmanager.C:104
XFEMStateType
Definition: xfemmanager.h:92
void followedBy(const IntArray &b, int allocChunk=0)
Appends array b at the end of receiver.
Definition: intarray.C:145
bool mDebugVTK
If extra debug vtk files should be written.
Definition: xfemmanager.h:139
virtual int instanciateYourself(DataReader &dr)
Definition: xfemmanager.C:210
Class representing the a dynamic Input Record.
EnrichmentItem * giveEnrichmentItem(int n)
Definition: xfemmanager.h:184
ClassFactory & classFactory
Definition: classfactory.C:59
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
#define _IFT_XfemManager_VTKExportFields
Definition: xfemmanager.h:66
#define CM_Definition
Definition: contextmode.h:47
int giveElementPlaceInArray(int iGlobalElNum) const
Returns the array index of the element with global number iGlobalElNum, so that it can be fetched by ...
Definition: domain.C:183
int mNumGpPerTri
The number of Gauss points to be used in each sub-triangle when subdividing cut elements.
Definition: xfemmanager.h:124
void setRecordKeywordField(std::string keyword, int number)
void nucleateEnrichmentItems(bool &oNewItemsWereNucleated)
Definition: xfemmanager.C:477
#define _IFT_XfemManager_numberOfNucleationCriteria
Definition: xfemmanager.h:56
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: femcmpnn.C:64
bool hasNucleationCriteria()
Definition: xfemmanager.C:508
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
int giveSize() const
Definition: intarray.h:203
#define _IFT_XfemManager_enrDofScaleFac
Definition: xfemmanager.h:62
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define _IFT_XfemManager_debugVTK
Definition: xfemmanager.h:64
const IntArray & giveEnrichedDofIDs() const
Definition: xfemmanager.h:191
Domain * giveDomain()
Definition: xfemmanager.h:202
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
void createEnrichedDofs()
Definition: xfemmanager.C:127
int findCommonValuesSorted(const IntArray &iarray, IntArray &common, int allocChunk=0) const
Extracts common values in receiver and iarray.
Definition: intarray.C:383
std::vector< std::vector< int > > mNodeEnrichmentItemIndices
Let the XfemManager keep track of enrichment items enriching each node and each element, to allow more efficient computations.
Definition: xfemmanager.h:145
Class representing solution step.
Definition: timestep.h:80
const IntArray & giveElementList()
Returns list of elements within set.
Definition: set.C:138
#define _IFT_XfemManager_numberOfEnrichmentItems
Definition: xfemmanager.h:55
EnrichmentItem with geometry described by BasicGeometry.
void initiateFronts(bool &oAnyFronHasPropagated, TimeStep *tStep)
Definition: xfemmanager.C:376
#define _IFT_XfemManager_numberOfTriRefs
How many times a subtriangle should be refined.
Definition: xfemmanager.h:60

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