OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
lspacebb.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 
35 #include "Elements/3D/lspacebb.h"
36 #include "fei3dhexalin.h"
37 #include "gausspoint.h"
38 #include "floatmatrix.h"
39 #include "floatarray.h"
40 #include "classfactory.h"
41 
42 #ifdef __OOFEG
43  #include "oofeggraphiccontext.h"
44  #include "oofegutils.h"
45 #endif
46 
47 namespace oofem {
48 REGISTER_Element(LSpaceBB);
49 
50 LSpaceBB :: LSpaceBB(int n, Domain *aDomain) : LSpace(n, aDomain)
51 { }
52 
53 void
55 // Returns the [6x24] strain-displacement matrix {B} of the receiver, eva-
56 // luated at gp.
57 // B matrix - 6 rows : epsilon-X, epsilon-Y, epsilon-Z, gamma-YZ, gamma-ZX, gamma-XY :
58 {
59  FloatMatrix dnx, dnx0;
60  FloatArray coord(3);
61 
62  answer.resize(6, 24);
63  answer.zero();
64  coord.zero();
65 
66 
69 
70  // deviatoric part fully integrated, volumetric part in one point
71  // here we follow BBar approach
72  //
73  // construct BB = B(gp) + Pv [B(0)-B(gp)]
74  // where Pv is volumetric projection mtrx
75  // B(gp) is original geometrical matrix evalueated at gp
76  // B(0) is geometrical matrix evalueated at centroid
77  //
78  // assemble Pv [B(0)-B(gp)]
79  for ( int i = 1; i <= 8; i++ ) {
80  answer.at(1, 3 * i - 2) = answer.at(2, 3 * i - 2) = answer.at(3, 3 * i - 2) = ( dnx0.at(i, 1) - dnx.at(i, 1) ) / 3.0;
81  answer.at(1, 3 * i - 1) = answer.at(2, 3 * i - 1) = answer.at(3, 3 * i - 1) = ( dnx0.at(i, 2) - dnx.at(i, 2) ) / 3.0;
82  answer.at(1, 3 * i - 0) = answer.at(2, 3 * i - 0) = answer.at(3, 3 * i - 0) = ( dnx0.at(i, 3) - dnx.at(i, 3) ) / 3.0;
83  }
84 
85  // add B(gp)
86  for ( int i = 1; i <= 8; i++ ) {
87  answer.at(1, 3 * i - 2) += dnx.at(i, 1);
88  answer.at(2, 3 * i - 1) += dnx.at(i, 2);
89  answer.at(3, 3 * i - 0) += dnx.at(i, 3);
90  }
91 
92  for ( int i = 1; i <= 8; i++ ) {
93  answer.at(4, 3 * i - 1) += dnx.at(i, 3);
94  answer.at(4, 3 * i - 0) += dnx.at(i, 2);
95 
96  answer.at(5, 3 * i - 2) += dnx.at(i, 3);
97  answer.at(5, 3 * i - 0) += dnx.at(i, 1);
98 
99  answer.at(6, 3 * i - 2) += dnx.at(i, 2);
100  answer.at(6, 3 * i - 1) += dnx.at(i, 1);
101  }
102 }
103 } // end namespace oofem
Class and object Domain.
Definition: domain.h:115
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
Definition: fei3dhexalin.C:63
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
Definition: lspacebb.C:54
LSpaceBB(int n, Domain *d)
Definition: lspacebb.C:50
REGISTER_Element(LSpace)
Wrapper around element definition to provide FEICellGeometry interface.
Definition: feinterpol.h:95
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
double dnx(int i, int arg2)
This class implements a Linear 3d 8-node finite element for stress analysis.
Definition: lspace.h:60
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
static FEI3dHexaLin interpolation
Definition: lspace.h:66
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.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Definition: gausspoint.h:138

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