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

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