OOFEM 3.0
Loading...
Searching...
No Matches
libeam3dboundaryplate.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
37#include "node.h"
38#include "material.h"
39#include "crosssection.h"
40#include "gausspoint.h"
42#include "floatmatrix.h"
43#include "intarray.h"
44#include "floatarray.h"
45#include "mathfem.h"
46#include "classfactory.h"
47
48namespace oofem {
50
51LIBeam3dBoundaryPlate :: LIBeam3dBoundaryPlate(int n, Domain *aDomain) : LIBeam3dBoundary(n, aDomain)
52 // Constructor.
53{}
54
55
56void
57LIBeam3dBoundaryPlate :: giveDofManDofIDMask(int inode, IntArray &answer) const
58{
59 if ( inode == 3 ) {
60 answer = { E_xx, E_xy, E_yx, E_yy, E_zx, E_zy, K_xx, K_yy, K_xy, K_yx };
61 } else {
62 answer = { D_u, D_v, D_w, R_u, R_v, R_w };
63 }
64}
65
66
67void
68LIBeam3dBoundaryPlate :: computeTransformationMatrix(FloatMatrix &answer, TimeStep *tStep)
69{
70 FloatArray unitCellSize;
71 unitCellSize.resize(2);
72 unitCellSize.at(1) = this->giveNode(3)->giveCoordinate(1);
73 unitCellSize.at(2) = this->giveNode(3)->giveCoordinate(2);
74
75 IntArray switches1, switches2;
76 this->giveSwitches(switches1, this->location.at(1) );
77 this->giveSwitches(switches2, this->location.at(2) );
78
79 FloatMatrix k1, k2;
80 k1.resize(6, 10);
81 k2.resize(6, 10);
82
83 k1.at(1, 1) = unitCellSize.at(1) * switches1.at(1);
84 k1.at(1, 2) = unitCellSize.at(2) * switches1.at(2);
85 k1.at(2, 3) = unitCellSize.at(1) * switches1.at(1);
86 k1.at(2, 4) = unitCellSize.at(2) * switches1.at(2);
87 k1.at(3, 5) = unitCellSize.at(1) * switches1.at(1);
88 k1.at(3, 6) = unitCellSize.at(2) * switches1.at(2);
89 k1.at(1, 7) = -( this->giveNode(1)->giveCoordinate(3) ) * unitCellSize.at(1) * switches1.at(1);
90 k1.at(2, 8) = -( this->giveNode(1)->giveCoordinate(3) ) * unitCellSize.at(2) * switches1.at(2);
91 k1.at(1, 9) = -( this->giveNode(1)->giveCoordinate(3) ) * unitCellSize.at(2) * switches1.at(2);
92 k1.at(2, 10) = -( this->giveNode(1)->giveCoordinate(3) ) * unitCellSize.at(1) * switches1.at(1);
93
94 //Peter: Add the rules for rotational DOFs (around) x- and y-axes
95 //rotation around x-axis
96 k1.at(4, 8) = unitCellSize.at(2) * switches1.at(2);
97 k1.at(4, 10) = unitCellSize.at(1) * switches1.at(1);
98 //rotation around y-axis
99 k1.at(5, 7) = -unitCellSize.at(1) * switches1.at(1);
100 k1.at(5, 9) = -unitCellSize.at(2) * switches1.at(2);
101
102
103 k2.at(1, 1) = unitCellSize.at(1) * switches2.at(1);
104 k2.at(1, 2) = unitCellSize.at(2) * switches2.at(2);
105 k2.at(2, 3) = unitCellSize.at(1) * switches2.at(1);
106 k2.at(2, 4) = unitCellSize.at(2) * switches2.at(2);
107 k2.at(3, 5) = unitCellSize.at(1) * switches2.at(1);
108 k2.at(3, 6) = unitCellSize.at(2) * switches2.at(2);
109 k2.at(1, 7) = -( this->giveNode(2)->giveCoordinate(3) ) * unitCellSize.at(1) * switches2.at(1);
110 k2.at(2, 8) = -( this->giveNode(2)->giveCoordinate(3) ) * unitCellSize.at(2) * switches2.at(2);
111 k2.at(1, 9) = -( this->giveNode(2)->giveCoordinate(3) ) * unitCellSize.at(2) * switches2.at(2);
112 k2.at(2, 10) = -( this->giveNode(2)->giveCoordinate(3) ) * unitCellSize.at(1) * switches2.at(1);
113 //Peter: Add the rules for rotational DOFs (around) x- and y-axes
114 //rotation around x-axis
115 k2.at(4, 8) = unitCellSize.at(2) * switches2.at(2);
116 k2.at(4, 10) = unitCellSize.at(1) * switches2.at(1);
117 //rotation around y-axis
118 k2.at(5, 7) = -unitCellSize.at(1) * switches2.at(1);
119 k2.at(5, 9) = -unitCellSize.at(2) * switches2.at(2);
120
121 answer.resize(12, 12);
122 answer.beUnitMatrix();
123 answer.resizeWithData(12, 22);
124
125 answer.assemble(k1, { 1, 2, 3, 4, 5, 6 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 });
126 answer.assemble(k2, { 7, 8, 9, 10, 11, 12 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 });
127}
128} // end namespace oofem
#define REGISTER_Element(class)
Node * giveNode(int i) const
Definition element.h:629
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
void resizeWithData(Index, Index)
Definition floatmatrix.C:91
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
void assemble(const FloatMatrix &src, const IntArray &loc)
double at(std::size_t i, std::size_t j) const
void beUnitMatrix()
Sets receiver to unity matrix.
int & at(std::size_t i)
Definition intarray.h:104
LIBeam3dBoundary(int n, Domain *d)
void giveSwitches(IntArray &answer, int location)

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