OOFEM 3.0
Loading...
Searching...
No Matches
trplstrgraddamage.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 "fei2dtrlin.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
45#ifdef __OOFEG
46 #include "oofeggraphiccontext.h"
47#endif
48
49namespace oofem {
51
52
53IntArray TrPlaneStressGradDamage :: locationArray_u = {1, 2, 4, 5, 7, 8};
54IntArray TrPlaneStressGradDamage :: locationArray_d = {3, 6, 9};
55
56FEI2dTrLin TrPlaneStressGradDamage :: interpolation_lin(1, 2);
57
58TrPlaneStressGradDamage :: TrPlaneStressGradDamage(int n, Domain *aDomain) : TrPlaneStress2d(n, aDomain), GradientDamageElement()
59 // Constructor.
60{
61 nPrimNodes = 3;
62 nPrimVars = 2;
63 nSecNodes = 3;
64 nSecVars = 1;
69}
70
71
72void
73TrPlaneStressGradDamage :: giveDofManDofIDMask(int inode, IntArray &answer) const
74
75{
76 answer = {D_u, D_v, G_0};
77}
78
79
80 void
81TrPlaneStressGradDamage :: giveDofManDofIDMask_u(IntArray &answer) const
82{
83 answer = {D_u, D_v};
84}
85
86
87void
88TrPlaneStressGradDamage :: giveDofManDofIDMask_d(IntArray &answer) const
89{
90 answer = {G_0};
91}
92
93
94
95
96
97void
98TrPlaneStressGradDamage :: initializeFrom(InputRecord &ir, int priority)
99{
100 TrPlaneStress2d :: initializeFrom(ir, priority);
101}
102
103
104void
105TrPlaneStressGradDamage :: computeGaussPoints()
106{
107 if ( integrationRulesArray.size() == 0 ) {
108 integrationRulesArray.resize( 1 );
109 integrationRulesArray [ 0 ].reset( new GaussIntegrationRule(1, this, 1, 3) );
110 this->giveCrossSection()->setupIntegrationPoints(* integrationRulesArray [ 0 ], numberOfGaussPoints, this);
111 }
112}
113
114void
115TrPlaneStressGradDamage :: computeNdMatrixAt(GaussPoint *gp, FloatArray &answer)
116{
117 this->interpolation_lin.evalN( answer, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
118}
119
120void
121TrPlaneStressGradDamage :: computeBdMatrixAt(GaussPoint *gp, FloatMatrix &answer)
122{
123 FloatMatrix dnx;
124 this->interpolation_lin.evaldNdx( dnx, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
125 answer.beTranspositionOf(dnx);
126}
127
128
129void
130TrPlaneStressGradDamage :: giveLocationArray_u(IntArray &answer)
131{
132 answer = locationArray_u;
133}
134
135
136void
137TrPlaneStressGradDamage :: giveLocationArray_d(IntArray &answer)
138{
139 answer = locationArray_d;
140}
141
142
143
144void
145TrPlaneStressGradDamage :: postInitialize()
146{
148 NLStructuralElement :: postInitialize();
149}
150
151
152
153
154} // end namespace oofem
155
#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
TrPlaneStress2d(int n, Domain *d)
Definition trplanstrss.C:58

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