OOFEM 3.0
Loading...
Searching...
No Matches
libeam3dboundarymembrane.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
51LIBeam3dBoundaryMembrane :: LIBeam3dBoundaryMembrane(int n, Domain *aDomain) : LIBeam3dBoundary(n, aDomain)
52 // Constructor.
53{}
54
55
56void
57LIBeam3dBoundaryMembrane :: giveDofManDofIDMask(int inode, IntArray &answer) const
58{
59 if ( inode == 3 ) {
60 answer = { E_xx, E_xy, E_yx, E_yy };
61 } else {
62 answer = { D_u, D_v, D_w, R_u, R_v, R_w };
63 }
64}
65
66
67void
68LIBeam3dBoundaryMembrane :: 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, 4);
81 k2.resize(6, 4);
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
88 k2.at(1, 1) = unitCellSize.at(1) * switches2.at(1);
89 k2.at(1, 2) = unitCellSize.at(2) * switches2.at(2);
90 k2.at(2, 3) = unitCellSize.at(1) * switches2.at(1);
91 k2.at(2, 4) = unitCellSize.at(2) * switches2.at(2);
92
93 answer.resize(12, 12);
94 answer.beUnitMatrix();
95 answer.resizeWithData(12, 16);
96
97 answer.assemble(k1, { 1, 2, 3, 4, 5, 6 }, { 13, 14, 15, 16 });
98 answer.assemble(k2, { 7, 8, 9, 10, 11, 12 }, { 13, 14, 15, 16 });
99}
100} // 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