OOFEM 3.0
Loading...
Searching...
No Matches
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 - 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 "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
47namespace oofem {
49
50LSpaceBB :: LSpaceBB(int n, Domain *aDomain) : LSpace(n, aDomain)
51{ }
52
53void
54LSpaceBB :: computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int li, int ui)
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
67 LSpace :: interpolation.evaldNdx( dnx, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
68 LSpace :: interpolation.evaldNdx( dnx0, coord, FEIElementGeometryWrapper(this) );
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
#define REGISTER_Element(class)
void zero()
Zeroes all coefficients of receiver.
Definition floatarray.C:683
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition gausspoint.h:138
LSpace(int n, Domain *d)
Definition lspace.C:62
double dnx(int i, int arg2)

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