OOFEM 3.0
Loading...
Searching...
No Matches
q9planstrss.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 "fei2dquadbiquad.h"
37#include "crosssection.h"
38#include "gausspoint.h"
40#include "floatmatrix.h"
41#include "floatarray.h"
42#include "intarray.h"
43#include "mathfem.h"
44#include "classfactory.h"
45
46namespace oofem {
48
49FEI2dQuadBiQuad Q9PlaneStress2d :: interpolation(1, 2);
50
51Q9PlaneStress2d :: Q9PlaneStress2d(int n, Domain *aDomain) :
53{
56}
57
58
60Q9PlaneStress2d :: giveInterpolation() const { return & interpolation; }
61
62
64Q9PlaneStress2d :: giveInterface(InterfaceType interface)
65{
66 if ( interface == ZZNodalRecoveryModelInterfaceType ) {
67 return static_cast< ZZNodalRecoveryModelInterface * >(this);
68 } else if ( interface == NodalAveragingRecoveryModelInterfaceType ) {
69 return static_cast< NodalAveragingRecoveryModelInterface * >(this);
70 }
71
72 return NULL;
73}
74
75
76void
77Q9PlaneStress2d :: NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node,
78 InternalStateType type, TimeStep *tStep)
79{
80 if ( numberOfGaussPoints != 4 ) {
81 return;
82 }
83
84 GaussPoint *gp;
85
86 if ( node < 5 ) {
87 int i = 0;
88 switch ( node ) {
89 case 1: i = 4;
90 break;
91 case 2: i = 2;
92 break;
93 case 3: i = 1;
94 break;
95 case 4: i = 3;
96 break;
97 }
98
99 gp = integrationRulesArray [ 0 ]->getIntegrationPoint(i - 1);
100 this->giveIPValue(answer, gp, type, tStep);
101 } else {
102 int i1 = 0, i2 = 0;
103 switch ( node ) {
104 case 5: i1 = 4;
105 i2 = 2;
106 break;
107 case 6: i1 = 2;
108 i2 = 1;
109 break;
110 case 7: i1 = 1;
111 i2 = 3;
112 break;
113 case 8: i1 = 3;
114 i2 = 4;
115 break;
116 }
117
118 FloatArray contrib;
119 gp = integrationRulesArray [ 0 ]->getIntegrationPoint(i1 - 1);
120 this->giveIPValue(contrib, gp, type, tStep);
121 gp = integrationRulesArray [ 0 ]->getIntegrationPoint(i2 - 1);
122 this->giveIPValue(answer, gp, type, tStep);
123 answer.add(contrib);
124 answer.times(0.5);
125 }
126}
127
128
129} // end namespace oofem
#define REGISTER_Element(class)
int numberOfDofMans
Number of dofmanagers.
Definition element.h:136
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition element.h:157
int numberOfGaussPoints
Definition element.h:175
void add(const FloatArray &src)
Definition floatarray.C:218
void times(double s)
Definition floatarray.C:834
PlaneStressElement(int n, Domain *d)
static FEI2dQuadBiQuad interpolation
Definition q9planstrss.h:56
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
@ ZZNodalRecoveryModelInterfaceType
@ NodalAveragingRecoveryModelInterfaceType

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