OOFEM 3.0
Loading...
Searching...
No Matches
libeam3dboundarybeam.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
51LIBeam3dBoundaryBeam :: LIBeam3dBoundaryBeam(int n, Domain *aDomain) : LIBeam3dBoundary(n, aDomain)
52 // Constructor.
53{}
54
55
56void
57LIBeam3dBoundaryBeam :: giveDofManDofIDMask(int inode, IntArray &answer) const
58{
59 if ( inode == 3 ) {
60 answer = { E_xx, E_zx, K_xx };
61 } else {
62 answer = { D_u, D_v, D_w, R_u, R_v, R_w };
63 }
64}
65
66
67void
68LIBeam3dBoundaryBeam :: computeTransformationMatrix(FloatMatrix &answer, TimeStep *tStep)
69{
70 double unitCellSize;
71 unitCellSize = this->giveNode(3)->giveCoordinate(1);
72
73 IntArray switches1, switches2;
74 this->giveSwitches(switches1, this->location.at(1) );
75 this->giveSwitches(switches2, this->location.at(2) );
76
77 FloatMatrix k1, k2;
78 k1.resize(6, 3);
79 k2.resize(6, 3);
80
81 k1.at(1, 1) = unitCellSize * switches1.at(1);
82 k1.at(1, 3) = -this->giveNode(1)->giveCoordinate(3) * unitCellSize * switches1.at(1);
83 k1.at(3, 2) = unitCellSize * switches1.at(1);
84
85 //Peter: Add the rules for rotational DOFs (around) y-axes
86 //rotation around y-axis
87 k1.at(5, 3) = -unitCellSize *switches1.at(1);
88
89 k2.at(1, 1) = unitCellSize * switches2.at(1);
90 k2.at(1, 3) = -this->giveNode(2)->giveCoordinate(3) * unitCellSize * switches2.at(1);
91 k2.at(3, 2) = unitCellSize * switches2.at(1);
92
93 //Peter: Add the rules for rotational DOFs (around) y-axes
94 //rotation around y-axis
95 k2.at(5, 3) = -unitCellSize *switches2.at(1);
96
97 answer.resize(12, 12);
98 answer.beUnitMatrix();
99 answer.resizeWithData(12, 15);
100
101 answer.assemble(k1, { 1, 2, 3, 4, 5, 6 }, { 13, 14, 15 });
102 answer.assemble(k2, { 7, 8, 9, 10, 11, 12 }, { 13, 14, 15 });
103}
104} // end namespace oofem
#define REGISTER_Element(class)
Node * giveNode(int i) const
Definition element.h:629
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