OOFEM
3.0
Loading...
Searching...
No Matches
src
sm
EngineeringModels
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
35
#include "
sm/EngineeringModels/xfemsolverinterface.h
"
36
#include "
sm/Elements/structuralelement.h
"
37
#include "
sm/Materials/InterfaceMaterials/structuralinterfacematerial.h
"
38
#include "
sm/Materials/InterfaceMaterials/structuralinterfacematerialstatus.h
"
39
#include "
sm/xfem/xfemstructuralelementinterface.h
"
40
#include "
sm/mappers/primvarmapper.h
"
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
54
namespace
oofem
{
55
56
XfemSolverInterface::XfemSolverInterface
() :
57
mNeedsVariableMapping
(false)
58
{ }
59
60
void
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 ) {
90
xfemElInt->
XfemElementInterface_updateIntegrationRule
();
91
}
92
}
93
94
if
( frontsHavePropagated || eiWereNucleated ) {
95
mNeedsVariableMapping
=
false
;
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 */
oofem::Domain
Definition
domain.h:121
oofem::Domain::postInitialize
void postInitialize()
Definition
domain.C:1023
oofem::Domain::giveElements
std ::vector< std ::unique_ptr< Element > > & giveElements()
Definition
domain.h:294
oofem::Domain::giveXfemManager
XfemManager * giveXfemManager()
Definition
domain.C:378
oofem::Domain::hasXfemManager
bool hasXfemManager()
Definition
domain.C:389
oofem::EngngModel::solveYourselfAt
virtual void solveYourselfAt(TimeStep *tStep)
Definition
engngm.h:484
oofem::EngngModel::giveDomain
Domain * giveDomain(int n)
Definition
engngm.C:1936
oofem::EngngModel::forceEquationNumbering
virtual int forceEquationNumbering(int i)
Definition
engngm.C:469
oofem::StructuralEngngModel
Definition
structengngmodel.h:87
oofem::StructuralEngngModel::updateYourself
void updateYourself(TimeStep *tStep) override
Definition
structengngmodel.C:236
oofem::StructuralEngngModel::terminate
void terminate(TimeStep *tStep) override
Definition
structengngmodel.C:139
oofem::TimeStep
Definition
timestep.h:82
oofem::XfemElementInterface
Definition
xfemelementinterface.h:65
oofem::XfemElementInterface::XfemElementInterface_updateIntegrationRule
virtual bool XfemElementInterface_updateIntegrationRule()
Updates integration rule based on the triangulation.
Definition
xfemelementinterface.C:392
oofem::XfemManager
Definition
xfemmanager.h:110
oofem::XfemManager::propagateFronts
virtual void propagateFronts(bool &oAnyFronHasPropagated)
Definition
xfemmanager.C:336
oofem::XfemManager::hasPropagatingFronts
bool hasPropagatingFronts()
Definition
xfemmanager.C:441
oofem::XfemManager::hasInitiationCriteria
bool hasInitiationCriteria()
Definition
xfemmanager.C:452
oofem::XfemManager::initiateFronts
void initiateFronts(bool &oAnyFronHasPropagated, TimeStep *tStep)
Definition
xfemmanager.C:373
oofem::XfemManager::nucleateEnrichmentItems
void nucleateEnrichmentItems(bool &oNewItemsWereNucleated)
Definition
xfemmanager.C:479
oofem::XfemManager::hasNucleationCriteria
bool hasNucleationCriteria()
Definition
xfemmanager.C:511
oofem::XfemSolverInterface::mNeedsVariableMapping
bool mNeedsVariableMapping
Definition
xfemsolverinterface.h:56
oofem::XfemSolverInterface::propagateXfemInterfaces
void propagateXfemInterfaces(TimeStep *tStep, StructuralEngngModel &ioEngngModel, bool iRecomputeStepAfterCrackProp)
Definition
xfemsolverinterface.C:60
oofem::XfemSolverInterface::XfemSolverInterface
XfemSolverInterface()
Definition
xfemsolverinterface.C:56
domain.h
element.h
exportmodulemanager.h
floatarray.h
OOFEM_LOG_RELEVANT
#define OOFEM_LOG_RELEVANT(...)
Definition
logger.h:142
matstatmapperint.h
oofem
Definition
additivemanufacturingproblem.C:83
nummet.h
primaryfield.h
primvarmapper.h
staticstructural.h
structengngmodel.h
structuralelement.h
structuralinterfacematerial.h
structuralinterfacematerialstatus.h
timestep.h
vtkxmlexportmodule.h
xfemmanager.h
xfemsolverinterface.h
xfemstructuralelementinterface.h
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