OOFEM 3.0
Loading...
Searching...
No Matches
cohsur3d.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 "element.h"
37#include "dof.h"
38#include "node.h"
39#include "particle.h"
41#include "floatmatrix.h"
42#include "floatmatrixf.h"
43#include "intarray.h"
44#include "floatarray.h"
45#include "floatarrayf.h"
46#include "mathfem.h"
48#include "classfactory.h"
49#include "parametermanager.h"
50#include "paramkey.h"
51
52#ifdef __OOFEG
53 #include "oofeggraphiccontext.h"
54 #include "connectivitytable.h"
55 #include "oofegutils.h"
56#endif
57
58namespace oofem {
64
65
66CohesiveSurface3d :: CohesiveSurface3d(int n, Domain *aDomain) : StructuralElement(n, aDomain)
67 // Constructor.
68{
69 numberOfDofMans = -1;
70 area = -1.;
71 length = -1.;
72 kx = ky = kz = 0;
73 kxa = kyb = kzc = 0;
74}
75
76void
77CohesiveSurface3d :: computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int li, int ui)
78// Returns the strain-displacement matrix of the receiver.
79{
80 double x01, y01, z01, x02, y02, z02;
81 FloatMatrix Bloc(3, 12);
82
83 Node *nodeA, *nodeB;
84 nodeA = this->giveNode(1);
85 nodeB = this->giveNode(2);
86
87 switch ( numberOfDofMans ) {
88 case 2:
89 // Coordinate differences
90 x01 = nodeA->giveCoordinate(1) - center.at(1);
91 y01 = nodeA->giveCoordinate(2) - center.at(2);
92 z01 = nodeA->giveCoordinate(3) - center.at(3);
93 x02 = nodeB->giveCoordinate(1) - center.at(1);
94 y02 = nodeB->giveCoordinate(2) - center.at(2);
95 z02 = nodeB->giveCoordinate(3) - center.at(3);
96
97 // B matrix in local coordinates (and without the term 1/length)
98
99 Bloc.zero();
100
101 Bloc.at(1, 1) = -1.;
102 Bloc.at(2, 2) = -1.;
103 Bloc.at(3, 3) = -1.;
104
105 Bloc.at(1, 5) = z01;
106 Bloc.at(1, 6) = -y01;
107 Bloc.at(2, 4) = -z01;
108 Bloc.at(2, 6) = x01;
109 Bloc.at(3, 4) = y01;
110 Bloc.at(3, 5) = -x01;
111
112 Bloc.at(1, 7) = 1.;
113 Bloc.at(2, 8) = 1.;
114 Bloc.at(3, 9) = 1.;
115
116 Bloc.at(1, 11) = -z02;
117 Bloc.at(1, 12) = y02;
118 Bloc.at(2, 10) = z02;
119 Bloc.at(2, 12) = -x02;
120 Bloc.at(3, 10) = -y02;
121 Bloc.at(3, 11) = x02;
122
123 // Transformation to global coordinates
124
125 answer.resize(3, 12);
126 answer.beProductOf(lcs, Bloc);
127
128 // Division by the length
129
130 answer.times(1. / length);
131
132 return;
133
134 break;
135
136 case 3:
137 // Coordinate differences
138 x01 = nodeA->giveCoordinate(1) - center.at(1);
139 y01 = nodeA->giveCoordinate(2) - center.at(2);
140 z01 = nodeA->giveCoordinate(3) - center.at(3);
141 x02 = nodeB->giveCoordinate(1) + kxa - center.at(1);
142 y02 = nodeB->giveCoordinate(2) + kyb - center.at(2);
143 z02 = nodeB->giveCoordinate(3) + kzc - center.at(3);
144
145 // B matrix in local coordinates (and without the term 1/length)
146
147 Bloc.zero();
148
149 Bloc.at(1, 1) = -1.;
150 Bloc.at(2, 2) = -1.;
151 Bloc.at(3, 3) = -1.;
152
153 Bloc.at(1, 5) = z01;
154 Bloc.at(1, 6) = -y01;
155 Bloc.at(2, 4) = -z01;
156 Bloc.at(2, 6) = x01;
157 Bloc.at(3, 4) = y01;
158 Bloc.at(3, 5) = -x01;
159
160 Bloc.at(1, 7) = 1.;
161 Bloc.at(2, 8) = 1.;
162 Bloc.at(3, 9) = 1.;
163
164 Bloc.at(1, 11) = -z02;
165 Bloc.at(1, 12) = y02;
166 Bloc.at(2, 10) = z02;
167 Bloc.at(2, 12) = -x02;
168 Bloc.at(3, 10) = -y02;
169 Bloc.at(3, 11) = x02;
170
171 // Transformation to global coordinates
172
173 FloatMatrix answer2(3, 12);
174 answer2.zero();
175 answer2.beProductOf(lcs, Bloc);
176
177 // Division by the length
178
179 answer2.times(1. / length);
180
181 // periodic transformation matrix T
182 FloatMatrix Tper(12, 18);
183
184 Tper.zero();
185
186 Tper.at(1, 1) = 1.;
187 Tper.at(2, 2) = 1.;
188 Tper.at(3, 3) = 1.;
189 Tper.at(4, 4) = 1.;
190 Tper.at(5, 5) = 1.;
191 Tper.at(6, 6) = 1.;
192 Tper.at(7, 7) = 1.;
193 Tper.at(8, 8) = 1.;
194 Tper.at(9, 9) = 1.;
195 Tper.at(10, 10) = 1.;
196 Tper.at(11, 11) = 1.;
197 Tper.at(12, 12) = 1.;
198
199 Tper.at(7, 13) = kxa;
200 Tper.at(8, 14) = kyb;
201 Tper.at(9, 15) = kzc;
202 Tper.at(7, 16) = kyb;
203 Tper.at(8, 17) = kzc;
204 Tper.at(9, 18) = kxa;
205
206 // periodic transformation of Bmatrix
207 answer.beProductOf(answer2, Tper);
208
209 return;
210
211 break;
212 }
213}
214
215void CohesiveSurface3d :: computeGaussPoints()
216// Sets up the array of Gauss points of the receiver.
217{
218 // The Gauss point is used only when methods from crosssection and/or material
219 // classes are requested.
220 integrationRulesArray.resize( 1 );
221 integrationRulesArray [ 0 ] = std::make_unique<GaussIntegrationRule>(1, this);
222 this->giveCrossSection()->setupIntegrationPoints(* integrationRulesArray [ 0 ], 1, this);
223}
224
225
226double
227CohesiveSurface3d :: computeVolumeAround(GaussPoint *gp)
228{
229 return area * length;
230}
231
232
233void
234CohesiveSurface3d :: giveDofManDofIDMask(int inode, IntArray &answer) const
235{
236 answer = {D_u, D_v, D_w, R_u, R_v, R_w};
237}
238
239
240void
241CohesiveSurface3d :: computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
242{
243 answer = static_cast< StructuralInterfaceCrossSection* >(this->giveCrossSection())->giveEngTraction_3d(strain, gp, tStep);
244}
245
246
247void
248CohesiveSurface3d :: computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
249{
250 answer = static_cast< StructuralInterfaceCrossSection* >(this->giveCrossSection())->give3dStiffnessMatrix_Eng(rMode, gp, tStep);
251}
252
253
254double
255CohesiveSurface3d :: giveLength()
256// Returns the length of the receiver.
257{
258 double dx, dy, dz;
259 Node *nodeA, *nodeB;
260 nodeA = this->giveNode(1);
261 nodeB = this->giveNode(2);
262
263 switch ( numberOfDofMans ) {
264 case 2:
265 if ( length <= 0. ) {
266 dx = nodeB->giveCoordinate(1) - nodeA->giveCoordinate(1);
267 dy = nodeB->giveCoordinate(2) - nodeA->giveCoordinate(2);
268 dz = nodeB->giveCoordinate(3) - nodeA->giveCoordinate(3);
269 length = sqrt(dx * dx + dy * dy + dz * dz);
270 }
271
272 return length;
273
274 break;
275
276 case 3:
277 if ( length <= 0. ) {
278 dx = nodeB->giveCoordinate(1) + kxa - nodeA->giveCoordinate(1);
279 dy = nodeB->giveCoordinate(2) + kyb - nodeA->giveCoordinate(2);
280 dz = nodeB->giveCoordinate(3) + kzc - nodeA->giveCoordinate(3);
281 length = sqrt(dx * dx + dy * dy + dz * dz);
282 }
283
284 return length;
285
286 break;
287 }
288
289 return 0.;
290}
291
292void
293CohesiveSurface3d :: evaluateCenter()
294{
295 Particle *nodeA, *nodeB;
296 double RA, RB, L, aux;
297
298 nodeA = static_cast< Particle * >( this->giveNode(1) );
299 nodeB = static_cast< Particle * >( this->giveNode(2) );
300 RA = nodeA->giveRadius();
301 RB = nodeB->giveRadius();
302 L = giveLength();
303 aux = 0.5 + ( RA - RB ) / ( 2. * L );
304
305 switch ( numberOfDofMans ) {
306 case 2:
307 center.resize(3);
308 for ( int i = 1; i <= 3; i++ ) {
309 center.at(i) = aux * ( nodeB->giveCoordinate(i) ) + ( 1. - aux ) * ( nodeA->giveCoordinate(i) );
310 }
311
312 break;
313
314 case 3:
315 center.resize(3);
316 center.at(1) = aux * ( nodeB->giveCoordinate(1) + kxa ) + ( 1. - aux ) * ( nodeA->giveCoordinate(1) );
317 center.at(2) = aux * ( nodeB->giveCoordinate(2) + kyb ) + ( 1. - aux ) * ( nodeA->giveCoordinate(2) );
318 center.at(3) = aux * ( nodeB->giveCoordinate(3) + kzc ) + ( 1. - aux ) * ( nodeA->giveCoordinate(3) );
319
320 break;
321 }
322}
323
324void
325CohesiveSurface3d :: evaluateLocalCoordinateSystem()
326//
327// Computes unit vectors of local coordinate system, stored by rows.
328//
329{
330 FloatArray lx(3), ly(3), lz(3);
331
332 Node *nodeA, *nodeB;
333 nodeA = this->giveNode(1);
334 nodeB = this->giveNode(2);
335
336 switch ( numberOfDofMans ) {
337 case 2:
338 lx.at(1) = nodeB->giveCoordinate(1) - nodeA->giveCoordinate(1);
339 lx.at(2) = nodeB->giveCoordinate(2) - nodeA->giveCoordinate(2);
340 lx.at(3) = nodeB->giveCoordinate(3) - nodeA->giveCoordinate(3);
341 lx.normalize();
342 break;
343
344 case 3:
345 lx.at(1) = nodeB->giveCoordinate(1) + kxa - nodeA->giveCoordinate(1);
346 lx.at(2) = nodeB->giveCoordinate(2) + kyb - nodeA->giveCoordinate(2);
347 lx.at(3) = nodeB->giveCoordinate(3) + kzc - nodeA->giveCoordinate(3);
348 lx.normalize();
349 break;
350 }
351
352 ly.zero();
353 if ( fabs( lx.at(1) ) > fabs( lx.at(2) ) ) {
354 ly.at(2) = 1.;
355 } else {
356 ly.at(1) = 1.;
357 }
358
359 lz.beVectorProductOf(lx, ly);
360 lz.normalize();
361 ly.beVectorProductOf(lz, lx);
362 ly.normalize();
363
364 lcs.resize(3, 3);
365 for ( int i = 1; i <= 3; i++ ) {
366 lcs.at(1, i) = lx.at(i);
367 lcs.at(2, i) = ly.at(i);
368 lcs.at(3, i) = lz.at(i);
369 }
370}
371
372
373void
374CohesiveSurface3d :: initializeFrom(InputRecord &ir, int priority)
375{
376 // first call parent
377 StructuralElement :: initializeFrom(ir, priority);
378 ParameterManager &ppm = giveDomain()->elementPPM;
379 PM_UPDATE_PARAMETER(area, ppm, ir, this->number, IPK_CohesiveSurface3d_area, priority);
380 PM_UPDATE_PARAMETER(kx, ppm, ir, this->number, IPK_CohesiveSurface3d_kx, priority);
381 PM_UPDATE_PARAMETER(ky, ppm, ir, this->number, IPK_CohesiveSurface3d_ky, priority);
382 PM_UPDATE_PARAMETER(kz, ppm, ir, this->number, IPK_CohesiveSurface3d_kz, priority);
383}
384
385void
386CohesiveSurface3d :: postInitialize()
387{
388 // first call parent
389 StructuralElement :: postInitialize();
390 ParameterManager &ppm = giveDomain()->elementPPM;
391
393 if ( area < 0. ) {
394 throw ComponentInputException(IPK_CohesiveSurface3d_area.getName(), ComponentInputException::ComponentType::ctElement, this->number, "negative area specified");
395 }
396
397 // evaluate number of Dof Managers
398 numberOfDofMans = dofManArray.giveSize();
399 if ( numberOfDofMans <= 0 ) {
401 }
402
403 if ( ( numberOfDofMans == 3 ) & ( kx == 0 ) & ( ky == 0 ) & ( kz == 0 ) ) {
404 throw ComponentInputException(IPK_CohesiveSurface3d_kx.getName(), ComponentInputException::ComponentType::ctElement, this->number, "no periodic shift defined" );
405 }
406
407
408 // shifts of periodic particles
409 if ( numberOfDofMans == 3 ) {
410 Node *nodeC;
411 nodeC = this->giveNode(3);
412 kxa = this->kx * nodeC->giveCoordinate(1);
413 kyb = this->ky * nodeC->giveCoordinate(2);
414 kzc = this->kz * nodeC->giveCoordinate(3);
415 }
416
417 // evaluate the length
418 giveLength();
419 if ( length <= 0. ) {
421 // evaluate the coordinates of the center
422 //evaluateCenter(); /// @todo This will never execute. Verify this / Mikael
423 }
424
425 // evaluate the local coordinate system
427}
428
429int
430CohesiveSurface3d :: computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
431{
432 answer = center;
433 return 1;
434}
435
436
437#ifdef __OOFEG
438void CohesiveSurface3d :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
439{
440 if ( !gc.testElementGraphicActivity(this) ) {
441 return;
442 }
443
444 //WCRec p[4];
445 GraphicObj *go;
446
447 Particle *nodeA = ( Particle * ) this->giveNode(1);
448 Particle *nodeB = ( Particle * ) this->giveNode(2);
449 //double rA = nodeA -> giveRadius();
450 //double rB = nodeB -> giveRadius();
451 //double r = (rA+rB)/4.;
452
453 EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH);
454 EASValsSetColor( gc.getElementColor() );
455 EASValsSetEdgeColor( gc.getElementEdgeColor() );
456 EASValsSetEdgeFlag(true);
457 EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
458
459 WCRec pl [ 2 ];
460 // determine coordinates of the particles connected by this element
461 pl [ 0 ].x = ( FPNum ) nodeA->giveCoordinate(1);
462 pl [ 0 ].y = ( FPNum ) nodeA->giveCoordinate(2);
463 pl [ 0 ].z = ( FPNum ) nodeA->giveCoordinate(3);
464 pl [ 1 ].x = ( FPNum ) nodeB->giveCoordinate(1);
465 pl [ 1 ].y = ( FPNum ) nodeB->giveCoordinate(2);
466 pl [ 1 ].z = ( FPNum ) nodeB->giveCoordinate(3);
467 if ( giveNumberOfNodes() == 3 ) {
468 // the second particle should be shifted (periodic arrangement)
469 Particle *nodeC = ( Particle * ) this->giveNode(3);
470 pl [ 1 ].x += kx * ( nodeC->giveCoordinate(1) );
471 pl [ 1 ].y += ky * ( nodeC->giveCoordinate(2) );
472 pl [ 1 ].z += kz * ( nodeC->giveCoordinate(3) );
473 }
474
475 // plot a line segment connecting the particles
476 go = CreateLine3D(pl);
477 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
478 EGAttachObject(go, ( EObjectP ) this);
479 EMAddGraphicsToModel(ESIModel(), go);
480}
481
482void CohesiveSurface3d :: drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType type)
483{
484 GraphicObj *go1, *go2;
485
486 if ( !gc.testElementGraphicActivity(this) ) {
487 return;
488 }
489
490 double defScale = gc.getDefScale();
491 WCRec p [ 2 ];
492 EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH);
493 EASValsSetColor( gc.getDeformedElementColor() );
494 EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER);
495
496 // get the displaced particle coordinates
497 Particle *nodeA = ( Particle * ) giveNode(1);
498 Particle *nodeB = ( Particle * ) giveNode(2);
499 p [ 0 ].x = nodeA->giveUpdatedCoordinate(1, tStep, defScale);
500 p [ 0 ].y = nodeA->giveUpdatedCoordinate(2, tStep, defScale);
501 p [ 0 ].z = nodeA->giveUpdatedCoordinate(3, tStep, defScale);
502
503 p [ 1 ].x = nodeB->giveUpdatedCoordinate(1, tStep, defScale);
504 p [ 1 ].y = nodeB->giveUpdatedCoordinate(2, tStep, defScale);
505 p [ 1 ].z = nodeB->giveUpdatedCoordinate(3, tStep, defScale);
506
507 // plot the displaced particles
508 EASValsSetMType(FILLED_CIRCLE_MARKER);
509 EASValsSetColor( gc.getNodeColor() );
510 EASValsSetMSize(6);
511
512 // plot the first particle
513 go1 = CreateMarker3D(p);
514 EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go1);
515 EMAddGraphicsToModel(ESIModel(), go1);
516
517 // take into account periodic conditions
518 if ( giveNumberOfNodes() == 3 ) {
519 Node *nodeC = ( Particle * ) giveNode(3);
520 p [ 1 ].x += kxa + kxa * defScale * ( nodeC->giveDofWithID(D_u)->giveUnknown(VM_Total, tStep) ) + kyb * defScale * ( nodeC->giveDofWithID(R_u)->giveUnknown(VM_Total, tStep) );
521 p [ 1 ].y += kyb + kyb * defScale * ( nodeC->giveDofWithID(D_v)->giveUnknown(VM_Total, tStep) ) + kzc * defScale * ( nodeC->giveDofWithID(R_v)->giveUnknown(VM_Total, tStep) );
522 p [ 1 ].z += kzc + kzc * defScale * ( nodeC->giveDofWithID(D_w)->giveUnknown(VM_Total, tStep) ) + kxa * defScale * ( nodeC->giveDofWithID(R_w)->giveUnknown(VM_Total, tStep) );
523 EASValsSetMType(CIRCLE_MARKER);
524 }
525
526 // plot the second particle
527 go2 = CreateMarker3D(p + 1);
528 EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go2);
529 EMAddGraphicsToModel(ESIModel(), go2);
530}
531
532
533void
534CohesiveSurface3d :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
535{
536 if ( !gc.testElementGraphicActivity(this) ) {
537 return;
538 }
539
540 FloatArray val;
541 GaussPoint *gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0);
542 if ( !giveIPValue(val, gp, gc.giveIntVarType(), tStep) ) {
543 return;
544 }
545
546 int indx = gc.giveIntVarIndx();
547
548 double s [ 8 ];
549 for ( int i = 0; i < 8; i++ ) {
550 s [ i ] = val.at(indx);
551 }
552
553 gc.updateFringeTableMinMax(s, 1);
554
555 WCRec p [ 8 ];
556 Particle *nodeA = ( Particle * ) giveNode(1);
557 Particle *nodeB = ( Particle * ) giveNode(2);
558 if ( gc.getInternalVarsDefGeoFlag() ) {
559 // use deformed geometry
560 double defScale = gc.getDefScale();
561 p [ 0 ].x = nodeA->giveUpdatedCoordinate(1, tStep, defScale);
562 p [ 0 ].y = nodeA->giveUpdatedCoordinate(2, tStep, defScale);
563 p [ 0 ].z = nodeA->giveUpdatedCoordinate(3, tStep, defScale);
564 p [ 2 ].x = nodeB->giveUpdatedCoordinate(1, tStep, defScale);
565 p [ 2 ].y = nodeB->giveUpdatedCoordinate(2, tStep, defScale);
566 p [ 2 ].z = nodeB->giveUpdatedCoordinate(3, tStep, defScale);
567 // handle special elements crossing the boundary of the periodic cell
568 if ( giveNumberOfNodes() == 3 ) {
569 Node *nodeC = ( Particle * ) giveNode(3);
570 p [ 2 ].x += kxa + kxa * defScale * ( nodeC->giveDofWithID(D_u)->giveUnknown(VM_Total, tStep) ) + kyb * defScale * ( nodeC->giveDofWithID(R_u)->giveUnknown(VM_Total, tStep) );
571 p [ 2 ].y += kyb + kyb * defScale * ( nodeC->giveDofWithID(D_v)->giveUnknown(VM_Total, tStep) ) + kzc * defScale * ( nodeC->giveDofWithID(R_v)->giveUnknown(VM_Total, tStep) );
572 p [ 2 ].z += kzc + kzc * defScale * ( nodeC->giveDofWithID(D_w)->giveUnknown(VM_Total, tStep) ) + kxa * defScale * ( nodeC->giveDofWithID(R_w)->giveUnknown(VM_Total, tStep) );
573 }
574 } else {
575 // use initial geometry
576 p [ 0 ].x = nodeA->giveCoordinate(1);
577 p [ 0 ].y = nodeA->giveCoordinate(2);
578 p [ 0 ].z = nodeA->giveCoordinate(3);
579 p [ 2 ].x = nodeB->giveCoordinate(1);
580 p [ 2 ].y = nodeB->giveCoordinate(2);
581 p [ 2 ].z = nodeB->giveCoordinate(3);
582 // handle special elements crossing the boundary of the periodic cell
583 if ( giveNumberOfNodes() == 3 ) {
584 p [ 2 ].x += kxa;
585 p [ 2 ].y += kyb;
586 p [ 2 ].z += kzc;
587 }
588 }
589
590
591 double r1 = nodeA->giveRadius();
592 double r2 = nodeB->giveRadius();
593 double d = 0.1 * ( r1 + r2 );
594 p [ 1 ].x = 0.5 * ( p [ 0 ].x + p [ 2 ].x - d * lcs.at(2, 1) - d * lcs.at(3, 1) );
595 p [ 1 ].y = 0.5 * ( p [ 0 ].y + p [ 2 ].y - d * lcs.at(2, 2) - d * lcs.at(3, 2) );
596 p [ 1 ].z = 0.5 * ( p [ 0 ].z + p [ 2 ].z - d * lcs.at(2, 3) - d * lcs.at(3, 3) );
597 p [ 3 ].x = p [ 1 ].x + d *lcs.at(2, 1);
598 p [ 3 ].y = p [ 1 ].y + d *lcs.at(2, 2);
599 p [ 3 ].z = p [ 1 ].z + d *lcs.at(2, 3);
600
601 for ( int i = 5; i < 8; i += 2 ) {
602 p [ i ].x = p [ i - 4 ].x + d *lcs.at(3, 1);
603 p [ i ].y = p [ i - 4 ].y + d *lcs.at(3, 2);
604 p [ i ].z = p [ i - 4 ].z + d *lcs.at(3, 3);
605 }
606
607 p [ 4 ] = p [ 0 ];
608 p [ 6 ] = p [ 2 ];
609
610 GraphicObj *go = CreateHexahedronWD(p, s);
611
612 EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER);
613 EASValsSetLineWidth(2 * OOFEG_DEFORMED_GEOMETRY_WIDTH);
614 EASValsSetFillStyle(FILL_SOLID);
615
616 //EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
617 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | LAYER_MASK, go);
618 EMAddGraphicsToModel(ESIModel(), go);
619}
620#endif
621} // namespace oofem
#define REGISTER_Element(class)
static ParamKey IPK_CohesiveSurface3d_area
Definition cohsur3d.h:73
static ParamKey IPK_CohesiveSurface3d_ky
Definition cohsur3d.h:71
static ParamKey IPK_CohesiveSurface3d_kx
Definition cohsur3d.h:70
void evaluateLocalCoordinateSystem()
Definition cohsur3d.C:325
FloatArray center
Coordinates of the center of the cohesive surface.
Definition cohsur3d.h:61
FloatMatrix lcs
Matrix defining the local coordinate system.
Definition cohsur3d.h:62
static ParamKey IPK_CohesiveSurface3d_kz
Definition cohsur3d.h:72
double giveCoordinate(int i) const
Definition dofmanager.h:383
Dof * giveDofWithID(int dofID) const
Definition dofmanager.C:127
Node * giveNode(int i) const
Definition element.h:629
IntArray dofManArray
Array containing dofmanager numbers.
Definition element.h:138
static ParamKey IPK_Element_nodes
Definition element.h:200
virtual int giveNumberOfNodes() const
Definition element.h:703
int numberOfDofMans
Number of dofmanagers.
Definition element.h:136
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition element.h:157
CrossSection * giveCrossSection()
Definition element.C:534
Domain * giveDomain() const
Definition femcmpnn.h:97
int number
Component number.
Definition femcmpnn.h:77
double & at(Index i)
Definition floatarray.h:202
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
Definition floatarray.C:476
void times(double f)
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
virtual double giveUpdatedCoordinate(int ic, TimeStep *tStep, double scale=1.)
Definition node.C:234
double giveRadius() const
Returns the radius of the particle.
Definition particle.h:78
StructuralElement(int n, Domain *d)
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
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_ELEMENT_ERROR_IFNOTSET(_pm, _componentnum, _paramkey)
#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