OOFEM 3.0
Loading...
Searching...
No Matches
ltrspaceboundarybeam.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 "gausspoint.h"
41#include "floatmatrix.h"
42#include "floatarray.h"
43#include "intarray.h"
44#include "mathfem.h"
45#include "fei3dtetlin.h"
46#include "classfactory.h"
48#include "parametermanager.h"
49#include "paramkey.h"
50
51
52namespace oofem {
55
56
57LTRSpaceBoundaryBeam :: LTRSpaceBoundaryBeam(int n, Domain *aDomain) :
58 LTRSpaceBoundary(n, aDomain)
59{}
60
61void
62LTRSpaceBoundaryBeam :: initializeFrom(InputRecord &ir, int priority)
63{
64 LTRSpaceBoundary :: initializeFrom(ir, priority);
65}
66
67void
68LTRSpaceBoundaryBeam :: giveDofManDofIDMask(int inode, IntArray &answer) const
69{
70 if ( inode == 5 ) {
71 answer = { E_xx, E_zx, K_xx };
72 } else {
73 answer = { D_u, D_v, D_w };
74 }
75}
76
77
78void
79LTRSpaceBoundaryBeam :: computeTransformationMatrix(FloatMatrix &answer, TimeStep *tStep)
80{
81 double unitCellSize = this->giveNode(5)->giveCoordinate(1);
82
83 IntArray switches1, switches2, switches3, switches4;
84 this->giveSwitches(switches1, this->location.at(1) );
85 this->giveSwitches(switches2, this->location.at(2) );
86 this->giveSwitches(switches3, this->location.at(3) );
87 this->giveSwitches(switches4, this->location.at(4) );
88
89 FloatArray w(4);
90 for ( int i = 1; i <= 4; i++ ) {
91 w.at(i) = this->giveNode(i)->giveCoordinate(3);
92 }
93
94 FloatMatrix k1, k2, k3, k4;
95 k1.resize(3, 3);
96 k2.resize(3, 3);
97 k3.resize(3, 3);
98 k4.resize(3, 3);
99
100 k1.at(1, 1) = unitCellSize * switches1.at(1);
101 k1.at(1, 3) = -w.at(1) * unitCellSize * switches1.at(1);
102 k1.at(3, 2) = unitCellSize * switches1.at(1);
103
104 k2.at(1, 1) = unitCellSize * switches2.at(1);
105 k2.at(1, 3) = -w.at(2) * unitCellSize * switches2.at(1);
106 k2.at(3, 2) = unitCellSize * switches2.at(1);
107
108 k3.at(1, 1) = unitCellSize * switches3.at(1);
109 k3.at(1, 3) = -w.at(3) * unitCellSize * switches3.at(1);
110 k3.at(3, 2) = unitCellSize * switches3.at(1);
111
112 k4.at(1, 1) = unitCellSize * switches4.at(1);
113 k4.at(1, 3) = -w.at(4) * unitCellSize * switches4.at(1);
114 k4.at(3, 2) = unitCellSize * switches4.at(1);
115
116 answer.resize(12, 12);
117 answer.beUnitMatrix();
118 answer.resizeWithData(12, 15);
119
120 answer.assemble(k1, { 1, 2, 3 }, { 13, 14, 15 });
121 answer.assemble(k2, { 4, 5, 6 }, { 13, 14, 15 });
122 answer.assemble(k3, { 7, 8, 9 }, { 13, 14, 15 });
123 answer.assemble(k4, { 10, 11, 12 }, { 13, 14, 15 });
124}
125} // end namespace oofem
#define REGISTER_Element(class)
Node * giveNode(int i) const
Definition element.h:629
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
static ParamKey IPK_LTRSpaceBoundaryBeam_location
void giveSwitches(IntArray &answer, int location)
LTRSpaceBoundary(int n, Domain *d)

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