OOFEM 3.0
Loading...
Searching...
No Matches
xfemsolverinterface.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 - 2025 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
41#include "timestep.h"
42#include "structengngmodel.h"
43#include "staticstructural.h"
44#include "primaryfield.h"
45#include "domain.h"
46#include "xfem/xfemmanager.h"
47#include "element.h"
48#include "matstatmapperint.h"
49#include "nummet.h"
50#include "floatarray.h"
51#include "exportmodulemanager.h"
52#include "vtkxmlexportmodule.h"
53
54namespace oofem {
55
59
60void XfemSolverInterface::propagateXfemInterfaces(TimeStep *tStep, StructuralEngngModel &ioEngngModel, bool iRecomputeStepAfterCrackProp)
61{
62 int domainInd = 1;
63 Domain *domain = ioEngngModel.giveDomain(domainInd);
64
65 if ( domain->hasXfemManager() ) {
66 XfemManager *xMan = domain->giveXfemManager();
67 bool frontsHavePropagated = false;
68 if ( xMan->hasInitiationCriteria() ) {
69 // TODO: generalise this?
70 // Intitiate delaminations (only implemented for listbasedEI/delamination. Treated the same way as propagation)
71 xMan->initiateFronts(frontsHavePropagated,tStep);
72 }
73
74 if ( xMan->hasPropagatingFronts() ) {
75 // Propagate crack tips
76 xMan->propagateFronts(frontsHavePropagated);
77 }
78
79 bool eiWereNucleated = false;
80 if ( xMan->hasNucleationCriteria() ) {
81 xMan->nucleateEnrichmentItems(eiWereNucleated);
82 }
83
84 for ( auto &elem : domain->giveElements() ) {
86 // Map state variables for enriched elements
87 XfemElementInterface *xfemElInt = dynamic_cast< XfemElementInterface * >( elem.get() );
88
89 if ( xfemElInt ) {
91 }
92 }
93
94 if ( frontsHavePropagated || eiWereNucleated ) {
96
97 ioEngngModel.giveDomain(1)->postInitialize();
98 ioEngngModel.forceEquationNumbering();
99
100 if ( iRecomputeStepAfterCrackProp ) {
101 OOFEM_LOG_RELEVANT("Recomputing time step.\n");
102 ioEngngModel.forceEquationNumbering();
103 ioEngngModel.solveYourselfAt(tStep);
104 ioEngngModel.updateYourself( tStep );
105 ioEngngModel.terminate( tStep );
106 }
107 }
108 }
109}
110
111
112} /* namespace oofem */
void postInitialize()
Definition domain.C:1023
std ::vector< std ::unique_ptr< Element > > & giveElements()
Definition domain.h:294
XfemManager * giveXfemManager()
Definition domain.C:378
bool hasXfemManager()
Definition domain.C:389
virtual void solveYourselfAt(TimeStep *tStep)
Definition engngm.h:484
Domain * giveDomain(int n)
Definition engngm.C:1936
virtual int forceEquationNumbering(int i)
Definition engngm.C:469
void updateYourself(TimeStep *tStep) override
void terminate(TimeStep *tStep) override
virtual bool XfemElementInterface_updateIntegrationRule()
Updates integration rule based on the triangulation.
virtual void propagateFronts(bool &oAnyFronHasPropagated)
bool hasPropagatingFronts()
bool hasInitiationCriteria()
void initiateFronts(bool &oAnyFronHasPropagated, TimeStep *tStep)
void nucleateEnrichmentItems(bool &oNewItemsWereNucleated)
bool hasNucleationCriteria()
void propagateXfemInterfaces(TimeStep *tStep, StructuralEngngModel &ioEngngModel, bool iRecomputeStepAfterCrackProp)
#define OOFEM_LOG_RELEVANT(...)
Definition logger.h:142

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011