OOFEM 3.0
Loading...
Searching...
No Matches
structuralcontactelement.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
36#include "feinterpol.h"
37#include "floatarray.h"
38#include "intarray.h"
39#include "mathfem.h"
40#include "classfactory.h"
41#include "integrationrule.h"
42#include "crosssection.h"
44#include "lobattoir.h"
45//@todo: add lobatto ir
46namespace oofem {
47
51
52
53StructuralContactElement :: StructuralContactElement(int n, Domain *aDomain) : ContactElement(n, aDomain)
54{
55
56}
57
58
59void
60StructuralContactElement :: computeNmatrixAt(const FloatArray &lcoord, FloatMatrix &answer)
61{
62 FloatArray n;
63 this->giveInterpolation()->evalN( n, lcoord, FEIElementGeometryWrapper(this));
64 answer.beNMatrixOf(n, nsd);
65}
66
67
68
69void StructuralContactElement :: computeGaussPoints()
70// Sets up the array of Gauss Points of the receiver.XF
71{
72 if ( integrationRulesArray.size() == 0 ) {
73 integrationRulesArray.resize(1);
74 //integrationRulesArray [ 0 ] = std::make_unique< GaussIntegrationRule >(1, this);
75 integrationRulesArray [ 0 ] = std::make_unique<LobattoIntegrationRule>(1, this);
76 this->giveCrossSection()->setupIntegrationPoints(* integrationRulesArray [ 0 ], numberOfGaussPoints, this);
77 }
78}
79
80
81
82
83FEI3dQuadLin StructuralContactElement_QuadLin :: interpolation;
84
85StructuralContactElement_QuadLin :: StructuralContactElement_QuadLin(int n, Domain *aDomain) : StructuralContactElement(n, aDomain)
86{
87 this->numberOfDofMans = 4;
88 this->nsd = 3;
89 this->numberOfGaussPoints = 4;
90
91}
92
94StructuralContactElement_QuadLin :: giveInterpolation() const { return & interpolation; }
95
96
98StructuralContactElement_QuadLin :: computeNormalVectorAt(const FloatArray &lCoords)
99{
100 FloatArray normal;
101 auto norm = this->giveInterpolation()->boundarySurfaceEvalNormal(normal, 0, lCoords, FEIElementGeometryWrapper(this));
102 return normal*norm;
103 }
104
105
106void
107StructuralContactElement_QuadLin :: giveDofManDofIDMask(int inode, IntArray &answer) const
108{
109 answer = {
110 D_u, D_v, D_w
111 };
112}
113
114
115
116
117FEI3dTrLin StructuralContactElement_TrLin :: interpolation;
118
119StructuralContactElement_TrLin :: StructuralContactElement_TrLin(int n, Domain *aDomain) : StructuralContactElement(n, aDomain)
120{
121 this->numberOfDofMans = 3;
122 this->nsd = 3;
123 this->numberOfGaussPoints = 3;
124
125}
126
128StructuralContactElement_TrLin :: giveInterpolation() const { return & interpolation; }
129
130
132StructuralContactElement_TrLin :: computeNormalVectorAt(const FloatArray &lCoords)
133{
134 FloatArray normal;
135 auto norm = this->giveInterpolation()->boundarySurfaceEvalNormal(normal, 0, lCoords, FEIElementGeometryWrapper(this));
136 return normal*norm;
137 }
138
139
140void
141StructuralContactElement_TrLin :: giveDofManDofIDMask(int inode, IntArray &answer) const
142{
143 answer = {
144 D_u, D_v, D_w
145 };
146}
147
148
149
150
151
152
153
154FEI2dLineLin StructuralContactElement_LineLin :: interpolation(1, 2);
155
156StructuralContactElement_LineLin :: StructuralContactElement_LineLin(int n, Domain *aDomain) : StructuralContactElement(n, aDomain)
157{
158 this->numberOfDofMans = 2;
159 this->nsd = 2;
160 this->numberOfGaussPoints = 2;
161}
162
164StructuralContactElement_LineLin :: giveInterpolation() const { return & interpolation; }
165
166
168StructuralContactElement_LineLin :: computeNormalVectorAt(const FloatArray &lCoords)
169{
170 FloatArray normal;
171 auto norm = this->giveInterpolation()->boundaryEvalNormal(normal, 0, lCoords, FEIElementGeometryWrapper(this));
172 return normal*norm;
173}
174
175
176void
177StructuralContactElement_LineLin :: giveDofManDofIDMask(int inode, IntArray &answer) const
178{
179 answer = {
180 D_u, D_v
181 };
182}
183
184
185
186
187
188
189} // end namespace oofem
#define REGISTER_Element(class)
ContactElement(int n, Domain *aDomain)
virtual FEInterpolation * giveInterpolation() const
Definition element.h:648
int numberOfDofMans
Number of dofmanagers.
Definition element.h:136
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition element.h:157
int numberOfGaussPoints
Definition element.h:175
CrossSection * giveCrossSection()
Definition element.C:534
void beNMatrixOf(const FloatArray &n, int nsd)
FEInterpolation * giveInterpolation() const override
FEInterpolation * giveInterpolation() const override
FEInterpolation * giveInterpolation() const override
double norm(const FloatArray &x)

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