OOFEM 3.0
Loading...
Searching...
No Matches
structural2delement.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 "feinterpol2d.h"
37#include "gausspoint.h"
40#include "mathfem.h"
41#include "parametermanager.h"
42#include "paramkey.h"
43
44namespace oofem {
45
47
49 NLStructuralElement(n, aDomain),
50 matRotation(false)
51{
53}
54
61
62
63void
70
71
72void
74{
75 // Element must be created before giveNumberOfNodes can be called
77 this->numberOfDofMans = this->giveNumberOfNodes();
78}
79
80
81int
83{
84 return numberOfDofMans;//this->giveInterpolation()->giveNumberOfNodes(this->giveGeometryType());
85}
86
87
97
98
99int
101{
103 IntArray dofIdMask;
104 this->giveDofManDofIDMask(-1, dofIdMask); // ok for standard elements
105 return this->giveInterpolation()->giveNumberOfNodes(this->giveGeometryType()) * dofIdMask.giveSize();
106}
107
108
109void
111{
112 answer = {
113 D_u, D_v
114 };
115}
116
117
118double
120{
121 // Computes the volume element dV associated with the given gp.
122
123 double weight = gp->giveWeight();
124 const FloatArray &lCoords = gp->giveNaturalCoordinates(); // local/natural coords of the gp (parent domain)
125 double detJ = fabs(this->giveInterpolation()->giveTransformationJacobian(lCoords, * this->giveCellGeometryWrapper() ) );
126 double thickness = this->giveCrossSection()->give(CS_Thickness, gp); // the cross section keeps track of the thickness
127
128 return detJ * thickness * weight; // dV
129}
130
131
132void
134{
135 // Sets up the integration rule array which contains all the Gauss points
136 // Default: create one integration rule
137 if ( integrationRulesArray.size() == 0 ) {
138 integrationRulesArray.resize(1);
139 integrationRulesArray [ 0 ] = std::make_unique< GaussIntegrationRule >(1, this, 1, 3);
141 }
142}
143
144
145void
147{
148 if ( this->elemLocalCS.isNotEmpty() ) { // User specified orientation
149 x = Vec2(
150 elemLocalCS.at(1, 1), elemLocalCS.at(2, 1)
151 );
152 y = Vec2(
153 -x(1), x(0)
154 );
155 } else {
156 FloatMatrix jac;
157 this->giveInterpolation()->giveJacobianMatrixAt(jac, lcoords, * this->giveCellGeometryWrapper() );
158 x.beColumnOf(jac, 1); // This is {dx/dxi, dy/dxi, dz/dxi}
159 x.normalize();
160 y = Vec2(
161 -x(1), x(0)
162 );
163 }
164}
165
166
167double
169{
170 return this->giveCharacteristicLengthForPlaneElements(normalToCrackPlane);
171}
172
173
174
175// Edge support
176
177void
179{
180 /*
181 * provides dof mapping of local edge dofs (only nonzero are taken into account)
182 * to global element dofs
183 */
184 const auto &eNodes = static_cast< FEInterpolation2d * >( this->giveInterpolation() )->computeLocalEdgeMapping(iEdge);
185
186 answer.resize(eNodes.giveSize() * 2);
187 for ( int i = 1; i <= eNodes.giveSize(); i++ ) {
188 answer.at(i * 2 - 1) = eNodes.at(i) * 2 - 1;
189 answer.at(i * 2) = eNodes.at(i) * 2;
190 }
191}
192
193
194double
196{
197 /* Returns the line element ds associated with the given gp on the specific edge.
198 * Note: The name is misleading since there is no volume to speak of in this case.
199 * The returned value is used for integration of a line integral (external forces).
200 */
201 double detJ = static_cast< FEInterpolation2d * >( this->giveInterpolation() )->
202 edgeGiveTransformationJacobian(iEdge, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
203 return detJ * gp->giveWeight();
204}
205
206
207int
209{
210 // returns transformation matrix from
211 // edge local coordinate system
212 // to element local c.s
213 // (same as global c.s in this case)
214 //
215 // i.e. f(element local) = T * f(edge local)
216 //
217 FloatArray normal(2);
218
219 static_cast< FEInterpolation2d * >( this->giveInterpolation() )->
220 edgeEvalNormal(normal, iEdge, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
221
222 answer.resize(2, 2);
223 answer.zero();
224 answer.at(1, 1) = normal.at(2);
225 answer.at(1, 2) = normal.at(1);
226 answer.at(2, 1) = -normal.at(1);
227 answer.at(2, 2) = normal.at(2);
228
229 return 1;
230}
231
232
233// Plane stress
234
236 Structural2DElement(n, aDomain)
237 // Constructor. Creates an element with number n, belonging to aDomain.
238{}
239
240
241void
242PlaneStressElement::computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx, int upperIndx)
243{
244 FEInterpolation *interp = this->giveInterpolation();
245 FloatMatrix dNdx;
246 interp->evaldNdx(dNdx, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
247
248 answer.resize(3, dNdx.giveNumberOfRows() * 2);
249 answer.zero();
250
251 for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
252 answer.at(1, i * 2 - 1) = dNdx.at(i, 1);
253 answer.at(2, i * 2 - 0) = dNdx.at(i, 2);
254
255 answer.at(3, 2 * i - 1) = dNdx.at(i, 2);
256 answer.at(3, 2 * i - 0) = dNdx.at(i, 1);
257 }
258}
259
260
261void
263{
264 // Returns the [ 4 x (nno*2) ] displacement gradient matrix {BH} of the receiver,
265 // evaluated at gp.
267
268 FloatMatrix dNdx;
269 this->giveInterpolation()->evaldNdx(dNdx, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
270
271 answer.resize(4, dNdx.giveNumberOfRows() * 2);
272 answer.zero();
273
274 for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
275 answer.at(1, 2 * i - 1) = dNdx.at(i, 1); // du/dx -1
276 answer.at(2, 2 * i - 0) = dNdx.at(i, 2); // dv/dy -2
277 answer.at(3, 2 * i - 1) = dNdx.at(i, 2); // du/dy -6
278 answer.at(4, 2 * i - 0) = dNdx.at(i, 1); // dv/dx -9
279 }
280}
281
282
283void
285{
286 if ( this->matRotation ) {
288 FloatArray x, y;
290 // Transform to material c.s.
291 FloatArrayF< 3 >rotStrain = {
292 e [ 0 ] * x [ 0 ] * x [ 0 ] + e [ 2 ] * x [ 0 ] * x [ 1 ] + e [ 1 ] * x [ 1 ] * x [ 1 ],
293 e [ 0 ] * y [ 0 ] * y [ 0 ] + e [ 2 ] * y [ 0 ] * y [ 1 ] + e [ 1 ] * y [ 1 ] * y [ 1 ],
294 2 * e [ 0 ] * x [ 0 ] * y [ 0 ] + 2 * e [ 1 ] * x [ 1 ] * y [ 1 ] + e [ 2 ] * ( x [ 1 ] * y [ 0 ] + x [ 0 ] * y [ 1 ] )
295 };
296
297 auto s = this->giveStructuralCrossSection()->giveRealStress_PlaneStress(rotStrain, gp, tStep);
298
299 answer = Vec3(
300 s [ 0 ] * x [ 0 ] * x [ 0 ] + 2 * s [ 2 ] * x [ 0 ] * y [ 0 ] + s [ 1 ] * y [ 0 ] * y [ 0 ],
301 s [ 0 ] * x [ 1 ] * x [ 1 ] + 2 * s [ 2 ] * x [ 1 ] * y [ 1 ] + s [ 1 ] * y [ 1 ] * y [ 1 ],
302 s [ 1 ] * y [ 0 ] * y [ 1 ] + s [ 0 ] * x [ 0 ] * x [ 1 ] + s [ 2 ] * ( x [ 1 ] * y [ 0 ] + x [ 0 ] * y [ 1 ] )
303 );
304 } else {
305 answer = this->giveStructuralCrossSection()->giveRealStress_PlaneStress(e, gp, tStep);
306 }
307}
308
309
310void
312{
313 answer = this->giveStructuralCrossSection()->giveStiffnessMatrix_PlaneStress(rMode, gp, tStep);
314 if ( this->matRotation ) {
315 FloatArray x, y;
316 FloatMatrix Q;
317
319
320 Q = FloatMatrix({
321 { x(0) * x(0), x(1) * x(1), x(0) * x(1) },
322 { y(0) * y(0), y(1) * y(1), y(0) * y(1) },
323 { 2 * x(0) * y(0), 2 * x(1) * y(1), x(1) * y(0) + x(0) * y(1) }
324 });
325 answer.rotatedWith(Q, 't');
326 }
327}
328
329void
331{
332 answer = this->giveStructuralCrossSection()->giveStiffnessMatrix_dPdF_PlaneStress(rMode, gp, tStep);
333 if ( this->matRotation ) {
334 FloatArray x, y;
335 FloatMatrix Q;
336
338
339 Q = FloatMatrix({
340 { x(0) * x(0), x(1) * x(1), x(0) * x(1), x(1) * x(0) },
341 { y(0) * y(0), y(1) * y(1), y(0) * y(1), y(1) * y(0) },
342 { x(0) * y(0), x(1) * y(1), x(0) * y(1), x(1) * y(0) },
343 { y(0) * x(0), y(1) * x(1), y(0) * x(1), y(1) * x(0) }
344 });
345 answer.rotatedWith(Q, 't');
346 }
347}
348
349
350// Plane strain
351
352
354 Structural2DElement(n, aDomain)
355 // Constructor. Creates an element with number n, belonging to aDomain.
356{}
357
358
359void
360PlaneStrainElement::computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx, int upperIndx)
361// Returns the [ 4 x (nno*2) ] strain-displacement matrix {B} of the receiver,
362// evaluated at gp.
363{
364 FEInterpolation *interp = this->giveInterpolation();
365 FloatMatrix dNdx;
366 interp->evaldNdx(dNdx, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
367
368
369 answer.resize(4, dNdx.giveNumberOfRows() * 2);
370 answer.zero();
371
372 for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
373 answer.at(1, i * 2 - 1) = dNdx.at(i, 1);
374 answer.at(2, i * 2 - 0) = dNdx.at(i, 2);
375
376 answer.at(4, 2 * i - 1) = dNdx.at(i, 2);
377 answer.at(4, 2 * i - 0) = dNdx.at(i, 1);
378 }
379}
380
381
382void
384{
385 // Returns the [ 5 x (nno*2) ] displacement gradient matrix {BH} of the receiver,
386 // evaluated at gp.
388
389 FloatMatrix dNdx;
390 this->giveInterpolation()->evaldNdx(dNdx, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
391
392 answer.resize(4, dNdx.giveNumberOfRows() * 2);
393 answer.zero();
394
395 for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
396 answer.at(1, 2 * i - 1) = dNdx.at(i, 1); // du/dx -1
397 answer.at(2, 2 * i - 0) = dNdx.at(i, 2); // dv/dy -2
398 answer.at(4, 2 * i - 1) = dNdx.at(i, 2); // du/dy -6
399 answer.at(5, 2 * i - 0) = dNdx.at(i, 1); // dv/dx -9
400 }
401}
402
403
404void
406{
407 if ( this->matRotation ) {
409 FloatArray x, y;
410
412 // Transform to material c.s.
413 FloatArrayF< 4 >rotStrain = {
414 e [ 0 ] * x [ 0 ] * x [ 0 ] + e [ 3 ] * x [ 0 ] * x [ 1 ] + e [ 1 ] * x [ 1 ] * x [ 1 ],
415 e [ 0 ] * y [ 0 ] * y [ 0 ] + e [ 3 ] * y [ 0 ] * y [ 1 ] + e [ 1 ] * y [ 1 ] * y [ 1 ],
416 e [ 2 ],
417 2 * e [ 0 ] * x [ 0 ] * y [ 0 ] + 2 * e [ 1 ] * x [ 1 ] * y [ 1 ] + e [ 3 ] * ( x [ 1 ] * y [ 0 ] + x [ 0 ] * y [ 1 ] )
418 };
419 auto s = this->giveStructuralCrossSection()->giveRealStress_PlaneStrain(rotStrain, gp, tStep);
420 answer = Vec4(
421 s [ 0 ] * x [ 0 ] * x [ 0 ] + 2 * s [ 3 ] * x [ 0 ] * y [ 0 ] + s [ 1 ] * y [ 0 ] * y [ 0 ],
422 s [ 0 ] * x [ 1 ] * x [ 1 ] + 2 * s [ 3 ] * x [ 1 ] * y [ 1 ] + s [ 1 ] * y [ 1 ] * y [ 1 ],
423 s [ 2 ],
424 y [ 1 ] * ( s [ 3 ] * x [ 0 ] + s [ 1 ] * y [ 0 ] ) + x [ 1 ] * ( s [ 0 ] * x [ 0 ] + s [ 3 ] * y [ 0 ] )
425 );
426 } else {
427 answer = this->giveStructuralCrossSection()->giveRealStress_PlaneStrain(e, gp, tStep);
428 }
429}
430
431
432void
434{
435 answer = this->giveStructuralCrossSection()->giveStiffnessMatrix_PlaneStrain(rMode, gp, tStep);
436 if ( this->matRotation ) {
437 FloatArray x, y;
438 FloatMatrix Q;
439
441 Q = FloatMatrix({
442 { x(0) * x(0), x(1) * x(1), 0, x(0) * x(1) },
443 { y(0) * y(0), y(1) * y(1), 0, y(0) * y(1) },
444 { 0, 0, 1, 0 },
445 { 2 * x(0) * y(0), 2 * x(1) * y(1), 0, x(1) * y(0) + x(0) * y(1) }
446 });
447
448 answer.rotatedWith(Q, 't');
449 }
450}
451
452
453void
455{
456 answer = this->giveStructuralCrossSection()->giveStiffnessMatrix_dPdF_PlaneStrain(rMode, gp, tStep);
457 if ( this->matRotation ) {
458 FloatArray x, y;
459 FloatMatrix Q;
460
462
463 Q = FloatMatrix({
464 { x(0) * x(0), x(1) * x(1), 0, x(0) * x(1), x(1) * x(0) },
465 { y(0) * y(0), y(1) * y(1), 0, y(0) * y(1), y(1) * y(0) },
466 { 0, 0, 1, 0, 0 },
467 { x(0) * y(0), x(1) * y(1), 0, x(0) * y(1), x(1) * y(0) },
468 { y(0) * x(0), y(1) * x(1), 0, y(0) * x(1), y(1) * x(0) }
469 });
470 answer.rotatedWith(Q, 't');
471 }
472}
473
474
475// Axisymmetry
476
478 Structural2DElement(n, aDomain)
479 // Constructor. Creates an element with number n, belonging to aDomain.
480{
481 //nlGeometry = 0; // Geometrical nonlinearities disabled as default
482}
483
484
485double
487//
488// returns receiver's characteristic length for crack band models
489// for a crack formed in the plane with normal normalToCrackPlane.
490//
491{
492 return this->giveCharacteristicLengthForAxisymmElements(normalToCrackPlane);
493}
494
495
496double
498// Returns the portion of the receiver which is attached to gp.
499{
500 // note: radius is accounted by interpolation (of Fei2d*Axi type)
501 double determinant = fabs(static_cast< FEInterpolation2d * >( this->giveInterpolation() )->
502 giveTransformationJacobian(gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() ) );
503
504 double weight = gp->giveWeight();
505 return determinant * weight;
506}
507
508
509void
511//
512// Returns the [ 6 x (nno*2) ] strain-displacement matrix {B} of the receiver,
513// evaluated at gp.
514// (epsilon_x,epsilon_y,...,Gamma_xy) = B . r
515// r = ( u1,v1,u2,v2,u3,v3,u4,v4)
516{
517 FEInterpolation *interp = this->giveInterpolation();
518
520 interp->evalN(N, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
521 double r = 0.0;
522 for ( int i = 1; i <= this->giveNumberOfDofManagers(); i++ ) {
523 double x = this->giveNode(i)->giveCoordinate(1);
524 r += x * N.at(i);
525 }
526
527 FloatMatrix dNdx;
528 interp->evaldNdx(dNdx, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
529 answer.resize(6, dNdx.giveNumberOfRows() * 2);
530 answer.zero();
531
532 for ( int i = 1; i <= dNdx.giveNumberOfRows(); i++ ) {
533 answer.at(1, i * 2 - 1) = dNdx.at(i, 1);
534 answer.at(2, i * 2 - 0) = dNdx.at(i, 2);
535 answer.at(3, i * 2 - 1) = N.at(i) / r;
536 answer.at(6, 2 * i - 1) = dNdx.at(i, 2);
537 answer.at(6, 2 * i - 0) = dNdx.at(i, 1);
538 }
539}
540
541
542void
544// Returns the [ 9 x (nno*2) ] displacement gradient matrix {BH} of the receiver,
545// evaluated at gp.
546// BH matrix - 9 rows : du/dx, dv/dy, dw/dz = u/r, 0, 0, du/dy, 0, 0, dv/dx
548{
549 FloatArray n;
550 FloatMatrix dnx;
551 FEInterpolation2d *interp = static_cast< FEInterpolation2d * >( this->giveInterpolation() );
552
553 interp->evalN(n, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
554 interp->evaldNdx(dnx, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
555
556
557 int nRows = dnx.giveNumberOfRows();
558 answer.resize(9, nRows * 2);
559 answer.zero();
560
561 double r = 0., x;
562 for ( int i = 1; i <= this->giveNumberOfDofManagers(); i++ ) {
563 x = this->giveNode(i)->giveCoordinate(1);
564 r += x * n.at(i);
565 }
566
567
568 // mode is _3dMat !!!!!! answer.at(4,*), answer.at(5,*), answer.at(7,*), and answer.at(8,*) is zero
569 for ( int i = 1; i <= nRows * 2; i++ ) {
570 answer.at(1, 2 * i - 2) = dnx.at(i, 1); // du/dx
571 answer.at(2, 2 * i - 1) = dnx.at(i, 2); // dv/dy
572 answer.at(6, 2 * i - 2) = dnx.at(i, 2); // du/dy
573 answer.at(9, 2 * i - 1) = dnx.at(i, 1); // dv/dx
574 }
575
576 for ( int i = 0; i < this->giveNumberOfDofManagers(); i++ ) {
577 answer.at(3, 2 * i + 1) = n.at(i + 1) / r;
578 }
579}
580
581
582double
584{
585 FloatArray c(2);
586 double result = static_cast< FEInterpolation2d * >( this->giveInterpolation() )->
587 edgeGiveTransformationJacobian(iEdge, gp->giveNaturalCoordinates(), * this->giveCellGeometryWrapper() );
588
589
590 return result * gp->giveWeight();
591 // note: radius taken into account by Fei*Axi interpolation
592}
593
594
595void
597{
598 // Sets up the integration rule array which contains all the Gauss points
599 if ( integrationRulesArray.size() == 0 ) {
600 integrationRulesArray.resize(1);
601 integrationRulesArray [ 0 ] = std::make_unique< GaussIntegrationRule >(1, this, 1, 6);
603 }
604}
605
606void
608{
609 if ( this->matRotation ) {
611 FloatArray x, y;
612
614 // Transform to material c.s.
615 FloatArrayF< 6 >rotStrain = {
616 e [ 0 ] * x [ 0 ] * x [ 0 ] + e [ 5 ] * x [ 0 ] * x [ 1 ] + e [ 1 ] * x [ 1 ] * x [ 1 ],
617 e [ 0 ] * y [ 0 ] * y [ 0 ] + e [ 5 ] * y [ 0 ] * y [ 1 ] + e [ 1 ] * y [ 1 ] * y [ 1 ],
618 e [ 2 ],
619 e [ 4 ] * y [ 0 ] + e [ 3 ] * y [ 1 ],
620 e [ 4 ] * x [ 0 ] + e [ 3 ] * x [ 1 ],
621 2 * e [ 0 ] * x [ 0 ] * y [ 0 ] + 2 * e [ 1 ] * x [ 1 ] * y [ 1 ] + e [ 5 ] * ( x [ 1 ] * y [ 0 ] + x [ 0 ] * y [ 1 ] )
622 };
623 auto s = this->giveStructuralCrossSection()->giveRealStress_3d(rotStrain, gp, tStep);
624 answer = Vec6(
625 s [ 0 ] * x [ 0 ] * x [ 0 ] + 2 * s [ 5 ] * x [ 0 ] * y [ 0 ] + s [ 1 ] * y [ 0 ] * y [ 0 ],
626 s [ 0 ] * x [ 1 ] * x [ 1 ] + 2 * s [ 5 ] * x [ 1 ] * y [ 1 ] + s [ 1 ] * y [ 1 ] * y [ 1 ],
627 s [ 2 ],
628 s [ 4 ] * x [ 1 ] + s [ 3 ] * y [ 1 ],
629 s [ 4 ] * x [ 0 ] + s [ 3 ] * y [ 0 ],
630 y [ 1 ] * ( s [ 5 ] * x [ 0 ] + s [ 1 ] * y [ 0 ] ) + x [ 1 ] * ( s [ 0 ] * x [ 0 ] + s [ 5 ] * y [ 0 ] )
631 );
632 } else {
633 answer = this->giveStructuralCrossSection()->giveRealStress_3d(e, gp, tStep);
634 }
635}
636
637void
639 MatResponseMode rMode, GaussPoint *gp,
640 TimeStep *tStep)
641{
642 answer = this->giveStructuralCrossSection()->giveStiffnessMatrix_3d(rMode, gp, tStep);
643 if ( this->matRotation ) {
644 FloatArray x, y;
645 FloatMatrix Q;
646
648 Q = FloatMatrix({
649 { x(0) * x(0), x(1) * x(1), 0, 0, 0, x(0) * x(1) },
650 { y(0) * y(0), y(1) * y(1), 0, 0, 0, y(0) * y(1) },
651 { 0, 0, 1, 0, 0, 0 },
652 { 0, 0, 0, y(1), y(0), 0 },
653 { 0, 0, 0, x(1), x(0), 0 },
654 { 2 * x(0) * y(0), 2 * x(1) * y(1), 0, 0, 0, x(1) * y(0) + x(0) * y(1) }
655 });
656
657 answer.rotatedWith(Q, 't');
658 }
659}
660
661void
663{
664 answer = this->giveStructuralCrossSection()->giveStiffnessMatrix_dPdF_3d(rMode, gp, tStep);
665 if ( this->matRotation ) {
666 FloatArray x, y;
667 FloatMatrix Q;
668
670 Q = FloatMatrix({
671 { x(0) * x(0), x(1) * x(1), 0, 0, 0, x(0) * x(1), 0, 0, x(1) * x(0) },
672 { y(0) * y(0), y(1) * y(1), 0, 0, 0, y(0) * y(1), 0, 0, y(1) * y(0) },
673 { 0, 0, 1, 0, 0, 0, 0, 0, 0 },
674 { 0, 0, 0, y(1), y(0), 0, 0, 0, 0 },
675 { 0, 0, 0, x(1), x(0), 0 },
676 { 2 * x(0) * y(0), 2 * x(1) * y(1), 0, 0, 0, x(1) * y(0) + x(0) * y(1) }
677 });
678
679 answer.rotatedWith(Q, 't');
680 }
681}
682} // end namespace oofem
#define N(a, b)
void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx=1, int upperIndx=ALL_STRAINS) override
void computeGaussPoints() override
double giveCharacteristicLength(const FloatArray &crackToNormalPlane) override
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
double computeVolumeAround(GaussPoint *gp) override
double computeEdgeVolumeAround(GaussPoint *gp, int iEdge) override
AxisymElement(int n, Domain *d)
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
void computeConstitutiveMatrix_dPdF_At(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer) override
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
double giveCharacteristicLengthForAxisymmElements(const FloatArray &normalToCrackPlane)
Definition element.C:1204
Node * giveNode(int i) const
Definition element.h:629
virtual FEInterpolation * giveInterpolation() const
Definition element.h:648
int numberOfDofMans
Number of dofmanagers.
Definition element.h:136
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
double giveCharacteristicLengthForPlaneElements(const FloatArray &normalToCrackPlane)
Definition element.C:1188
virtual int giveNumberOfDofManagers() const
Definition element.h:695
FloatMatrix elemLocalCS
Transformation material matrix, used in orthotropic and anisotropic materials, global->local transfor...
Definition element.h:160
CrossSection * giveCrossSection()
Definition element.C:534
virtual Element_Geometry_Type giveGeometryType() const =0
virtual int giveNumberOfNodes(const Element_Geometry_Type) const
Definition feinterpol.h:557
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual void giveJacobianMatrixAt(FloatMatrix &jacobianMatrix, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
Definition feinterpol.h:284
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition femcmpnn.h:79
int number
Component number.
Definition femcmpnn.h:77
double & at(Index i)
Definition floatarray.h:202
void beColumnOf(const FloatMatrix &mat, int col)
void rotatedWith(const FloatMatrix &r, char mode='n')
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
void zero()
Zeroes all coefficient of receiver.
int giveNumberOfRows() const
Returns number of rows of receiver.
double at(std::size_t i, std::size_t j) const
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 resize(int n)
Definition intarray.C:73
int & at(std::size_t i)
Definition intarray.h:104
int giveSize() const
Definition intarray.h:211
void initializeFrom(InputRecord &ir, int priority) override
NLStructuralElement(int n, Domain *d)
void computeConstitutiveMatrix_dPdF_At(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer) override
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx=1, int upperIndx=ALL_STRAINS) override
PlaneStrainElement(int n, Domain *d)
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
PlaneStressElement(int n, Domain *d)
void computeConstitutiveMatrix_dPdF_At(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx=1, int upperIndx=ALL_STRAINS) override
void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer) override
virtual FEICellGeometry * giveCellGeometryWrapper()
void initializeFrom(InputRecord &ir, int priority) override
static ParamKey IPK_Structural2DElement_materialCoordinateSystem
[optional] Material coordinate system (local) for the element.
FEICellGeometry * cellGeometryWrapper
void giveDofManDofIDMask(int inode, IntArray &answer) const override
void giveMaterialOrientationAt(FloatArray &x, FloatArray &y, const FloatArray &lcoords)
int computeLoadLEToLRotationMatrix(FloatMatrix &answer, int iEdge, GaussPoint *gp) override
double computeEdgeVolumeAround(GaussPoint *gp, int iEdge) override
void giveEdgeDofMapping(IntArray &answer, int iEdge) const override
virtual ~Structural2DElement()
Destructor.
double computeVolumeAround(GaussPoint *gp) override
void postInitialize() override
Performs post initialization steps.
Structural2DElement(int n, Domain *d)
int giveNumberOfNodes() const override
double giveCharacteristicLength(const FloatArray &normalToCrackPlane) override
virtual FloatMatrixF< 9, 9 > giveStiffnessMatrix_dPdF_3d(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 6 > giveRealStress_3d(const FloatArrayF< 6 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 3 > giveRealStress_PlaneStress(const FloatArrayF< 3 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatMatrixF< 4, 4 > giveStiffnessMatrix_PlaneStrain(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatMatrixF< 4, 4 > giveStiffnessMatrix_dPdF_PlaneStress(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 4 > giveRealStress_PlaneStrain(const FloatArrayF< 4 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatMatrixF< 5, 5 > giveStiffnessMatrix_dPdF_PlaneStrain(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatMatrixF< 6, 6 > giveStiffnessMatrix_3d(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatMatrixF< 3, 3 > giveStiffnessMatrix_PlaneStress(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const =0
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
static FloatArray Vec2(const double &a, const double &b)
Definition floatarray.h:606
@ CS_Thickness
Thickness.
static FloatArray Vec6(const double &a, const double &b, const double &c, const double &d, const double &e, const double &f)
Definition floatarray.h:610
static FloatArray Vec4(const double &a, const double &b, const double &c, const double &d)
Definition floatarray.h:608
static FloatArray Vec3(const double &a, const double &b, const double &c)
Definition floatarray.h:607
#define PM_CHECK_FLAG_AND_REPORT(_pm, _ir, _componentnum, _paramkey, _prio, _flag)

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