OOFEM
3.0
Loading...
Searching...
No Matches
src
sm
Elements
GradientDamage
PlaneStress
qplanestressgraddamage.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/Elements/GradientDamage/PlaneStress/qplanestressgraddamage.h
"
36
#include "
fei2dquadlin.h
"
37
#include "
gausspoint.h
"
38
#include "
gaussintegrationrule.h
"
39
#include "
floatmatrix.h
"
40
#include "
floatarray.h
"
41
#include "
intarray.h
"
42
#include "
crosssection.h
"
43
#include "
classfactory.h
"
44
45
namespace
oofem
{
46
REGISTER_Element
(
QPlaneStressGradDamage
);
47
48
FEI2dQuadLin
QPlaneStressGradDamage :: interpolation_lin(1, 2);
49
IntArray
QPlaneStressGradDamage :: locationArray_u = {1,2, 4,5, 7,8, 10,11, 13,14,15,16,17,18,19,20};
50
IntArray QPlaneStressGradDamage :: locationArray_d = {3,6,9,12};
51
52
53
54
QPlaneStressGradDamage :: QPlaneStressGradDamage(
int
n,
Domain
*aDomain) :
QPlaneStress2d
(n, aDomain),
GradientDamageElement
()
55
// Constructor.
56
{
57
nPrimNodes
= 8;
58
nPrimVars
= 2;
59
nSecNodes
= 4;
60
nSecVars
= 1;
61
totalSize
=
nPrimVars
*
nPrimNodes
+
nSecVars
*
nSecNodes
;
62
locSize
=
nPrimVars
*
nPrimNodes
;
63
nlSize
=
nSecVars
*
nSecNodes
;
64
numberOfGaussPoints
= 4;
65
}
66
67
68
void
69
QPlaneStressGradDamage :: giveDofManDofIDMask(
int
inode,
IntArray
&answer)
const
70
{
71
if
( inode <= 4 ) {
72
answer = {D_u, D_v, G_0};
73
}
else
{
74
answer = {D_u, D_v};
75
}
76
}
77
78
79
80
void
81
QPlaneStressGradDamage :: giveDofManDofIDMask_u(
IntArray
&answer)
const
82
{
83
answer = {D_u, D_v};
84
}
85
86
87
void
88
QPlaneStressGradDamage :: giveDofManDofIDMask_d(
IntArray
&answer)
const
89
{
90
/*
91
if ( inode <= 4 ) {
92
answer = {G_0};
93
} else {
94
answer = {};
95
}
96
*/
97
}
98
99
100
101
102
void
103
QPlaneStressGradDamage :: initializeFrom(
InputRecord
&ir,
int
priority)
104
{
105
QPlaneStress2d :: initializeFrom(ir, priority);
106
}
107
108
109
void
110
QPlaneStressGradDamage :: computeGaussPoints()
111
{
112
if
(
integrationRulesArray
.size() == 0 ) {
113
integrationRulesArray
.resize( 1 );
114
integrationRulesArray
[ 0 ].reset(
new
GaussIntegrationRule
(1,
this
, 1, 3) );
115
this->
giveCrossSection
()->setupIntegrationPoints(*
integrationRulesArray
[ 0 ],
numberOfGaussPoints
,
this
);
116
}
117
}
118
119
void
120
QPlaneStressGradDamage :: computeNdMatrixAt(
GaussPoint
*gp,
FloatArray
&answer)
121
{
122
this->
interpolation_lin
.evalN(answer, gp->
giveNaturalCoordinates
(),
FEIElementGeometryWrapper
(
this
) );
123
}
124
125
void
126
QPlaneStressGradDamage :: computeBdMatrixAt(
GaussPoint
*gp,
FloatMatrix
&answer)
127
{
128
FloatMatrix
dnx;
129
this->
interpolation_lin
.evaldNdx( dnx, gp->
giveNaturalCoordinates
(),
FEIElementGeometryWrapper
(
this
) );
130
answer.
beTranspositionOf
(dnx);
131
}
132
133
void
134
QPlaneStressGradDamage :: giveLocationArray_u(
IntArray
&answer)
135
{
136
answer =
locationArray_u
;
137
}
138
139
140
void
141
QPlaneStressGradDamage :: giveLocationArray_d(
IntArray
&answer)
142
{
143
answer =
locationArray_d
;
144
}
145
146
147
void
148
QPlaneStressGradDamage :: postInitialize()
149
{
150
GradientDamageElement:: postInitialize
();
151
QPlaneStress2d :: postInitialize();
152
}
153
154
155
}
classfactory.h
REGISTER_Element
#define REGISTER_Element(class)
Definition
classfactory.h:131
oofem::Domain
Definition
domain.h:121
oofem::Element::integrationRulesArray
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition
element.h:157
oofem::Element::numberOfGaussPoints
int numberOfGaussPoints
Definition
element.h:175
oofem::Element::giveCrossSection
CrossSection * giveCrossSection()
Definition
element.C:534
oofem::FEI2dQuadLin
Definition
fei2dquadlin.h:46
oofem::FEIElementGeometryWrapper
Definition
feinterpol.h:108
oofem::FloatArray
Definition
floatarray.h:92
oofem::FloatMatrix
Definition
floatmatrix.h:87
oofem::FloatMatrix::beTranspositionOf
void beTranspositionOf(const FloatMatrix &src)
Definition
floatmatrix.C:351
oofem::GaussIntegrationRule
Definition
gaussintegrationrule.h:60
oofem::GaussPoint
Definition
gausspoint.h:95
oofem::GaussPoint::giveNaturalCoordinates
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition
gausspoint.h:138
oofem::GradientDamageElement::nlSize
int nlSize
Definition
graddamageelement.h:60
oofem::GradientDamageElement::postInitialize
virtual void postInitialize()
Definition
graddamageelement.C:612
oofem::GradientDamageElement::nSecVars
int nSecVars
Definition
graddamageelement.h:59
oofem::GradientDamageElement::GradientDamageElement
GradientDamageElement()
Definition
graddamageelement.C:59
oofem::GradientDamageElement::nPrimVars
int nPrimVars
Definition
graddamageelement.h:59
oofem::GradientDamageElement::totalSize
int totalSize
Definition
graddamageelement.h:60
oofem::GradientDamageElement::nPrimNodes
int nPrimNodes
Definition
graddamageelement.h:59
oofem::GradientDamageElement::nSecNodes
int nSecNodes
Definition
graddamageelement.h:59
oofem::GradientDamageElement::locSize
int locSize
Definition
graddamageelement.h:60
oofem::InputRecord
Definition
inputrecord.h:98
oofem::IntArray
Definition
intarray.h:63
oofem::QPlaneStress2d::QPlaneStress2d
QPlaneStress2d(int n, Domain *d)
Definition
qplanstrss.C:55
oofem::QPlaneStressGradDamage
Definition
qplanestressgraddamage.h:47
oofem::QPlaneStressGradDamage::interpolation_lin
static FEI2dQuadLin interpolation_lin
Definition
qplanestressgraddamage.h:51
oofem::QPlaneStressGradDamage::locationArray_d
static IntArray locationArray_d
Definition
qplanestressgraddamage.h:50
oofem::QPlaneStressGradDamage::locationArray_u
static IntArray locationArray_u
Definition
qplanestressgraddamage.h:49
crosssection.h
fei2dquadlin.h
floatarray.h
floatmatrix.h
gaussintegrationrule.h
gausspoint.h
intarray.h
oofem
Definition
additivemanufacturingproblem.C:83
qplanestressgraddamage.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