OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
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 - 2013 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"
39 #include "gaussintegrationrule.h"
40 #include "floatmatrix.h"
41 #include "floatarray.h"
42 #include "intarray.h"
43 #include "mathfem.h"
44 #include "classfactory.h"
45 
46 namespace oofem {
47 REGISTER_Element(Q9PlaneStress2d);
48 
49 FEI2dQuadBiQuad Q9PlaneStress2d :: interpolation(1, 2);
50 
53 {
54  numberOfDofMans = 9;
56 }
57 
58 
61 
62 
63 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 
76 void
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
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The element interface required by NodalAvergagingRecoveryModel.
static FEI2dQuadBiQuad interpolation
Definition: q9planstrss.h:56
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
Class and object Domain.
Definition: domain.h:115
The element interface required by ZZNodalRecoveryModel.
Q9PlaneStress2d(int n, Domain *d)
Definition: q9planstrss.C:51
virtual FEInterpolation * giveInterpolation() const
Definition: q9planstrss.C:60
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
REGISTER_Element(LSpace)
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
Definition: q9planstrss.C:64
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
Definition: q9planstrss.C:77
int numberOfGaussPoints
Number of integration points as specified by nip.
Definition: element.h:188
Class representing vector of real numbers.
Definition: floatarray.h:82
Class Interface.
Definition: interface.h:82
void times(double s)
Multiplies receiver with scalar.
Definition: floatarray.C:818
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
Definition: element.h:170
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
int numberOfDofMans
Number of dofmanagers.
Definition: element.h:149
void add(const FloatArray &src)
Adds array src to receiver.
Definition: floatarray.C:156

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011