OOFEM 3.0
Loading...
Searching...
No Matches
ltrspaceboundaryplate.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
49
50namespace oofem {
52
53LTRSpaceBoundaryPlate :: LTRSpaceBoundaryPlate(int n, Domain *aDomain) :
54 LTRSpaceBoundary(n, aDomain)
55{}
56
57void
58LTRSpaceBoundaryPlate :: giveDofManDofIDMask(int inode, IntArray &answer) const
59{
60 if ( inode == 5 ) {
61 answer = { E_xx, E_xy, E_yx, E_yy, E_zx, E_zy, K_xx, K_yy, K_xy, K_yx };
62 } else {
63 answer = { D_u, D_v, D_w };
64 }
65}
66
67
68void
69LTRSpaceBoundaryPlate :: computeTransformationMatrix(FloatMatrix &answer, TimeStep *tStep)
70{
71 FloatArray unitCellSize;
72 unitCellSize.resize(2);
73 unitCellSize.at(1) = this->giveNode(5)->giveCoordinate(1);
74 unitCellSize.at(2) = this->giveNode(5)->giveCoordinate(2);
75
76 IntArray switches1, switches2, switches3, switches4;
77 this->giveSwitches(switches1, this->location.at(1) );
78 this->giveSwitches(switches2, this->location.at(2) );
79 this->giveSwitches(switches3, this->location.at(3) );
80 this->giveSwitches(switches4, this->location.at(4) );
81
82 FloatArray w(4);
83 for ( int i = 1; i <= 4; i++ ) {
84 w.at(i) = this->giveNode(i)->giveCoordinate(3);
85 }
86
87 FloatMatrix k1, k2, k3, k4;
88 k1.resize(3, 10);
89 k2.resize(3, 10);
90 k3.resize(3, 10);
91 k4.resize(3, 10);
92
93 k1.at(1, 1) = unitCellSize.at(1) * switches1.at(1);
94 k1.at(1, 2) = unitCellSize.at(2) * switches1.at(2);
95 k1.at(2, 3) = unitCellSize.at(1) * switches1.at(1);
96 k1.at(2, 4) = unitCellSize.at(2) * switches1.at(2);
97 k1.at(3, 5) = unitCellSize.at(1) * switches1.at(1);
98 k1.at(3, 6) = unitCellSize.at(2) * switches1.at(2);
99 k1.at(1, 7) = -w.at(1) * unitCellSize.at(1) * switches1.at(1);
100 k1.at(2, 8) = -w.at(1) * unitCellSize.at(2) * switches1.at(2);
101 k1.at(1, 9) = -w.at(1) * unitCellSize.at(2) * switches1.at(2);
102 k1.at(2, 10) = -w.at(1) * unitCellSize.at(1) * switches1.at(1);
103
104 k2.at(1, 1) = unitCellSize.at(1) * switches2.at(1);
105 k2.at(1, 2) = unitCellSize.at(2) * switches2.at(2);
106 k2.at(2, 3) = unitCellSize.at(1) * switches2.at(1);
107 k2.at(2, 4) = unitCellSize.at(2) * switches2.at(2);
108 k2.at(3, 5) = unitCellSize.at(1) * switches2.at(1);
109 k2.at(3, 6) = unitCellSize.at(2) * switches2.at(2);
110 k2.at(1, 7) = -w.at(2) * unitCellSize.at(1) * switches2.at(1);
111 k2.at(2, 8) = -w.at(2) * unitCellSize.at(2) * switches2.at(2);
112 k2.at(1, 9) = -w.at(2) * unitCellSize.at(2) * switches2.at(2);
113 k2.at(2, 10) = -w.at(2) * unitCellSize.at(1) * switches2.at(1);
114
115 k3.at(1, 1) = unitCellSize.at(1) * switches3.at(1);
116 k3.at(1, 2) = unitCellSize.at(2) * switches3.at(2);
117 k3.at(2, 3) = unitCellSize.at(1) * switches3.at(1);
118 k3.at(2, 4) = unitCellSize.at(2) * switches3.at(2);
119 k3.at(3, 5) = unitCellSize.at(1) * switches3.at(1);
120 k3.at(3, 6) = unitCellSize.at(2) * switches3.at(2);
121 k3.at(1, 7) = -w.at(3) * unitCellSize.at(1) * switches3.at(1);
122 k3.at(2, 8) = -w.at(3) * unitCellSize.at(2) * switches3.at(2);
123 k3.at(1, 9) = -w.at(3) * unitCellSize.at(2) * switches3.at(2);
124 k3.at(2, 10) = -w.at(3) * unitCellSize.at(1) * switches3.at(1);
125
126 k4.at(1, 1) = unitCellSize.at(1) * switches4.at(1);
127 k4.at(1, 2) = unitCellSize.at(2) * switches4.at(2);
128 k4.at(2, 3) = unitCellSize.at(1) * switches4.at(1);
129 k4.at(2, 4) = unitCellSize.at(2) * switches4.at(2);
130 k4.at(3, 5) = unitCellSize.at(1) * switches4.at(1);
131 k4.at(3, 6) = unitCellSize.at(2) * switches4.at(2);
132 k4.at(1, 7) = -w.at(4) * unitCellSize.at(1) * switches4.at(1);
133 k4.at(2, 8) = -w.at(4) * unitCellSize.at(2) * switches4.at(2);
134 k4.at(1, 9) = -w.at(4) * unitCellSize.at(2) * switches4.at(2);
135 k4.at(2, 10) = -w.at(4) * unitCellSize.at(1) * switches4.at(1);
136
137 answer.resize(12, 12);
138 answer.beUnitMatrix();
139 answer.resizeWithData(12, 22);
140
141 answer.assemble(k1, { 1, 2, 3 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 });
142 answer.assemble(k2, { 4, 5, 6 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 });
143 answer.assemble(k3, { 7, 8, 9 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 });
144 answer.assemble(k4, { 10, 11, 12 }, { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 });
145}
146} // 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
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