60 mpEnrichesDofsWithIdArray = {
61 D_u, D_v, D_w, W_u, W_v, W_w
63 this->interfaceNum.clear();
64 this->crossSectionNum.clear();
66 this->xiBottom = -1.0;
68 this->initiationFactor = 1e6;
69 this->initiationRadius = 0.0;
70 this->recoverStresses =
true;
86 OOFEM_ERROR(
"failed to create enrichment function (%s)", name.c_str() );
98 for (
int i = 1; i <= idList.
giveSize(); i++ ) {
102 std :: sort(
dofManList.begin(), this->dofManList.end() );
113 std::string enrFrontName;
114 efIr.giveRecordKeywordField(enrFrontName);
115 auto ef =
classFactory.createEnrichmentFront( enrFrontName.c_str() );
117 assert(i==0 || i==1);
118 ef->initializeFrom(efIr);
121 OOFEM_ERROR(
"Failed to create enrichment front (%s)", enrFrontName.c_str() );
132 std :: string propLawName;
141 OOFEM_ERROR(
"Failed to create propagation law (%s)", propLawName.c_str() );
155void Delamination :: postInitialize() {
167 OOFEM_ERROR(
"UpdateGeometry in Delamination not used" );
170 if ( fc->
hasFailed( this->giveNumber() ) ) {
183 if ( dof->hasBc(tStep) ) {
195 for (
int i = 1; i <= dofManNumbers.
giveSize(); i++ ) {
197 std :: vector< int > :: iterator p;
198 p = std :: find( this->dofManList.begin(), this->dofManList.end(), dofManNumbers.
at(i) );
199 if ( p == this->dofManList.end() ) {
200 this->dofManList.push_back( dofManNumbers.
at(i) );
204 std :: sort( dofManList.begin(), this->dofManList.end() );
210Delamination :: hasInitiationCriteria()
221Delamination :: propagateFronts(
bool &oFrontsHavePropagated)
223 oFrontsHavePropagated =
false;
244 bool printed =
false;
245 for (
int inode : propNodes ) {
247 std :: vector< int > :: iterator p;
248 p = std :: find( this->
dofManList.begin(), this->dofManList.end(), inode );
251 printf(
"\n Enrichment %i - The following nodes will be expanded to:",this->
giveNumber());
254 printf(
" %i", inode );
260 std :: sort(
dofManList.begin(), this->dofManList.end() );
262 oFrontsHavePropagated =
true;
270Delamination :: findInitiationFronts(
bool &failureChecked,
const IntArray &CSnumbers, std :: vector< IntArray > &CSinterfaceNumbers, std :: vector< IntArray > &CSDofManNumbers, std :: vector< FloatArray > &initiationFactors,
TimeStep *tStep)
282 for (
int iCS = 1 ; iCS <= CSnumbers.
giveSize() ; iCS++ ) {
284 int eltSetNumber = this->
giveDomain()->giveCrossSection(CSnumbers.
at(iCS))->giveSetNumber();
286 IntArray elementNumbers = this->
giveDomain()->giveSet(eltSetNumber)->giveElementList();
288 for (
auto eltNumber : elementNumbers ) {
294 shellElt->giveFailedInterfaceNumber(failedElementInterfaces, initiationFactors[iCS-1], tStep, this->
recoverStresses);
296 for (
int eltInt : failedElementInterfaces ) {
297 CSinterfaceNumbers[iCS-1].insertSortedOnce(eltInt);
299 if ( !failedElementInterfaces.isEmpty() ) {
300 for (
int iDF : shellElt->giveDofManArray() ) {
303 const auto &gCoords = this->
giveDomain()->giveNode(iDF)->giveCoordinates();
304 std :: list< int > nodeList;
307 for (
int jNode : nodeList ) {
309 CSDofManNumbers[iCS-1].insertSortedOnce(jNode);
312 CSDofManNumbers[iCS-1].insertSortedOnce(iDF);
320 failureChecked =
true;
324void Delamination :: evaluateEnrFuncAt(std :: vector< double > &oEnrFunc,
const FloatArray &iGlobalCoord,
const FloatArray &iLocalCoord,
int iNodeInd,
const Element &iEl)
const
326 if ( iLocalCoord.
giveSize() != 3 ) {
332 oEnrFunc.resize(1, 0.0);
333 mpEnrichmentFunc->evaluateEnrFuncAt(oEnrFunc [ 0 ], iGlobalCoord, levelSet);
345 EnrichmentItem :: initializeFrom(ir);
357 bool checkCS =
false;
358 double totalThickness(0.0);
359 std::vector<double> layerThicknesses;
360 int numberOfLayers(0);
365 }
else if ( this->
interfaceNum.giveSize() < 1 || this->interfaceNum.giveSize() > 2 ) {
371 for (
int i = 1; i <= this->
interfaceNum.giveSize(); i++ ) {
389 for (
int i = 1 ; i <= numberOfLayers ; i++) {
392 if ( layerThickness != layerThicknesses[i-1] ) {
395 layerThicknesses[i-1] = layerThickness;
410 if ( this->
interfaceNum.at(1) >= this->interfaceNum.at(2) ) {
427 }
else if ( this->
interfaceNum.giveSize() < 1 || this->interfaceNum.giveSize() > 2 ) {
433 for (
int i = 1; i <= this->
interfaceNum.giveSize(); i++ ) {
448 if ( this->
interfaceNum.at(1) >= this->interfaceNum.at(2) ) {
481 auto eiRec = std::make_unique<DynamicInputRecord>();
482 FEMComponent :: giveInputRecord(* eiRec);
501 auto efRec = std::make_unique<DynamicInputRecord>();
508 auto geoRec = std::make_unique<DynamicInputRecord>();
513 for (
size_t i = 0; i <
dofManList.size(); i++ ) {
523 auto efrRecStart = std::make_unique<DynamicInputRecord>();
527 auto efrRecEnd = std::make_unique<DynamicInputRecord>();
534 auto plRec = std::make_unique<DynamicInputRecord>();
546void Delamination :: evaluateEnrFuncAt(std :: vector< double > &oEnrFunc,
const FloatArray &iPos,
const double &iLevelSet)
const
548 oEnrFunc.resize(1, 0.0);
#define REGISTER_EnrichmentItem(class)
int giveSetNumber() const
virtual InputRecord & giveInputRecord(InputRecordType irType, int recordId)=0
GroupRecords giveGroupRecords(const std::shared_ptr< InputRecord > &ir, InputFieldType ift, const std::string &name, InputRecordType irType, bool optional)
static constexpr const char * InputRecordTags[]
InputRecord * giveChildRecord(const std::shared_ptr< InputRecord > &ir, InputFieldType ift, const std::string &name, InputRecordType irType, bool optional)
Return pointer to subrecord of given type (must be exactly one); if not present, returns nullptr.
const char * giveInputRecordName() const override
double giveDelamXiCoord() const
void evaluateEnrFuncAt(std ::vector< double > &oEnrFunc, const FloatArray &iGlobalCoord, const FloatArray &iLocalCoord, int iNodeInd, const Element &iEl) const override
IntArray giveDelamCrossSectionNum() const
Element * giveElement(int n)
CrossSection * giveCrossSection(int n)
void insertInputRecord(InputRecordType type, std::unique_ptr< InputRecord > record)
const IntArray & giveDofManArray() const
virtual int giveNumberOfDofManagers() const
DofManager * giveDofManager(int i) const
int mEnrFrontIndex
mEnrFrontIndex: nonzero if an enrichment front is present, zero otherwise.
std::unique_ptr< EnrichmentFront > mpEnrichmentFrontEnd
std::unique_ptr< EnrichmentFront > mpEnrichmentFrontStart
virtual int giveDofPoolSize() const
std::unique_ptr< EnrichmentFunction > mpEnrichmentFunc
int mPropLawIndex
mPropLawIndex: nonzero if a propagation law is present, zero otherwise.
std::shared_ptr< InputRecord > thisIr
std::unique_ptr< PropagationLaw > mpPropagationLaw
Domain * giveDomain() const
Index giveSize() const
Returns the size of receiver.
void followedBy(const IntArray &b, int allocChunk=0)
int findCommonValuesSorted(const IntArray &iarray, IntArray &common, int allocChunk=0) const
int giveNumberOfLayers() const
double giveLayerThickness(int layer) const
double give(CrossSectionProperty a, GaussPoint *gp) const override
void updateNodeEnrMarker(XfemManager &ixFemMan) override
std ::vector< int > dofManList
void updateGeometry() override
const IntArray & giveElementList()
virtual void giveAllNodesWithinBox(nodeContainerType &nodeList, const FloatArray &coords, const double radius)=0
#define _IFT_Delamination_interfacenum
#define _IFT_Delamination_CohesiveZoneMaterial
#define _IFT_Delamination_initiationRadius
#define _IFT_Delamination_initiationFactor
#define _IFT_Delamination_csnum
#define _IFT_Delamination_averageStresses
#define _IFT_EnrichmentItem_front
#define _IFT_EnrichmentItem_propagationlaw
#define _IFT_ListBasedEI_list
ClassFactory & classFactory
IntArray mPropagationDofManNumbers