OOFEM 3.0
Loading...
Searching...
No Matches
mitc4.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
39#include "fei2dquadlin.h"
40#include "node.h"
41#include "material.h"
42#include "crosssection.h"
43#include "gausspoint.h"
46#include "floatmatrix.h"
47#include "floatarray.h"
48#include "floatmatrixf.h"
49#include "floatarrayf.h"
50#include "intarray.h"
51#include "load.h"
52#include "boundaryload.h"
53#include "mathfem.h"
54#include "classfactory.h"
55#include "connectivitytable.h"
56#include "parametermanager.h"
57#include "paramkey.h"
58
59
60#ifdef __OOFEG
61 #include "node.h"
62 #include "oofeggraphiccontext.h"
63 #include "connectivitytable.h"
64#endif
65
66
67namespace oofem {
71
73
84
85
88
89
92{
93 return & interp_lin;
94}
95
96
99{
100 if ( interface == ZZNodalRecoveryModelInterfaceType ) {
101 return static_cast< ZZNodalRecoveryModelInterface * >( this );
102 } else if ( interface == SPRNodalRecoveryModelInterfaceType ) {
103 return static_cast< SPRNodalRecoveryModelInterface * >( this );
104 } else if ( interface == NodalAveragingRecoveryModelInterfaceType ) {
105 return static_cast< NodalAveragingRecoveryModelInterface * >( this );
106 } else if ( interface == SpatialLocalizerInterfaceType ) {
107 return static_cast< SpatialLocalizerInterface * >( this );
108 }
109
110 return nullptr;
111}
112
113
114void
116{
118 for ( int i = 1; i <= numberOfDofMans; i++ ) {
119 pap.at(i) = this->giveNode(i)->giveNumber();
120 }
121}
122
123
124void
126{
127 int found = 0;
128 answer.resize(1);
129
130 for ( int i = 1; i <= numberOfDofMans; i++ ) {
131 if ( this->giveNode(i)->giveNumber() == pap ) {
132 found = 1;
133 }
134 }
135
136 if ( found ) {
137 answer.at(1) = pap;
138 } else {
139 OOFEM_ERROR("unknown node number %d", pap);
140 }
141}
142
143
144int
149
150
156
157
158void
160{
161 if ( integrationRulesArray.size() == 0 ) {
162 integrationRulesArray.resize(1);
163 integrationRulesArray [ 0 ] = std::make_unique< GaussIntegrationRule >(1, this, 1, 10);
165 }
166}
167
168
169std::array< FloatArrayF< 3 >, 4 >
171{
172 if ( directorType == 0 ) { // normal to the midplane
173 auto e = this->computeLocalBaseVectors();
174 return { e [ 2 ], e [ 2 ], e [ 2 ], e [ 2 ] };
175 } else if ( directorType == 1 ) { // nodal average
176 int csNum = this->giveCrossSection()->giveNumber();
177 std::array< FloatArrayF< 3 >, 4 >directors;
178
179 IntArray neighbours;
181 IntArray node(1);
182
183 for ( int i = 1; i <= 4; i++ ) {
184 FloatArrayF< 3 >nodeDir;
185 node.at(1) = this->giveNode(i)->giveNumber();
186 conTable->giveNodeNeighbourList(neighbours, node);
187
188 for ( int j = 1; j <= neighbours.giveSize(); j++ ) {
189 auto neighbour = dynamic_cast< MITC4Shell * >( this->giveDomain()->giveElement(neighbours.at(j) ) );
190 if ( neighbour ) {
191 if ( neighbour->giveCrossSection()->giveNumber() == csNum ) {
192 auto e = neighbour->computeLocalBaseVectors();
193 nodeDir += e [ 2 ];
194 }
195 }
196 }
197 directors [ i-1 ] = normalize(nodeDir);
198 }
199 return directors;
200 } else if ( directorType == 2 ) { // specified at crosssection
201 std::array< FloatArrayF< 3 >, 4 >V;
202 for ( int i = 0; i < 4; ++i ) {
203 const auto &c = this->giveNode(i + 1)->giveCoordinates();
205 this->giveCrossSection()->give(CS_DirectorVectorX, c, this, false),
206 this->giveCrossSection()->give(CS_DirectorVectorY, c, this, false),
207 this->giveCrossSection()->give(CS_DirectorVectorZ, c, this, false),
208 };
209 V [ i ] = normalize(v);
210 }
211 return V;
212 } else {
213 throw std::runtime_error("Unsupported directorType");
214 }
215}
216
217
218std::array< FloatArrayF< 3 >, 4 >
220{
221 auto Vg = this->giveDirectorVectors();
222 return {
223 dot(GtoLRotationMatrix, Vg [ 0 ]),
224 dot(GtoLRotationMatrix, Vg [ 1 ]),
225 dot(GtoLRotationMatrix, Vg [ 2 ]),
226 dot(GtoLRotationMatrix, Vg [ 3 ]),
227 };
228}
229
230
231void
233// Returns the [6x24] displacement interpolation matrix {N} of the receiver,
234// evaluated at gp.
235// Zeroes in rows 4, 5, 6.
236{
237 auto h = interp_lin.evalN(FloatArrayF< 3 >(iLocCoord) [ { 0, 1 } ]);
238 auto a = this->giveThickness();
239 auto V = this->giveLocalDirectorVectors();
240
241 FloatArrayF< 3 >e2 = { 0., 1., 0. };
242
243 answer.resize(6, 6 * 4);
244 answer.zero();
245 for ( int i = 0; i < 4; ++i ) {
246 auto Ve = normalize( cross(e2, V [ i ]) );
247 auto VVe = cross(V [ i ], Ve);
248 answer.at(1, 1 + i * 6) = answer.at(2, 2 + i * 6) = answer.at(3, 3 + i * 6) = h [ i ];
249 answer.at(1, 4 + i * 6) = -iLocCoord.at(3) / 2.0 * a [ i ] * h [ i ] * VVe.at(1);
250 answer.at(1, 5 + i * 6) = iLocCoord.at(3) / 2.0 * a [ i ] * h [ i ] * Ve.at(1);
251 answer.at(2, 4 + i * 6) = -iLocCoord.at(3) / 2.0 * a [ i ] * h [ i ] * VVe.at(2);
252 answer.at(2, 5 + i * 6) = iLocCoord.at(3) / 2.0 * a [ i ] * h [ i ] * Ve.at(2);
253 answer.at(3, 4 + i * 6) = -iLocCoord.at(3) / 2.0 * a [ i ] * h [ i ] * VVe.at(3);
254 answer.at(3, 5 + i * 6) = iLocCoord.at(3) / 2.0 * a [ i ] * h [ i ] * Ve.at(3);
255 }
256}
257
258
259void
260MITC4Shell::computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
261{
262 auto scs = dynamic_cast< StructuralCrossSection * >( this->giveCrossSection() );
263 //auto cs = dynamic_cast< SimpleCrossSection * >( this->giveCrossSection() );
264 answer = scs->give3dDegeneratedShellStiffMtrx(rMode, gp, tStep);
265}
266
267
268std::array< FloatArrayF< 3 >, 4 >
270{
271 std::array< FloatArrayF< 3 >, 4 >c;
272 for ( int i = 0; i < 4; ++i ) {
273 c [ i ] = this->giveLocalCoordinates( this->giveNode(i + 1)->giveCoordinates() );
274 }
275 return c;
276}
277
280{
281 auto offset = global - FloatArrayF< 3 >( this->giveNode(1)->giveCoordinates() );
282 return dot(GtoLRotationMatrix, offset);
283}
284
285void
287{
289 ParameterManager &ppm = this->giveDomain()->elementPPM;
290 PM_UPDATE_PARAMETER(nPointsXY, ppm, ir, this->number, IPK_Element_nip, priority);
291 PM_UPDATE_PARAMETER(nPointsZ, ppm, ir, this->number, IPK_MITC4Shell_nipZ, priority);
293}
294
295
296void
298{
299 answer = {
300 D_u, D_v, D_w, R_u, R_v, R_w
301 };
302}
303
304double
306{
307 FloatArrayF< 3 >lcoords = {
311 };
312
313 auto jacobianMatrix = this->giveJacobian(lcoords);
314 return det(jacobianMatrix) * gp->giveWeight();
315}
316
317
320{
321 // derivatives of interpolation functions
322 auto dn = interp_lin.evaldNdxi(lcoords [ { 0, 1 } ]);
323 auto hk1 = dn.row< 0 >(); // dh(r1,r2)/dr1
324 auto hk2 = dn.row< 1 >(); // dh(r1,r2)/dr2
325
326 // interpolation functions - h(r1,r2)
327 //auto [h1, h2, h3, h4] = interp_lin.evalN(lcoords[{0, 1}]);
328 auto h = interp_lin.evalN(lcoords [ { 0, 1 } ]);
329 double h1 = h [ 0 ];
330 double h2 = h [ 1 ];
331 double h3 = h [ 2 ];
332 double h4 = h [ 3 ];
333
334 //auto [a1, a2, a3, a4] = this->giveThickness();
335 auto a = this->giveThickness();
336 double a1 = a [ 0 ];
337 double a2 = a [ 1 ];
338 double a3 = a [ 2 ];
339 double a4 = a [ 3 ];
340
341 // get node coordinates
342 double r3 = lcoords.at(3);
343 auto c = this->giveNodeCoordinates();
344 //auto [x1, y1, z1] = c[0];
345 //auto [x2, y2, z2] = c[1];
346 //auto [x3, y3, z3] = c[2];
347 //auto [x4, y4, z4] = c[3];
348 double x1 = c [ 0 ] [ 0 ], y1 = c [ 0 ] [ 1 ];
349 double x2 = c [ 1 ] [ 0 ], y2 = c [ 1 ] [ 1 ];
350 double x3 = c [ 2 ] [ 0 ], y3 = c [ 2 ] [ 1 ];
351 double x4 = c [ 3 ] [ 0 ], y4 = c [ 3 ] [ 1 ];
352
353 //auto [V1, V2, V3, V4] = this->giveLocalDirectorVectors();
354 auto V = this->giveLocalDirectorVectors();
355 auto V1 = V [ 0 ], V2 = V [ 1 ], V3 = V [ 2 ], V4 = V [ 3 ];
356
357 // Jacobian Matrix
358 FloatMatrixF< 3, 3 >jacobianMatrix;
359 jacobianMatrix.at(1, 1) = hk1.at(1) * x1 + hk1.at(2) * x2 + hk1.at(3) * x3 + hk1.at(4) * x4 + r3 / 2. * ( a1 * hk1.at(1) * V1.at(1) + a2 * hk1.at(2) * V2.at(1) + a3 * hk1.at(3) * V3.at(1) + a4 * hk1.at(4) * V4.at(1) );
360 jacobianMatrix.at(1, 2) = hk1.at(1) * y1 + hk1.at(2) * y2 + hk1.at(3) * y3 + hk1.at(4) * y4 + r3 / 2. * ( a1 * hk1.at(1) * V1.at(2) + a2 * hk1.at(2) * V2.at(2) + a3 * hk1.at(3) * V3.at(2) + a4 * hk1.at(4) * V4.at(2) );
361 jacobianMatrix.at(1, 3) = r3 / 2. * ( a1 * hk1.at(1) * V1.at(3) + a2 * hk1.at(2) * V2.at(3) + a3 * hk1.at(3) * V3.at(3) + a4 * hk1.at(4) * V4.at(3) );
362 jacobianMatrix.at(2, 1) = hk2.at(1) * x1 + hk2.at(2) * x2 + hk2.at(3) * x3 + hk2.at(4) * x4 + r3 / 2. * ( a1 * hk2.at(1) * V1.at(1) + a2 * hk2.at(2) * V2.at(1) + a3 * hk2.at(3) * V3.at(1) + a4 * hk2.at(4) * V4.at(1) );
363 jacobianMatrix.at(2, 2) = hk2.at(1) * y1 + hk2.at(2) * y2 + hk2.at(3) * y3 + hk2.at(4) * y4 + r3 / 2. * ( a1 * hk2.at(1) * V1.at(2) + a2 * hk2.at(2) * V2.at(2) + a3 * hk2.at(3) * V3.at(2) + a4 * hk2.at(4) * V4.at(2) );
364 jacobianMatrix.at(2, 3) = r3 / 2. * ( a1 * hk2.at(1) * V1.at(3) + a2 * hk2.at(2) * V2.at(3) + a3 * hk2.at(3) * V3.at(3) + a4 * hk2.at(4) * V4.at(3) );
365 jacobianMatrix.at(3, 1) = 1. / 2. * ( a1 * h1 * V1.at(1) + a2 * h2 * V2.at(1) + a3 * h3 * V3.at(1) + a4 * h4 * V4.at(1) );
366 jacobianMatrix.at(3, 2) = 1. / 2. * ( a1 * h1 * V1.at(2) + a2 * h2 * V2.at(2) + a3 * h3 * V3.at(2) + a4 * h4 * V4.at(2) );
367 jacobianMatrix.at(3, 3) = 1. / 2. * ( a1 * h1 * V1.at(3) + a2 * h2 * V2.at(3) + a3 * h3 * V3.at(3) + a4 * h4 * V4.at(3) );
368 return jacobianMatrix;
369}
370
371void
372MITC4Shell::computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
373{
374 // This element adds an additional stiffness for the so called drilling dofs.
375 StructuralElement::computeStiffnessMatrix(answer, rMode, tStep);
376
377 bool drillType = this->giveStructuralCrossSection()->give(CS_DrillingType, this->giveDefaultIntegrationRulePtr()->getIntegrationPoint(0) );
378 if ( drillType == 1 ) {
379 double relDrillCoeff = this->giveStructuralCrossSection()->give(CS_RelDrillingStiffness, this->giveDefaultIntegrationRulePtr()->getIntegrationPoint(0) );
380 if ( relDrillCoeff == 0.0 ) {
381 relDrillCoeff = 0.001; // default
382 }
383
384 int j = 1;
385 while ( answer.at(j, j) == 0 ) {
386 j++;
387 }
388 drillCoeff = answer.at(j, j);
389 // find the smallest non-zero number on the diagonal
390 for ( int i = j; i <= 24; i++ ) {
391 if ( drillCoeff > answer.at(i, i) && answer.at(i, i) != 0 ) {
392 drillCoeff = answer.at(i, i);
393 }
394 }
395
396 drillCoeff *= relDrillCoeff;
397
398 IntArray drillDofs = { 6, 12, 18, 24 };
399 auto drillStiffness = eye< 4 >() * drillCoeff;
400#if 0
401 FloatMatrix drillStiffness;
402 for ( auto &gp : * integrationRulesArray [ 0 ] ) {
403 double dV = this->computeVolumeAround(gp);
404 // double drillCoeff = this->giveStructuralCrossSection()->give(CS_DrillingStiffness, gp);
405 double coeff = drillCoeff;
406 if ( this->giveStructuralCrossSection()->give(CS_DrillingStiffness, gp) > 0 ) {
408 }
409 // Drilling stiffness is here for improved numerical properties
410 this->interp_lin.evalN(n, gp->giveNaturalCoordinates(), FEIVoidCellGeometry() );
411 for ( int j = 0; j < 4; j++ ) {
412 n [ j ] -= 0.25;
413 }
414 drillStiffness.plusDyadSymmUpper(n, coeff * dV);
415 }
416 drillStiffness.symmetrized();
417#endif
418 answer.assemble(drillStiffness, drillDofs);
419 }
420}
421
422void
423MITC4Shell::giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord)
424{
425 // This element adds an additional stiffness for the so called drilling dofs.
426 StructuralElement::giveInternalForcesVector(answer, tStep, useUpdatedGpRecord);
427
428 bool drillType = this->giveStructuralCrossSection()->give(CS_DrillingType, this->giveDefaultIntegrationRulePtr()->getIntegrationPoint(0) );
429
430 if ( drillType == 1 ) {
431 FloatArray n, tmp;
432 FloatArray drillUnknowns, drillMoment;
433 IntArray drillDofs = {
434 6, 12, 18, 24
435 };
436 this->computeVectorOf(VM_Total, tStep, tmp);
437 drillUnknowns.beSubArrayOf(tmp, drillDofs);
438
439#if 0
440 for ( auto &gp : * integrationRulesArray [ 0 ] ) {
441 double dV = this->computeVolumeAround(gp);
442 // double drillCoeff = this->giveStructuralCrossSection()->give(CS_DrillingStiffness, gp);
443 double coeff = drillCoeff;
444 if ( this->giveStructuralCrossSection()->give(CS_DrillingStiffness, gp) > 0 ) {
446 }
447
448 this->interp_lin.evalN(n, gp->giveNaturalCoordinates(), FEIVoidCellGeometry() );
449 for ( int j = 0; j < 4; j++ ) {
450 n [ j ] -= 0.25;
451 }
452 double dtheta = n.dotProduct(drillUnknowns);
453 drillMoment.add(coeff * dV * dtheta, n);
454 }
455#endif
456
457 FloatMatrix drillStiffness;
458 drillStiffness.resize(4, 4);
459 drillStiffness.zero();
460 for ( int i = 1; i <= 4; i++ ) {
461 drillStiffness.at(i, i) = drillCoeff;
462 }
463
464 drillMoment.beProductOf(drillStiffness, drillUnknowns);
465
466 answer.assemble(drillMoment, drillDofs);
467 }
468}
469
470void
472// Returns the [6x20] strain-displacement matrix {B} of the receiver,
473// evaluated at gp.
474{
475 //auto [c1, c2, c3, c4] = this->giveNodeCoordinates();
476 auto c = this->giveNodeCoordinates();
477 auto c1 = c [ 0 ], c2 = c [ 1 ], c3 = c [ 2 ], c4 = c [ 3 ];
478
479 double r1 = gp->giveNaturalCoordinate(1);
480 double r2 = gp->giveNaturalCoordinate(2);
481 double r3 = gp->giveNaturalCoordinate(3);
482 FloatArrayF< 3 >lcoords = { r1, r2, r3 };
483
484 //auto [a1, a2, a3, a4] = this->giveThickness();
485 auto a = this->giveThickness();
486 double a1 = a [ 0 ], a2 = a [ 1 ], a3 = a [ 2 ], a4 = a [ 3 ];
487
488 //auto h = interp_lin.evalN(lcoords);
489 //auto dn = interp_lin.evaldNdxi(lcoords);
490
491 //auto [hkx, hky] = this->givedNdx(lcoords);
492 auto hk = this->givedNdx(lcoords);
493 auto hkx = hk [ 0 ], hky = hk [ 1 ];
494
495 auto J = this->giveJacobian(lcoords);
496 auto invJ = inv(J);
497 double sb = 2 * invJ.at(1, 1) * invJ.at(3, 3);
498 double sa = 2 * invJ.at(1, 2) * invJ.at(3, 3);
499 double cb = 2 * invJ.at(2, 1) * invJ.at(3, 3);
500 double ca = 2 * invJ.at(2, 2) * invJ.at(3, 3);
501
502 //auto [V1, V2, V3, V4] = this->giveLocalDirectorVectors();
503 auto V = this->giveLocalDirectorVectors();
504 auto V1 = V [ 0 ], V2 = V [ 1 ], V3 = V [ 2 ], V4 = V [ 3 ];
505
506 FloatArrayF< 3 >e2 = { 0., 1., 0. };
507
508 auto V11 = normalize( cross(e2, V1) );
509 auto V12 = normalize( cross(e2, V2) );
510 auto V13 = normalize( cross(e2, V3) );
511 auto V14 = normalize( cross(e2, V4) );
512
513 auto V21 = cross(V1, V11);
514 auto V22 = cross(V2, V12);
515 auto V23 = cross(V3, V13);
516 auto V24 = cross(V4, V14);
517
518 answer.resize(6, 24);
519 answer.zero();
520
521 answer.at(4, 1) = 1. / 32. * ( ( a1 * V1.at(1) + a2 * V2.at(1) ) * ( cb * ( 1. + r2 ) ) + ( a1 * V1.at(1) + a4 * V4.at(1) ) * ( ca * ( 1. + r1 ) ) );
522 answer.at(4, 2) = 1. / 32. * ( ( a1 * V1.at(2) + a2 * V2.at(2) ) * ( cb * ( 1. + r2 ) ) + ( a1 * V1.at(2) + a4 * V4.at(2) ) * ( ca * ( 1. + r1 ) ) );
523 answer.at(4, 3) = 1. / 32. * ( ( a1 * V1.at(3) + a2 * V2.at(3) ) * ( cb * ( 1. + r2 ) ) + ( a1 * V1.at(3) + a4 * V4.at(3) ) * ( ca * ( 1. + r1 ) ) );
524 answer.at(4, 4) = -a1 / 32. * ( ( dot(V21, c1 - c2) * ( cb * ( 1. + r2 ) ) ) + ( dot(V21, c1 - c4) * ( ca * ( 1. + r1 ) ) ) );
525 answer.at(4, 5) = a1 / 32. * ( ( dot(V11, c1 - c2) * ( cb * ( 1. + r2 ) ) ) + ( dot(V11, c1 - c4) * ( ca * ( 1. + r1 ) ) ) );
526
527 answer.at(4, 7) = 1. / 32. * ( -( a1 * V1.at(1) + a2 * V2.at(1) ) * ( cb * ( 1. + r2 ) ) + ( a2 * V2.at(1) + a3 * V3.at(1) ) * ( ca * ( 1. - r1 ) ) );
528 answer.at(4, 8) = 1. / 32. * ( -( a1 * V1.at(2) + a2 * V2.at(2) ) * ( cb * ( 1. + r2 ) ) + ( a2 * V2.at(2) + a3 * V3.at(2) ) * ( ca * ( 1. - r1 ) ) );
529 answer.at(4, 9) = 1. / 32. * ( -( a1 * V1.at(3) + a2 * V2.at(3) ) * ( cb * ( 1. + r2 ) ) + ( a2 * V2.at(3) + a3 * V3.at(3) ) * ( ca * ( 1. - r1 ) ) );
530 answer.at(4, 10) = -a1 / 32. * ( ( dot(V21, c1 - c2) * ( cb * ( 1. + r2 ) ) ) + ( dot(V21, c2 - c3) * ( ca * ( 1. - r1 ) ) ) );
531 answer.at(4, 11) = a1 / 32. * ( ( dot(V11, c1 - c2) * ( cb * ( 1. + r2 ) ) ) + ( dot(V11, c2 - c3) * ( ca * ( 1. - r1 ) ) ) );
532
533 answer.at(4, 13) = 1. / 32. * ( -( a3 * V3.at(1) + a4 * V4.at(1) ) * ( cb * ( 1. - r2 ) ) - ( a2 * V2.at(1) + a3 * V3.at(1) ) * ( ca * ( 1. - r1 ) ) );
534 answer.at(4, 14) = 1. / 32. * ( -( a3 * V3.at(2) + a4 * V4.at(2) ) * ( cb * ( 1. - r2 ) ) - ( a2 * V2.at(2) + a3 * V3.at(2) ) * ( ca * ( 1. - r1 ) ) );
535 answer.at(4, 15) = 1. / 32. * ( -( a3 * V3.at(3) + a4 * V4.at(3) ) * ( cb * ( 1. - r2 ) ) - ( a2 * V2.at(3) + a3 * V3.at(3) ) * ( ca * ( 1. - r1 ) ) );
536 answer.at(4, 16) = -a1 / 32. * ( ( dot(V21, c4 - c3) * ( cb * ( 1. - r2 ) ) ) + ( dot(V21, c2 - c3) * ( ca * ( 1. - r1 ) ) ) );
537 answer.at(4, 17) = a1 / 32. * ( ( dot(V11, c4 - c3) * ( cb * ( 1. - r2 ) ) ) + ( dot(V11, c2 - c3) * ( ca * ( 1. - r1 ) ) ) );
538
539 answer.at(4, 19) = 1. / 32. * ( ( a3 * V3.at(1) + a4 * V4.at(1) ) * ( cb * ( 1. - r2 ) ) - ( a1 * V1.at(1) + a4 * V4.at(1) ) * ( ca * ( 1. + r1 ) ) );
540 answer.at(4, 20) = 1. / 32. * ( ( a3 * V3.at(2) + a4 * V4.at(2) ) * ( cb * ( 1. - r2 ) ) - ( a1 * V1.at(2) + a4 * V4.at(2) ) * ( ca * ( 1. + r1 ) ) );
541 answer.at(4, 21) = 1. / 32. * ( ( a3 * V3.at(3) + a4 * V4.at(3) ) * ( cb * ( 1. - r2 ) ) - ( a1 * V1.at(3) + a4 * V4.at(3) ) * ( ca * ( 1. + r1 ) ) );
542 answer.at(4, 22) = -a1 / 32. * ( ( dot(V21, c4 - c3) * ( cb * ( 1. - r2 ) ) ) + ( dot(V21, c1 - c4) * ( ca * ( 1. + r1 ) ) ) );
543 answer.at(4, 23) = a1 / 32. * ( ( dot(V11, c4 - c3) * ( cb * ( 1. - r2 ) ) ) + ( dot(V11, c1 - c4) * ( ca * ( 1. + r1 ) ) ) );
544
545 answer.at(5, 1) = 1. / 32. * ( ( a1 * V1.at(1) + a2 * V2.at(1) ) * ( sb * ( 1. + r2 ) ) + ( a1 * V1.at(1) + a4 * V4.at(1) ) * ( sa * ( 1. + r1 ) ) );
546 answer.at(5, 2) = 1. / 32. * ( ( a1 * V1.at(2) + a2 * V2.at(2) ) * ( sb * ( 1. + r2 ) ) + ( a1 * V1.at(2) + a4 * V4.at(2) ) * ( sa * ( 1. + r1 ) ) );
547 answer.at(5, 3) = 1. / 32. * ( ( a1 * V1.at(3) + a2 * V2.at(3) ) * ( sb * ( 1. + r2 ) ) + ( a1 * V1.at(3) + a4 * V4.at(3) ) * ( sa * ( 1. + r1 ) ) );
548 answer.at(5, 4) = -a1 / 32. * ( ( dot(V21, c1 - c2) * ( sb * ( 1. + r2 ) ) ) + ( dot(V21, c1 - c4) * ( sa * ( 1. + r1 ) ) ) );
549 answer.at(5, 5) = a1 / 32. * ( ( dot(V11, c1 - c2) * ( sb * ( 1. + r2 ) ) ) + ( dot(V11, c1 - c4) * ( sa * ( 1. + r1 ) ) ) );
550
551 answer.at(5, 7) = 1. / 32. * ( -( a1 * V1.at(1) + a2 * V2.at(1) ) * ( sb * ( 1. + r2 ) ) + ( a2 * V2.at(1) + a3 * V3.at(1) ) * ( sa * ( 1. - r1 ) ) );
552 answer.at(5, 8) = 1. / 32. * ( -( a1 * V1.at(2) + a2 * V2.at(2) ) * ( sb * ( 1. + r2 ) ) + ( a2 * V2.at(2) + a3 * V3.at(2) ) * ( sa * ( 1. - r1 ) ) );
553 answer.at(5, 9) = 1. / 32. * ( -( a1 * V1.at(3) + a2 * V2.at(3) ) * ( sb * ( 1. + r2 ) ) + ( a2 * V2.at(3) + a3 * V3.at(3) ) * ( sa * ( 1. - r1 ) ) );
554 answer.at(5, 10) = -a1 / 32. * ( ( dot(V21, c1 - c2) * ( sb * ( 1. + r2 ) ) ) + ( dot(V21, c2 - c3) * ( sa * ( 1. - r1 ) ) ) );
555 answer.at(5, 11) = a1 / 32. * ( ( dot(V11, c1 - c2) * ( sb * ( 1. + r2 ) ) ) + ( dot(V11, c2 - c3) * ( sa * ( 1. - r1 ) ) ) );
556
557 answer.at(5, 13) = 1. / 32. * ( -( a3 * V3.at(1) + a4 * V4.at(1) ) * ( sb * ( 1. - r2 ) ) - ( a2 * V2.at(1) + a3 * V3.at(1) ) * ( sa * ( 1. - r1 ) ) );
558 answer.at(5, 14) = 1. / 32. * ( -( a3 * V3.at(2) + a4 * V4.at(2) ) * ( sb * ( 1. - r2 ) ) - ( a2 * V2.at(2) + a3 * V3.at(2) ) * ( sa * ( 1. - r1 ) ) );
559 answer.at(5, 15) = 1. / 32. * ( -( a3 * V3.at(3) + a4 * V4.at(3) ) * ( sb * ( 1. - r2 ) ) - ( a2 * V2.at(3) + a3 * V3.at(3) ) * ( sa * ( 1. - r1 ) ) );
560 answer.at(5, 16) = -a1 / 32. * ( ( dot(V21, c4 - c3) * ( sb * ( 1. - r2 ) ) ) + ( dot(V21, c2 - c3) * ( sa * ( 1. - r1 ) ) ) );
561 answer.at(5, 17) = a1 / 32. * ( ( dot(V11, c4 - c3) * ( sb * ( 1. - r2 ) ) ) + ( dot(V11, c2 - c3) * ( sa * ( 1. - r1 ) ) ) );
562
563 answer.at(5, 19) = 1. / 32. * ( ( a3 * V3.at(1) + a4 * V4.at(1) ) * ( sb * ( 1. - r2 ) ) - ( a1 * V1.at(1) + a4 * V4.at(1) ) * ( sa * ( 1. + r1 ) ) );
564 answer.at(5, 20) = 1. / 32. * ( ( a3 * V3.at(2) + a4 * V4.at(2) ) * ( sb * ( 1. - r2 ) ) - ( a1 * V1.at(2) + a4 * V4.at(2) ) * ( sa * ( 1. + r1 ) ) );
565 answer.at(5, 21) = 1. / 32. * ( ( a3 * V3.at(3) + a4 * V4.at(3) ) * ( sb * ( 1. - r2 ) ) - ( a1 * V1.at(3) + a4 * V4.at(3) ) * ( sa * ( 1. + r1 ) ) );
566 answer.at(5, 22) = -a1 / 32. * ( ( dot(V21, c4 - c3) * ( sb * ( 1. - r2 ) ) ) + ( dot(V21, c1 - c4) * ( sa * ( 1. + r1 ) ) ) );
567 answer.at(5, 23) = a1 / 32. * ( ( dot(V11, c4 - c3) * ( sb * ( 1. - r2 ) ) ) + ( dot(V11, c1 - c4) * ( sa * ( 1. + r1 ) ) ) );
568
569 answer.at(1, 1) = hkx.at(1);
570 answer.at(1, 4) = -r3 / 2. * a1 * hkx.at(1) * V21.at(1);
571 answer.at(1, 5) = r3 / 2. * a1 * hkx.at(1) * V11.at(1);
572
573 answer.at(1, 7) = hkx.at(2);
574 answer.at(1, 10) = -r3 / 2. * a2 * hkx.at(2) * V22.at(1);
575 answer.at(1, 11) = r3 / 2. * a2 * hkx.at(2) * V12.at(1);
576
577 answer.at(1, 13) = hkx.at(3);
578 answer.at(1, 16) = -r3 / 2. * a3 * hkx.at(3) * V23.at(1);
579 answer.at(1, 17) = r3 / 2. * a3 * hkx.at(3) * V13.at(1);
580
581 answer.at(1, 19) = hkx.at(4);
582 answer.at(1, 22) = -r3 / 2. * a4 * hkx.at(4) * V24.at(1);
583 answer.at(1, 23) = r3 / 2. * a4 * hkx.at(4) * V14.at(1);
584
585 answer.at(2, 2) = hky.at(1);
586 answer.at(2, 4) = -r3 / 2. * a1 * hky.at(1) * V21.at(2);
587 answer.at(2, 5) = r3 / 2. * a1 * hky.at(1) * V11.at(2);
588
589 answer.at(2, 8) = hky.at(2);
590 answer.at(2, 10) = -r3 / 2. * a2 * hky.at(2) * V22.at(2);
591 answer.at(2, 11) = r3 / 2. * a2 * hky.at(2) * V12.at(2);
592
593 answer.at(2, 14) = hky.at(3);
594 answer.at(2, 16) = -r3 / 2. * a3 * hky.at(3) * V23.at(2);
595 answer.at(2, 17) = r3 / 2. * a3 * hky.at(3) * V13.at(2);
596
597 answer.at(2, 20) = hky.at(4);
598 answer.at(2, 22) = -r3 / 2. * a4 * hky.at(4) * V24.at(2);
599 answer.at(2, 23) = r3 / 2. * a4 * hky.at(4) * V14.at(2);
600
601 answer.at(6, 1) = hky.at(1);
602 answer.at(6, 2) = hkx.at(1);
603 answer.at(6, 4) = -r3 / 2. * a1 * ( hkx.at(1) * V21.at(2) + hky.at(1) * V21.at(1) );
604 answer.at(6, 5) = r3 / 2. * a1 * ( hky.at(1) * V11.at(1) + hky.at(1) * V11.at(2) );
605
606 answer.at(6, 7) = hky.at(2);
607 answer.at(6, 8) = hkx.at(2);
608 answer.at(6, 10) = -r3 / 2. * a2 * ( hkx.at(2) * V22.at(2) + hky.at(2) * V22.at(1) );
609 answer.at(6, 11) = r3 / 2. * a2 * ( hky.at(2) * V12.at(1) + hky.at(2) * V12.at(2) );
610
611 answer.at(6, 13) = hky.at(3);
612 answer.at(6, 14) = hkx.at(3);
613 answer.at(6, 16) = -r3 / 2. * a3 * ( hkx.at(3) * V23.at(2) + hky.at(3) * V23.at(1) );
614 answer.at(6, 17) = r3 / 2. * a3 * ( hky.at(3) * V13.at(1) + hky.at(3) * V13.at(2) );
615
616 answer.at(6, 19) = hky.at(4);
617 answer.at(6, 20) = hkx.at(4);
618 answer.at(6, 22) = -r3 / 2. * a4 * ( hkx.at(4) * V24.at(2) + hky.at(4) * V24.at(1) );
619 answer.at(6, 23) = r3 / 2. * a4 * ( hky.at(4) * V14.at(1) + hky.at(4) * V14.at(2) );
620}
621
622
623std::array< double, 4 >
625{
626 const auto &c1 = this->giveNode(1)->giveCoordinates();
627 const auto &c2 = this->giveNode(2)->giveCoordinates();
628 const auto &c3 = this->giveNode(3)->giveCoordinates();
629 const auto &c4 = this->giveNode(4)->giveCoordinates();
630
631 return {
632 this->giveCrossSection()->give(CS_Thickness, c1, this, false),
633 this->giveCrossSection()->give(CS_Thickness, c2, this, false),
634 this->giveCrossSection()->give(CS_Thickness, c3, this, false),
635 this->giveCrossSection()->give(CS_Thickness, c4, this, false),
636 };
637}
638
639
640void
642{
644
645 auto e = this->computeLocalBaseVectors();
646
647 for ( int i = 1; i <= 3; i++ ) {
648 GtoLRotationMatrix.at(1, i) = e [ 0 ].at(i);
649 GtoLRotationMatrix.at(2, i) = e [ 1 ].at(i);
650 GtoLRotationMatrix.at(3, i) = e [ 2 ].at(i);
651 }
652}
653
654std::array< FloatArrayF< 3 >, 3 >
656{
657 // compute A - (node2+node3)/2
658 auto coordA = 0.5 * ( FloatArrayF< 3 >( this->giveNode(2)->giveCoordinates() ) + FloatArrayF< 3 >( this->giveNode(3)->giveCoordinates() ) );
659 // compute B - (node1+node4)/2
660 auto coordB = 0.5 * ( FloatArrayF< 3 >( this->giveNode(1)->giveCoordinates() ) + FloatArrayF< 3 >( this->giveNode(4)->giveCoordinates() ) );
661 // compute e1' = [B-A]
662 auto e1 = normalize(coordB - coordA);
663
664 // compute A - (node3+node4)/2
665 auto coordC = 0.5 * ( FloatArrayF< 3 >( this->giveNode(4)->giveCoordinates() ) + FloatArrayF< 3 >( this->giveNode(3)->giveCoordinates() ) );
666 // compute B - (node2+node1)/2
667 auto coordD = 0.5 * ( FloatArrayF< 3 >( this->giveNode(1)->giveCoordinates() ) + FloatArrayF< 3 >( this->giveNode(2)->giveCoordinates() ) );
668
669 // compute help = [D-C]
670 auto help = coordD - coordC;
671 // compute e3' : vector product of e1' x help
672 auto e3 = normalize( cross(e1, help) );
673 // now from e3' x e1' compute e2'
674 auto e2 = cross(e3, e1);
675 return { e1, e2, e3 };
676}
677
678std::array< FloatMatrixF< 3, 3 >, 4 >
680// Returns the rotation matrix of the reciever of the size [3,3]
681// {alpha_i,beta_i} = Ti * {rotL_xi, rotL_yi, rotL_zi}
682// alpha_i, beta_i - rotations about the components of director vector at node i
683// r1_i, r2_i, r3_i, - rotations about local coordinates e1', e2', e3'
684//
685// local coordinate (described by vector triplet e1',e2',e3') is defined as follows:
686//
687// e1' : [N4-N3] Ni - means i - th node
688// help : [N2-N3]
689// e3' : e1' x help
690// e2' : e3' x e1'
691{
692 //auto [e1, e2, e3, e4] = this->computeLocalBaseVectors();
693 auto e = this->computeLocalBaseVectors();
694 auto V = this->giveDirectorVectors();
695
696 std::array< FloatMatrixF< 3, 3 >, 4 >answer;
697 for ( int i = 0; i < 4; ++i ) {
698 auto Ve = normalize( cross(e [ 1 ], V [ i ]) );
699 auto VV = cross(V [ i ], Ve);
700
701 answer [ i ].at(1, 1) = dot(Ve, e [ 0 ]);
702 answer [ i ].at(1, 2) = dot(Ve, e [ 1 ]);
703 answer [ i ].at(1, 3) = dot(Ve, e [ 2 ]);
704
705 answer [ i ].at(2, 1) = dot(VV, e [ 0 ]);
706 answer [ i ].at(2, 2) = dot(VV, e [ 1 ]);
707 answer [ i ].at(2, 3) = dot(VV, e [ 2 ]);
708
709 answer [ i ].at(3, 1) = dot(V [ i ], e [ 0 ]);
710 answer [ i ].at(3, 2) = dot(V [ i ], e [ 1 ]);
711 answer [ i ].at(3, 3) = dot(V [ i ], e [ 2 ]);
712 }
713 return answer;
714}
715
716
717bool
719// Returns the rotation matrix of the receiver of the size [24,24]
720// r(local) = T * r(global)
721// for one node (r written transposed): {u,v,w,alpha,beta} = T * {u,v,w,r1,r2,r3}
722{
723 auto LtoDir = this->computeLToDirectorRotationMatrix();
724
725 answer.resize(24, 24);
726 answer.zero();
727
728 for ( int i = 0; i <= 3; i++ ) {
729 answer.setSubMatrix(GtoLRotationMatrix, i * 6 + 1, i * 6 + 1);
730 auto help = dot(LtoDir [ i ], GtoLRotationMatrix);
731 answer.setSubMatrix(help, i * 6 + 4, i * 6 + 4);
732 }
733
734 return 1;
735}
736
737
738void
740{
741 answer = this->giveStructuralCrossSection()->giveRealStress_3dDegeneratedShell(strain, gp, tStep);
742}
743
744
747{
748 auto mat = dynamic_cast< StructuralMaterial * >( this->giveStructuralCrossSection()->giveMaterial(gp) );
749
750 if ( type == GlobalForceTensor ) {
751 FloatArray localStress, localStrain;
752 this->computeStrainVector(localStrain, gp, tStep);
753 this->computeStressVector(localStress, localStrain, gp, tStep);
754 auto stress = mat->transformStressVectorTo(GtoLRotationMatrix, localStress, false);
755 return from_voigt_stress_6(stress);
756 } else if ( type == GlobalStrainTensor ) {
757 FloatArray localStrain;
758 this->computeStrainVector(localStrain, gp, tStep);
759 auto strain = mat->transformStrainVectorTo(GtoLRotationMatrix, localStrain, false);
760 return from_voigt_strain_6(strain);
761 } else {
762 throw std::runtime_error("unsupported tensor mode");
763 }
764}
765
766void
768{
769 FloatArray v;
770 fprintf(file, "element %d (%8d):\n", this->giveLabel(), number);
771
772 for ( int i = 0; i < nPointsXY; i++ ) {
773 fprintf(file, " GP %d :", i + 1);
774
775 fprintf(file, " forces ");
776 for ( auto &val : this->giveMidplaneIPValue(i, IST_ShellForceTensor, tStep) ) {
777 fprintf(file, " %.4e", val);
778 }
779
780 fprintf(file, "\n moments ");
781 for ( auto &val : this->giveMidplaneIPValue(i, IST_ShellMomentTensor, tStep) ) {
782 fprintf(file, " %.4e", val);
783 }
784
785 fprintf(file, "\n strains ");
786 for ( auto &val : this->giveMidplaneIPValue(i, IST_ShellStrainTensor, tStep) ) {
787 fprintf(file, " %.4e", val);
788 }
789
790 fprintf(file, "\n curvatures ");
791 for ( auto &val : this->giveMidplaneIPValue(i, IST_CurvatureTensor, tStep) ) {
792 fprintf(file, " %.4e", val);
793 }
794
795 for ( int j = 0; j < nPointsZ; j++ ) {
796 auto gp = integrationRulesArray [ 0 ]->getIntegrationPoint(nPointsZ * i + j);
797
798 fprintf(file, "\n GP %d.%d :", i + 1, j + 1);
799
800 this->giveIPValue(v, gp, IST_StrainTensor, tStep);
801 fprintf(file, " strains ");
802 for ( auto &val : v ) {
803 fprintf(file, " %.4e", val);
804 }
805
806 this->giveIPValue(v, gp, IST_StressTensor, tStep);
807 fprintf(file, "\n stresses ");
808 for ( auto &val : v ) {
809 fprintf(file, " %.4e", val);
810 }
811 }
812 fprintf(file, "\n");
813 }
814}
815
818{
819 if ( type == IST_ShellMomentTensor || type == IST_ShellForceTensor ) {
820 FloatArrayF< 6 >mLocal;
821
822 for ( int i = 0; i < nPointsZ; i++ ) {
823 auto gp = integrationRulesArray [ 0 ]->getIntegrationPoint(nPointsZ * gpXY + i);
824 double thickness = this->giveCrossSection()->give(CS_Thickness, gp->giveGlobalCoordinates(), this, false);
825 double J = thickness / 2.0;
826 double z;
827 if ( type == IST_ShellMomentTensor ) {
828 z = gp->giveNaturalCoordinates().at(3) * ( thickness / 2 );
829 } else { /*if ( type == IST_ShellForceTensor )*/
830 z = 1;
831 }
832 double w = gp->giveWeight() * J * z;
833
834 FloatArray localStress, localStrain;
835 this->computeStrainVector(localStrain, gp, tStep);
836 this->computeStressVector(localStress, localStrain, gp, tStep);
837 mLocal += w * FloatArrayF< 6 >(localStress);
838 }
839
840 // local to global
842 } else if ( type == IST_CurvatureTensor ) {
843 auto gp = integrationRulesArray [ 0 ]->getIntegrationPoint(nPointsZ * gpXY);
844 const auto &coords = gp->giveNaturalCoordinates();
845
846 //auto [hkx, hky] = this->givedNdx(coords);
847 auto hk = this->givedNdx(coords);
848
849 FloatArray dofs(24);
850 this->computeVectorOf(VM_Total, tStep, dofs);
851
852 FloatArrayF< 4 >rotX, rotY;
853 for ( int i = 0; i < 4; i++ ) {
854 rotX [ i ] = dofs.at(i * 6 + 4);
855 rotY [ i ] = dofs.at(i * 6 + 5);
856 }
857 FloatArrayF< 6 >cLocal;
858 cLocal.at(1) = dot(rotY, hk [ 0 ]);
859 cLocal.at(2) = -dot(rotX, hk [ 1 ]);
860 cLocal.at(6) = dot(rotY, hk [ 1 ]) - dot(rotX, hk [ 0 ]);
861
863 } else if ( type == IST_ShellStrainTensor ) {
864 auto gp = integrationRulesArray [ 0 ]->getIntegrationPoint(nPointsZ * gpXY);
865 auto coords = gp->giveNaturalCoordinates();
866 coords.at(3) = 0.; //set to midplane
867 GaussIntegrationRule iRule(1, this, 1, 10);
868 GaussPoint midGP(& iRule, 1, coords, 1, this->giveMaterialMode() );
869
870 FloatArray answer;
871 this->giveIPValue(answer, & midGP, IST_StrainTensor, tStep);
872 return answer;
873 } else {
874 throw std::runtime_error("unknown type");
875 }
876}
877
878std::array< FloatArrayF< 4 >, 2 >
880{
881 auto dn = interp_lin.evaldNdxi(coords [ { 0, 1 } ]);
882 auto J = this->giveJacobian(coords);
883 auto invJ = inv(J);
884 FloatMatrixF<2,2> invJ2 = invJ({ 0, 1 }, { 0, 1 });
885 auto dndx = dot(invJ2, dn);
886
887 auto hkx = dndx.row< 0 >();
888 auto hky = dndx.row< 1 >();
889 return { hkx, hky };
890}
891
892void
897
898int
900{
901 if ( type == IST_StrainTensor ) {
902 auto globTensor = this->giveCharacteristicTensor(GlobalStrainTensor, gp, tStep);
903 answer = to_voigt_strain_33(globTensor);
904 return 1;
905 } else if ( type == IST_StressTensor ) {
906 auto globTensor = this->giveCharacteristicTensor(GlobalForceTensor, gp, tStep);
907 answer = to_voigt_stress_33(globTensor);
908 return 1;
909 } else if ( type == IST_ShellMomentTensor || type == IST_ShellForceTensor || type == IST_CurvatureTensor || type == IST_ShellStrainTensor ) {
910 int gpnXY = ( gp->giveNumber() - 1 ) / 2;
911 answer = this->giveMidplaneIPValue(gpnXY, type, tStep);
912
913 return 1;
914 } else {
915 return StructuralElement::giveIPValue(answer, gp, type, tStep);
916 }
917}
918
919
920bool
922//converts global coordinates to local planar area coordinates,
923//does not return a coordinate in the thickness direction, but
924//does check that the point is in the element thickness
925{
926 // rotate the input point Coordinate System into the element CS
927 FloatArray llc;
928 auto inputCoords_ElCS = this->giveLocalCoordinates(coords);
929 std::vector< FloatArray >lc(3);
930 for ( int _i = 0; _i < 4; _i++ ) {
931 lc [ _i ] = this->giveLocalCoordinates( this->giveNode(_i + 1)->giveCoordinates() );
932 }
933 bool inplane = interp_lin.global2local(llc, inputCoords_ElCS, FEIVertexListGeometryWrapper(lc, interp_lin.giveGeometryType()) ) > 0;
934 answer.resize(2);
935 answer.at(1) = inputCoords_ElCS.at(1);
936 answer.at(2) = inputCoords_ElCS.at(2);
937 GaussPoint _gp(nullptr, 1, answer, 2.0, _2dPlate);
938 // now check if the third local coordinate is within the thickness of element
939 bool outofplane = ( fabs(inputCoords_ElCS.at(3) ) <= this->giveCrossSection()->give(CS_Thickness, & _gp) / 2. );
940
941 return inplane && outofplane;
942}
943
944
945
946int
948{
950 computeNmatrixAt(lcoords, N);
951
952 answer.resize(3);
953 for ( int _i = 1; _i <= 3; _i++ ) {
954 answer.at(_i) = N.at(_i, _i) * this->giveNode(1)->giveCoordinate(_i) + N.at(_i, _i + 6) * this->giveNode(2)->giveCoordinate(_i) + N.at(_i, _i + 12) * this->giveNode(3)->giveCoordinate(_i) + N.at(_i, _i + 18) * this->giveNode(4)->giveCoordinate(_i);
955 }
956 return true;
957}
958
959
960int
962// Returns the rotation matrix of the receiver of the size [5,6]
963// f(local) = T * f(global)
964{
965 answer.resize(6, 6);
966 answer.zero();
967
968 for ( int i = 1; i <= 3; i++ ) {
969 answer.at(1, i) = answer.at(4, i + 3) = GtoLRotationMatrix.at(1, i);
970 answer.at(2, i) = answer.at(5, i + 3) = GtoLRotationMatrix.at(2, i);
971 answer.at(3, i) = answer.at(6, i + 3) = GtoLRotationMatrix.at(3, i);
972 }
973
974 return 1;
975}
976
977
978void
980 InternalStateType type, TimeStep *tStep)
981{
983 std::vector< FloatArrayF< 3 > >r;
984 FloatArray val;
985 int size = 0;
986 for ( GaussPoint *gp : * integrationRulesArray [ 0 ] ) {
987 giveIPValue(val, gp, type, tStep);
988 if ( size == 0 ) {
989 size = val.giveSize();
990 r.resize(size);
991 }
992
993 const auto &coord = gp->giveNaturalCoordinates();
994 double u = coord.at(1);
995 double v = coord.at(2);
996
997 A.at(1, 1) += 1;
998 A.at(1, 2) += u;
999 A.at(1, 3) += v;
1000 A.at(2, 1) += u;
1001 A.at(2, 2) += u * u;
1002 A.at(2, 3) += u * v;
1003 A.at(3, 1) += v;
1004 A.at(3, 2) += v * u;
1005 A.at(3, 3) += v * v;
1006
1007 for ( int j = 1; j <= size; j++ ) {
1008 double y = val.at(j);
1009 r [ j ].at(1) += y;
1010 r [ j ].at(2) += y * u;
1011 r [ j ].at(3) += y * v;
1012 }
1013 }
1014
1015 auto invA = inv(A);
1016 std::vector< FloatArrayF< 3 > >b(size);
1017 for ( int i = 0; i < size; ++i ) {
1018 b [ i ] = dot(invA, r [ i ]);
1019 }
1020
1021 double x1 = 0.0, x2 = 0.0;
1022 switch ( node ) {
1023 case 1:
1024 x1 = 1.0;
1025 x2 = 1.0;
1026 break;
1027 case 2:
1028 x1 = -1.0;
1029 x2 = 1.0;
1030 break;
1031 case 3:
1032 x1 = -1.0;
1033 x2 = -1.0;
1034 break;
1035 case 4:
1036 x1 = 1.0;
1037 x2 = -1.0;
1038 break;
1039 default:
1040 OOFEM_ERROR("unsupported node");
1041 }
1042
1043 answer.resize(size);
1044 for ( int j = 1; j <= size; j++ ) {
1045 answer.at(j) = b [ j ].at(1) + x1 * b [ j ].at(2) + x2 * b [ j ].at(3);
1046 }
1047}
1048
1049
1050void
1052{
1053 if ( iEdge == 1 ) { // edge between nodes 1 2
1054 answer = {
1055 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
1056 };
1057 } else if ( iEdge == 2 ) { // edge between nodes 2 3
1058 answer = {
1059 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
1060 };
1061 } else if ( iEdge == 3 ) { // edge between nodes 3 4
1062 answer = {
1063 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
1064 };
1065 } else if ( iEdge == 4 ) { // edge between nodes 4 1
1066 answer = {
1067 19, 20, 21, 22, 23, 24, 1, 2, 3, 4, 5, 6
1068 };
1069 } else {
1070 OOFEM_ERROR("wrong edge number");
1071 }
1072}
1073
1074
1075double
1077{
1078 auto lcF = this->giveNodeCoordinates();
1079 std::vector< FloatArray > lc(4);
1080 lc [ 0 ] = lcF [ 0 ];
1081 lc [ 1 ] = lcF [ 1 ];
1082 lc [ 2 ] = lcF [ 2 ];
1083 lc [ 3 ] = lcF [ 3 ];
1084 double detJ = this->interp_lin.edgeGiveTransformationJacobian(iEdge, gp->giveNaturalCoordinates(), FEIVertexListGeometryWrapper(lc, interp_lin.giveGeometryType()) );
1085 return detJ * gp->giveWeight();
1086}
1087
1088#if 0
1089void
1090MITC4Shell::computeEdgeIpGlobalCoords(FloatArray &answer, GaussPoint *gp, int iEdge)
1091{
1092 auto lc = this->giveNodeCoordinates();
1093
1094 FloatArray local;
1096 local.resize(3);
1097 local.at(3) = 0.;
1098
1099 answer = local; // MITC4 - todo
1100 // answer.beProductOf(this->lcsMatrix, local);
1101}
1102#endif
1103
1104int
1106{
1107 auto e = this->computeLocalBaseVectors();
1108
1109 const auto &edgeNodes = this->interp_lin.computeLocalEdgeMapping(iEdge);
1110
1111 auto n1 = FloatArrayF< 3 >( this->giveNode(edgeNodes.at(1) )->giveCoordinates() );
1112 auto n2 = FloatArrayF< 3 >( this->giveNode(edgeNodes.at(2) )->giveCoordinates() );
1113
1114 auto xl = normalize(n1 - n2);
1115 auto yl = cross(e [ 2 ], xl);
1116
1117 answer.resize(6, 6);
1118 answer.zero();
1119
1120 answer.at(1, 1) = answer.at(4, 4) = dot(e [ 0 ], xl);
1121 answer.at(1, 2) = answer.at(4, 5) = dot(e [ 0 ], yl);
1122 answer.at(1, 3) = answer.at(4, 6) = dot(e [ 0 ], e [ 2 ]);
1123 answer.at(2, 1) = answer.at(5, 4) = dot(e [ 1 ], xl);
1124 answer.at(2, 2) = answer.at(5, 5) = dot(e [ 1 ], yl);
1125 answer.at(2, 3) = answer.at(5, 6) = dot(e [ 1 ], e [ 2 ]);
1126 answer.at(3, 1) = answer.at(6, 4) = dot(e [ 2 ], xl);
1127 answer.at(3, 2) = answer.at(6, 5) = dot(e [ 2 ], yl);
1128 answer.at(3, 3) = answer.at(6, 6) = dot(e [ 2 ], e [ 2 ]);
1129
1130 return 1;
1131}
1132
1133
1134
1135void
1137{
1138 const auto &coords2 = sgp->giveNaturalCoordinates();
1139 FloatArray coords = Vec3( coords2 [ 0 ], coords2 [ 1 ], 0. );
1140 this->computeNmatrixAt(coords, answer);
1141}
1142
1143void
1145{
1146 if ( iSurf == 1 ) {
1147 answer.enumerate(24);
1148 } else {
1149 OOFEM_ERROR("wrong surface number");
1150 }
1151}
1152
1153double
1155{
1156 FloatArrayF< 2 >lcoords = {
1157 gp->giveNaturalCoordinate(1),
1158 gp->giveNaturalCoordinate(2),
1159 };
1160
1161 auto xyz = this->giveNodeCoordinates();
1162 auto dn = interp_lin.evaldNdxi(lcoords);
1163
1164 FloatMatrixF< 2, 2 >jacobianMatrix;
1165 for ( std::size_t i = 0; i < dn.cols(); i++ ) {
1166 double x = xyz [ i ] [ 0 ];
1167 double y = xyz [ i ] [ 1 ];
1168
1169 jacobianMatrix(0, 0) += dn(0, i) * x;
1170 jacobianMatrix(0, 1) += dn(0, i) * y;
1171 jacobianMatrix(1, 0) += dn(1, i) * x;
1172 jacobianMatrix(1, 1) += dn(1, i) * y;
1173 }
1174
1175 return det(jacobianMatrix) * gp->giveWeight();
1176}
1177
1178void
1179MITC4Shell::computeEdgeNMatrix(FloatMatrix &answer, int boundaryID, const FloatArray &lcoords)
1180{
1181 FloatArray n_vec;
1182 this->giveInterpolation()->boundaryEdgeEvalN(n_vec, boundaryID, lcoords, FEIElementGeometryWrapper(this) );
1183 answer.beNMatrixOf(n_vec, 6);
1184}
1185
1186
1187void
1188MITC4Shell::computeSurfaceNMatrix(FloatMatrix &answer, int boundaryID, const FloatArray &lcoords)
1189{
1190 FloatArray n_vec;
1191 this->giveInterpolation()->boundarySurfaceEvalN(n_vec, boundaryID, lcoords, FEIElementGeometryWrapper(this) );
1192 answer.beNMatrixOf(n_vec, 6);
1193}
1194
1195
1196//
1197// io routines
1198//
1199#ifdef __OOFEG
1200
1201void
1202MITC4Shell :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
1203{
1204 WCRec p [ 4 ];
1205 GraphicObj *go;
1206
1207 if ( !gc.testElementGraphicActivity(this) ) {
1208 return;
1209 }
1210
1211 if ( this->isActivated(tStep) ) {
1212 EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH);
1213 EASValsSetColor( gc.getElementColor() );
1214 EASValsSetEdgeColor( gc.getElementEdgeColor() );
1215 EASValsSetEdgeFlag(true);
1216 EASValsSetFillStyle(FILL_SOLID);
1217 EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
1218 for (int i=0; i<4; i++) {
1219 p [ i ].x = ( FPNum ) this->giveNode(i+1)->giveCoordinate(1);
1220 p [ i ].y = ( FPNum ) this->giveNode(i+1)->giveCoordinate(2);
1221 p [ i ].z = ( FPNum ) this->giveNode(i+1)->giveCoordinate(3);
1222 }
1223 go = CreateQuad3D(p);
1224 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
1225 EGAttachObject(go, ( EObjectP ) this);
1226 EMAddGraphicsToModel(ESIModel(), go);
1227 }
1228}
1229
1230void
1231MITC4Shell :: drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType type)
1232{
1233 WCRec p [ 4 ];
1234 GraphicObj *go;
1235 double defScale = gc.getDefScale();
1236
1237 if ( !gc.testElementGraphicActivity(this) ) {
1238 return;
1239 }
1240
1241 if ( this->isActivated(tStep) ) {
1242 EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH);
1243 EASValsSetColor( gc.getDeformedElementColor() );
1244 EASValsSetEdgeColor( gc.getElementEdgeColor() );
1245 EASValsSetEdgeFlag(true);
1246 EASValsSetFillStyle(FILL_SOLID);
1247 EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER);
1248 for (int i=0; i<4; i++) {
1249 p [ i ].x = ( FPNum ) this->giveNode(i+1)->giveUpdatedCoordinate(1, tStep, defScale);
1250 p [ i ].y = ( FPNum ) this->giveNode(i+1)->giveUpdatedCoordinate(2, tStep, defScale);
1251 p [ i ].z = ( FPNum ) this->giveNode(i+1)->giveUpdatedCoordinate(3, tStep, defScale);
1252 }
1253 go = CreateQuad3D(p);
1254 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
1255 EMAddGraphicsToModel(ESIModel(), go);
1256 }
1257}
1258
1259void
1260MITC4Shell :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
1261{
1262 int indx, result = 0;
1263 WCRec p [ 4 ];
1264 GraphicObj *tr;
1265 FloatArray v1, v2, v3, v4;
1266 double s [ 4 ], defScale;
1267 if ( !gc.testElementGraphicActivity(this) ) {
1268 return;
1269 }
1270
1271 if ( !this->isActivated(tStep) ) {
1272 return;
1273 }
1274
1275 if ( gc.giveIntVarMode() == ISM_recovered ) {
1276 result += this->giveInternalStateAtNode(v1, gc.giveIntVarType(), gc.giveIntVarMode(), 1, tStep);
1277 result += this->giveInternalStateAtNode(v2, gc.giveIntVarType(), gc.giveIntVarMode(), 2, tStep);
1278 result += this->giveInternalStateAtNode(v3, gc.giveIntVarType(), gc.giveIntVarMode(), 3, tStep);
1279 result += this->giveInternalStateAtNode(v4, gc.giveIntVarType(), gc.giveIntVarMode(), 4, tStep);
1280 } else if ( gc.giveIntVarMode() == ISM_local ) {
1281 double tot_w = 0.;
1282 FloatArray a, v;
1283 for ( GaussPoint *gp: *this->giveDefaultIntegrationRulePtr() ) {
1284 this->giveIPValue(a, gp, IST_ShellMomentTensor, tStep);
1285 v.add(gp->giveWeight(), a);
1286 tot_w += gp->giveWeight();
1287 }
1288 v.times(1. / tot_w);
1289 v1 = v;
1290 v2 = v;
1291 v3 = v;
1292 v4 = v;
1293 }
1294
1295 indx = gc.giveIntVarIndx();
1296
1297 s [ 0 ] = v1.at(indx);
1298 s [ 1 ] = v2.at(indx);
1299 s [ 2 ] = v3.at(indx);
1300 s [ 3 ] = v4.at(indx);
1301 EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER);
1302 if ( gc.getScalarAlgo() == SA_ISO_SURF ) {
1303 for ( int i = 0; i < 4; i++ ) {
1304 if ( gc.getInternalVarsDefGeoFlag() ) {
1305 // use deformed geometry
1306 defScale = gc.getDefScale();
1307 p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale);
1308 p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(2, tStep, defScale);
1309 p [ i ].z = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(3, tStep, defScale);
1310 } else {
1311 p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1);
1312 p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2);
1313 p [ i ].z = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(3);
1314 }
1315 }
1316 // //EASValsSetColor(gc.getYieldPlotColor(ratio));
1317 gc.updateFringeTableMinMax(s, 3);
1318 tr = CreateQuadWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ], s[3]);
1319 EGWithMaskChangeAttributes(LAYER_MASK, tr);
1320 EMAddGraphicsToModel(ESIModel(), tr);
1321 }
1322}
1323
1324#endif
1325
1326
1327
1328
1329} // end namespace oofem
#define N(a, b)
#define REGISTER_Element(class)
void giveNodeNeighbourList(IntArray &answer, IntArray &nodeList)
virtual double give(CrossSectionProperty a, GaussPoint *gp) const
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
double giveCoordinate(int i) const
Definition dofmanager.h:383
const FloatArray & giveCoordinates() const
Definition dofmanager.h:390
ConnectivityTable * giveConnectivityTable()
Definition domain.C:1240
Element * giveElement(int n)
Definition domain.C:165
ParameterManager elementPPM
Definition domain.h:133
Node * giveNode(int i) const
Definition element.h:629
virtual bool isActivated(TimeStep *tStep)
Definition element.C:838
void initializeFrom(InputRecord &ir, int priority) override
Definition element.C:687
static ParamKey IPK_Element_nip
Definition element.h:207
int numberOfDofMans
Number of dofmanagers.
Definition element.h:136
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Definition element.C:103
void postInitialize() override
Performs post initialization steps.
Definition element.C:797
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition element.h:157
int numberOfGaussPoints
Definition element.h:175
CrossSection * giveCrossSection()
Definition element.C:534
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
Definition element.h:886
int giveLabel() const
Definition element.h:1125
void edgeLocal2global(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const override
virtual void boundaryEdgeEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual void boundarySurfaceEvalN(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
Domain * giveDomain() const
Definition femcmpnn.h:97
int number
Component number.
Definition femcmpnn.h:77
int giveNumber() const
Definition femcmpnn.h:104
double & at(std::size_t i)
void assemble(const FloatArray &fe, const IntArray &loc)
Definition floatarray.C:616
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
double dotProduct(const FloatArray &x) const
Definition floatarray.C:524
Index giveSize() const
Returns the size of receiver.
Definition floatarray.h:261
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Definition floatarray.C:689
void add(const FloatArray &src)
Definition floatarray.C:218
void beSubArrayOf(const FloatArray &src, const IntArray &indx)
Definition floatarray.C:440
void times(double s)
Definition floatarray.C:834
double at(std::size_t i, std::size_t j) const
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
void beNMatrixOf(const FloatArray &n, int nsd)
void setSubMatrix(const FloatMatrix &src, int sr, int sc)
void zero()
Zeroes all coefficient of receiver.
void plusDyadSymmUpper(const FloatArray &a, double dV)
void assemble(const FloatMatrix &src, const IntArray &loc)
double at(std::size_t i, std::size_t j) const
int giveNumber()
Returns number of receiver.
Definition gausspoint.h:183
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
Definition gausspoint.h:136
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition gausspoint.h:138
double giveWeight()
Returns integration weight of receiver.
Definition gausspoint.h:180
void enumerate(int maxVal)
Definition intarray.C:85
void resize(int n)
Definition intarray.C:73
int & at(std::size_t i)
Definition intarray.h:104
int giveSize() const
Definition intarray.h:211
int giveNumberOfIntegrationPoints() const
Interface * giveInterface(InterfaceType interface) override
Definition mitc4.C:98
double computeEdgeVolumeAround(GaussPoint *gp, int iEdge) override
Definition mitc4.C:1076
void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord) override
Definition mitc4.C:423
void SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap) override
Definition mitc4.C:115
std::array< FloatArrayF< 3 >, 4 > giveLocalDirectorVectors()
Definition mitc4.C:219
MaterialMode giveMaterialMode() override
Definition mitc4.h:103
void printOutputAt(FILE *file, TimeStep *tStep) override
Definition mitc4.C:767
double computeVolumeAround(GaussPoint *gp) override
Definition mitc4.C:305
void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep) override
Definition mitc4.C:372
FEInterpolation * giveInterpolation() const override
Definition mitc4.C:87
std::array< FloatArrayF< 4 >, 2 > givedNdx(const FloatArrayF< 3 > &coords)
Definition mitc4.C:879
void postInitialize() override
Performs post initialization steps.
Definition mitc4.C:641
std::array< double, 4 > giveThickness()
Definition mitc4.C:624
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
Definition mitc4.C:899
FloatMatrixF< 3, 3 > giveJacobian(const FloatArrayF< 3 > &lcoords)
Definition mitc4.C:319
void computeSurfaceNMatrixAt(FloatMatrix &answer, int iSurf, GaussPoint *sgp)
Definition mitc4.C:1136
void giveSurfaceDofMapping(IntArray &answer, int iSurf) const override
Definition mitc4.C:1144
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
Definition mitc4.C:739
void initializeFrom(InputRecord &ir, int priority) override
Definition mitc4.C:286
std::array< FloatArrayF< 3 >, 3 > computeLocalBaseVectors()
Definition mitc4.C:655
static ParamKey IPK_MITC4Shell_nipZ
Definition mitc4.h:88
bool computeLocalCoordinates(FloatArray &answer, const FloatArray &coords) override
Definition mitc4.C:921
void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap) override
Definition mitc4.C:125
FloatArray giveMidplaneIPValue(int gpXY, InternalStateType type, TimeStep *tStep)
Definition mitc4.C:817
std::array< FloatMatrixF< 3, 3 >, 4 > computeLToDirectorRotationMatrix()
Definition mitc4.C:679
int SPRNodalRecoveryMI_giveNumberOfIP() override
Definition mitc4.C:145
void giveDofManDofIDMask(int inode, IntArray &) const override
Definition mitc4.C:297
FloatMatrix giveCharacteristicTensor(CharTensor type, GaussPoint *gp, TimeStep *tStep)
Definition mitc4.C:746
void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS) override
Definition mitc4.C:471
std::array< FloatArrayF< 3 >, 4 > giveDirectorVectors()
Definition mitc4.C:170
SPRPatchType SPRNodalRecoveryMI_givePatchType() override
Definition mitc4.C:152
std::array< FloatArrayF< 3 >, 4 > giveNodeCoordinates()
Definition mitc4.C:269
static ParamKey IPK_MITC4Shell_directorType
Definition mitc4.h:89
int computeLoadGToLRotationMtrx(FloatMatrix &answer) override
Definition mitc4.C:961
void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep) override
Definition mitc4.C:979
double computeSurfaceVolumeAround(GaussPoint *gp, int iSurf) override
Definition mitc4.C:1154
MITC4Shell(int n, Domain *d)
Definition mitc4.C:74
void computeEdgeNMatrix(FloatMatrix &answer, int boundaryID, const FloatArray &lcoords) override
computes edge interpolation matrix
Definition mitc4.C:1179
FloatMatrixF< 3, 3 > GtoLRotationMatrix
Definition mitc4.h:84
void setupIRForMassMtrxIntegration(IntegrationRule &iRule) override
Definition mitc4.C:893
FloatArrayF< 3 > giveLocalCoordinates(const FloatArrayF< 3 > &global)
Definition mitc4.C:279
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
Definition mitc4.C:260
void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer) override
Definition mitc4.C:232
void computeSurfaceNMatrix(FloatMatrix &answer, int boundaryID, const FloatArray &lcoords) override
Definition mitc4.C:1188
double drillCoeff
Definition mitc4.h:86
int computeLoadLEToLRotationMatrix(FloatMatrix &answer, int iEdge, GaussPoint *gp) override
Definition mitc4.C:1105
bool computeGtoLRotationMatrix(FloatMatrix &answer) override
Definition mitc4.C:718
void giveEdgeDofMapping(IntArray &answer, int iEdge) const override
Definition mitc4.C:1051
void computeGaussPoints() override
Definition mitc4.C:159
int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords) override
Definition mitc4.C:947
static FEI2dQuadLin interp_lin
Element geometry approximation.
Definition mitc4.h:79
SpatialLocalizerInterface(Element *element)
virtual FloatArrayF< 6 > giveRealStress_3dDegeneratedShell(const FloatArrayF< 6 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const
Material * giveMaterial(IntegrationPoint *ip) const override
virtual void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord=0)
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
StructuralElement(int n, Domain *d)
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
virtual void computeStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep) override
static FloatArrayF< 6 > transformStrainVectorTo(const FloatMatrixF< 3, 3 > &base, const FloatArrayF< 6 > &strain, bool transpose=false)
static FloatArrayF< 6 > transformStressVectorTo(const FloatMatrixF< 3, 3 > &base, const FloatArrayF< 6 > &stress, bool transpose=false)
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
#define OOFEM_ERROR(...)
Definition error.h:79
FloatArrayF< 6 > to_voigt_stress_33(const FloatMatrixF< 3, 3 > &t)
FloatArrayF< 6 > to_voigt_strain_33(const FloatMatrixF< 3, 3 > &t)
@ CS_DrillingType
Type of artificially added drilling stiffness for drilling DOFs.
@ CS_DirectorVectorY
Director vector component in y-axis.
@ CS_DrillingStiffness
Penalty stiffness for drilling DOFs.
@ CS_RelDrillingStiffness
Relative penalty stiffness for drilling DOFs.
@ CS_DirectorVectorX
Director vector component in x-axis.
@ CS_Thickness
Thickness.
@ CS_DirectorVectorZ
Director vector component in z-axis.
FloatMatrixF< 3, 3 > from_voigt_strain_6(const FloatArrayF< 6 > &v)
FloatMatrixF< 3, 3 > from_voigt_stress_6(const FloatArrayF< 6 > &v)
double det(const FloatMatrixF< 2, 2 > &mat)
Computes the determinant.
FloatArrayF< 3 > cross(const FloatArrayF< 3 > &x, const FloatArrayF< 3 > &y)
Computes $ x \cross y $.
double dot(const FloatArray &x, const FloatArray &y)
FloatMatrixF< N, N > inv(const FloatMatrixF< N, N > &mat, double zeropiv=1e-24)
Computes the inverse.
@ SPRNodalRecoveryModelInterfaceType
@ ZZNodalRecoveryModelInterfaceType
@ SpatialLocalizerInterfaceType
@ NodalAveragingRecoveryModelInterfaceType
FloatArrayF< N > normalize(const FloatArrayF< N > &x)
Normalizes vector (L2 norm).
FloatMatrixF< N, N > eye()
Constructs an identity matrix.
static FloatArray Vec3(const double &a, const double &b, const double &c)
Definition floatarray.h:607
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_VARPLOT_PATTERN_LAYER
#define OOFEG_DEFORMED_GEOMETRY_LAYER
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_LAYER
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)

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