OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
quad2platesubsoil.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 - 2014 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/quad2platesubsoil.h"
36 #include "fei2dquadquad.h"
37 #include "crosssection.h"
38 #include "gausspoint.h"
39 #include "gaussintegrationrule.h"
40 #include "classfactory.h"
41 
42 namespace oofem {
43 REGISTER_Element(Quad2PlateSubSoil);
44 
45 FEI2dQuadQuad Quad2PlateSubSoil :: interp_quad(1, 2);
46 
48  Quad1PlateSubSoil(n, aDomain)
49 {
51  numberOfDofMans = 8;
52 }
53 
54 
57 
58 
61 {
62  return & interp_quad;
63 }
64 
65 
66 void
68 // Sets up the array containing the four Gauss points of the receiver.
69 {
70  if ( integrationRulesArray.size() == 0 ) {
71  integrationRulesArray.resize( 1 );
72  integrationRulesArray [ 0 ].reset( new GaussIntegrationRule(1, this, 1, 5) );
74  }
75 }
76 
77 
78 
79 void
81 // Returns the [3x8] strain-displacement matrix {B} of the receiver,
82 // evaluated at gp.
83 {
84  FloatArray n;
85  FloatMatrix dn;
86 
89 
90  answer.resize(3, 8);
91  answer.zero();
92 
94  for ( int i = 0; i < 8; ++i ) {
95  answer(0, i) = n(i); // eps_z
96  answer(1, i) = dn(i, 0); // gamma_xz
97  answer(2, i) = dn(i, 1); // gamma_yz
98  }
99 }
100 
101 
104 {
105  this->numberOfGaussPoints = 4;
107 }
108 
109 
110 void
112 {
113  pap.resize(8);
114  for ( int i = 1; i < 8; i++ ) {
115  pap.at(i) = this->giveNode(i)->giveNumber();
116  }
117 }
118 
119 void
121 {
122  int found = 0;
123  answer.resize(1);
124 
125  for ( int i = 1; i <= 8; i++ ) {
126  if ( pap == this->giveNode(i)->giveNumber() ) {
127  found = 1;
128  }
129  }
130 
131  if ( found ) {
132  answer.at(1) = pap;
133  } else {
134  OOFEM_ERROR("node %d not found on element %d", pap, this->giveNumber());
135  }
136 }
137 
138 
139 } // end namespace oofem
CrossSection * giveCrossSection()
Definition: element.C:495
Class and object Domain.
Definition: domain.h:115
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
virtual void SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap)
This class implements an quadrilateral four-node plate subsoil element in xy plane.
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual FEInterpolation * giveInterpolation() const
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
#define OOFEM_ERROR(...)
Definition: error.h:61
REGISTER_Element(LSpace)
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
Wrapper around element definition to provide FEICellGeometry interface.
Definition: feinterpol.h:95
void resize(int n)
Checks size of receiver towards requested bounds.
Definition: intarray.C:124
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
Definition: crosssection.C:54
int numberOfGaussPoints
Number of integration points as specified by nip.
Definition: element.h:188
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Quad2PlateSubSoil(int n, Domain *d)
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
Definition: fei2dquadquad.C:84
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
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
the oofem namespace is to define a context or scope in which all oofem names are defined.
int giveNumber() const
Definition: femcmpnn.h:107
Node * giveNode(int i) const
Returns reference to the i-th node of element.
Definition: element.h:610
virtual void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap)
static FEI2dQuadQuad interp_quad
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
int numberOfDofMans
Number of dofmanagers.
Definition: element.h:149
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Definition: gausspoint.h:138
Class representing Gaussian-quadrature integration rule.

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:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011