OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
rershell.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 - 2013 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 
35 #include "../sm/Elements/Shells/rershell.h"
36 #include "../sm/CrossSections/structuralcrosssection.h"
37 #include "node.h"
38 #include "material.h"
39 #include "crosssection.h"
40 #include "gausspoint.h"
41 #include "gaussintegrationrule.h"
42 #include "floatmatrix.h"
43 #include "floatarray.h"
44 #include "intarray.h"
45 #include "domain.h"
46 #include "load.h"
47 #include "mathfem.h"
48 #include "classfactory.h"
49 
50 #ifdef __OOFEG
51  #include "oofeggraphiccontext.h"
52  #include "connectivitytable.h"
53 #endif
54 
55 #include <cstdlib>
56 
57 namespace oofem {
58 REGISTER_Element(RerShell);
59 
60 RerShell :: RerShell(int n, Domain *aDomain) :
61  CCTPlate3d(n, aDomain)
62 {
63  Rx = 1.e+40;
64  Ry = 1.e+40;
65  Rxy = 1.e+40;
66 
68 }
69 
70 
71 Interface *
73 {
74  if ( interface == LayeredCrossSectionInterfaceType ) {
75  return static_cast< LayeredCrossSectionInterface * >(this);
76  } else if ( interface == ZZNodalRecoveryModelInterfaceType ) {
77  return static_cast< ZZNodalRecoveryModelInterface * >(this);
78  } else if ( interface == NodalAveragingRecoveryModelInterfaceType ) {
79  return static_cast< NodalAveragingRecoveryModelInterface * >(this);
80  }
81 
82  return NULL;
83 }
84 
85 
86 void
88 // Returns the [8x18] strain-displacement matrix {B} of the receiver,
89 // evaluated at gp.
90 {
91  FloatArray b(3), c(3), nodeCoords;
92  double x1, x2, x3, y1, y2, y3, area;
93 
94  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(1)->giveCoordinates() ) );
95  x1 = nodeCoords.at(1);
96  y1 = nodeCoords.at(2);
97 
98  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(2)->giveCoordinates() ) );
99  x2 = nodeCoords.at(1);
100  y2 = nodeCoords.at(2);
101 
102  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(3)->giveCoordinates() ) );
103  x3 = nodeCoords.at(1);
104  y3 = nodeCoords.at(2);
105 
106 
107  b.at(1) = y2 - y3;
108  b.at(2) = y3 - y1;
109  b.at(3) = y1 - y2;
110 
111  c.at(1) = x3 - x2;
112  c.at(2) = x1 - x3;
113  c.at(3) = x2 - x1;
114 
115  area = this->giveArea();
116 
117  answer.resize(8, 18);
118  answer.zero();
119 
120  for ( int i = 1; i <= 3; i++ ) {
121  int j = i + 1 - i / 3 * 3;
122  int k = j + 1 - j / 3 * 3;
123 
124  int ii = 6 * ( i - 1 );
125  int ki = 6 * ( k - 1 );
126 
127  answer.at(1, ii + 1) = b.at(i); // Eps_X
128  answer.at(1, ki + 4) = -( b.at(i) - b.at(j) ) / Rx * area / 12.;
129  answer.at(1, ki + 5) = -( c.at(i) - c.at(j) ) / Ry * area / 12.;
130 
131  answer.at(2, ii + 2) = c.at(i); // Eps_y
132  answer.at(2, ki + 4) = -( b.at(i) - b.at(j) ) / Ry * area / 12.;
133  answer.at(2, ki + 5) = -( c.at(i) - c.at(j) ) / Ry * area / 12.;
134 
135  answer.at(3, ii + 1) = c.at(i); // Gamma_xy;
136  answer.at(3, ii + 2) = b.at(i);
137  answer.at(3, ki + 4) = -( b.at(i) - b.at(j) ) / Rxy * area / 6.;
138  answer.at(3, ki + 5) = -( c.at(i) - c.at(j) ) / Rxy * area / 6.;
139 
140  answer.at(4, ii + 5) = b.at(i); // Kappa_x
141 
142  answer.at(5, ii + 4) = -c.at(i); // Kappa_y
143 
144  answer.at(6, ii + 4) = -b.at(i); // Kappa_xy
145  answer.at(6, ii + 5) = c.at(i);
146 
147  answer.at(7, ii + 3) = b.at(i); // Gamma_zx
148  answer.at(7, ii + 5) += area * ( 2. / 3. );
149  answer.at(7, ki + 5) += ( -2.0 * area + b.at(k) * ( c.at(i) - c.at(j) ) ) / 6.0;
150  answer.at(7, ki + 4) = b.at(k) * ( b.at(i) - b.at(j) ) / 6.0;
151 
152  answer.at(8, ii + 3) = c.at(i); // Gamma_zy
153  answer.at(8, ii + 4) += area * ( -2.0 / 3.0 );
154  answer.at(8, ki + 4) += ( +2.0 * area + c.at(k) * ( b.at(i) - b.at(j) ) ) / 6.0;
155  answer.at(8, ki + 5) = c.at(k) * ( c.at(i) - c.at(j) ) / 6.0;
156  }
157 
158  answer.times( 1. / ( 2. * area ) );
159 }
160 
161 
162 void
164 // Sets up the array containing the four Gauss points of the receiver.
165 {
166  if ( integrationRulesArray.size() == 0 ) {
167  integrationRulesArray.resize( 1 );
168  integrationRulesArray [ 0 ].reset( new GaussIntegrationRule(1, this, 1, 8) );
170  }
171 }
172 
173 
174 void
176 // Returns the displacement interpolation matrix {N} of the receiver,
177 // evaluated at gp.
178 {
179  double x1, x2, x3, y1, y2, y3, l1, l2, l3, b1, b2, b3, c1, c2, c3;
180  FloatArray nodeCoords;
181 
182  l1 = iLocCoord.at(1);
183  l2 = iLocCoord.at(2);
184  l3 = 1.0 - l1 - l2;
185 
186  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(1)->giveCoordinates() ) );
187  x1 = nodeCoords.at(1);
188  y1 = nodeCoords.at(2);
189 
190  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(2)->giveCoordinates() ) );
191  x2 = nodeCoords.at(1);
192  y2 = nodeCoords.at(2);
193 
194  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(3)->giveCoordinates() ) );
195  x3 = nodeCoords.at(1);
196  y3 = nodeCoords.at(2);
197 
198  /*
199  * x1 = this -> giveNode(1) -> giveCoordinate(1);
200  * x2 = this -> giveNode(2) -> giveCoordinate(1);
201  * x3 = this -> giveNode(3) -> giveCoordinate(1);
202  *
203  * y1 = this -> giveNode(1) -> giveCoordinate(2);
204  * y2 = this -> giveNode(2) -> giveCoordinate(2);
205  * y3 = this -> giveNode(3) -> giveCoordinate(2);
206  */
207  b1 = y2 - y3;
208  b2 = y3 - y1;
209  b3 = y1 - y2;
210 
211  c1 = x3 - x2;
212  c2 = x1 - x3;
213  c3 = x2 - x1;
214 
215  answer.resize(5, 18);
216  answer.zero();
217 
218 
219  answer.at(1, 1) = l1;
220  answer.at(1, 7) = l2;
221  answer.at(1, 13) = l3;
222 
223  answer.at(2, 2) = l1;
224  answer.at(2, 8) = l2;
225  answer.at(2, 14) = l3;
226 
227  answer.at(3, 3) = l1;
228  answer.at(3, 4) = -( l1 * l2 * b3 - l1 * l3 * b2 ) * 0.5;
229  answer.at(3, 5) = -( l1 * l2 * c3 - l1 * l3 * c2 ) * 0.5;
230  answer.at(3, 9) = l2;
231  answer.at(3, 10) = -( l2 * l3 * b1 - l1 * l2 * b3 ) * 0.5;
232  answer.at(3, 11) = -( l2 * l3 * c1 - l1 * l2 * c3 ) * 0.5;
233  answer.at(3, 15) = l3;
234  answer.at(3, 16) = -( l3 * l1 * b2 - l2 * l3 * b1 ) * 0.5;
235  answer.at(3, 17) = -( l3 * l1 * c2 - l2 * l3 * c1 ) * 0.5;
236 
237  answer.at(4, 4) = l1;
238  answer.at(4, 10) = l2;
239  answer.at(4, 16) = l3;
240 
241  answer.at(5, 5) = l1;
242  answer.at(5, 11) = l2;
243  answer.at(5, 17) = l3;
244 }
245 
246 
247 double
249 // returns the area occupied by the receiver
250 {
251  FloatArray nodeCoords;
252  if ( area > 0 ) {
253  return area; // check if previously computed
254  }
255 
256  double x1, x2, x3, y1, y2, y3;
257 
258  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(1)->giveCoordinates() ) );
259  x1 = nodeCoords.at(1);
260  y1 = nodeCoords.at(2);
261 
262  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(2)->giveCoordinates() ) );
263  x2 = nodeCoords.at(1);
264  y2 = nodeCoords.at(2);
265 
266  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(3)->giveCoordinates() ) );
267  x3 = nodeCoords.at(1);
268  y3 = nodeCoords.at(2);
269 
270  return ( area = 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 ) );
271 }
272 
273 
276 {
279  if ( result != IRRT_OK ) {
280  return result;
281  }
282 
283  if ( numberOfGaussPoints != 1 ) {
285  }
286 
287  return IRRT_OK;
288 }
289 
290 
291 void
293 {
294  this->giveStructuralCrossSection()->give3dShellStiffMtrx(answer, rMode, gp, tStep);
295 }
296 
297 void
299 {
300  this->giveStructuralCrossSection()->giveGeneralizedStress_Shell(answer, gp, strain, tStep);
301 }
302 
303 void
305 // Returns the lumped mass matrix of the receiver.
306 {
307  GaussPoint *gp;
308  double dV, mss1;
309 
310  answer.resize(18, 18);
311  answer.zero();
312  gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0);
313 
314  dV = this->computeVolumeAround(gp);
315  mss1 = dV * this->giveCrossSection()->give(CS_Thickness, gp) * this->giveStructuralCrossSection()->give('d', gp) / 3.;
316 
317  answer.at(1, 1) = mss1;
318  answer.at(2, 2) = mss1;
319  answer.at(3, 3) = mss1;
320 
321  answer.at(7, 7) = mss1;
322  answer.at(8, 8) = mss1;
323  answer.at(9, 9) = mss1;
324 
325  answer.at(13, 13) = mss1;
326  answer.at(14, 14) = mss1;
327  answer.at(15, 15) = mss1;
328 }
329 
330 
331 void
333 // Computes numerically the load vector of the receiver due to the body
334 // loads, at tStep. - no support for momentum bodyload
335 {
336  double dens, dV, load;
337  GaussPoint *gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0);
338  FloatArray f;
339  FloatMatrix T;
340 
341 
342  forLoad->computeComponentArrayAt(f, tStep, mode);
343 
344  if ( f.giveSize() == 0 ) {
345  answer.clear();
346  return; // nil resultant
347  } else {
348  dens = this->giveStructuralCrossSection()->give('d', gp);
349  dV = this->computeVolumeAround(gp) * this->giveCrossSection()->give(CS_Thickness, gp);
350 
351  answer.resize(18);
352 
353  load = f.at(1) * dens * dV / 3.0;
354  answer.at(1) = load;
355  answer.at(7) = load;
356  answer.at(13) = load;
357 
358  load = f.at(2) * dens * dV / 3.0;
359  answer.at(2) = load;
360  answer.at(8) = load;
361  answer.at(14) = load;
362 
363  load = f.at(3) * dens * dV / 3.0;
364  answer.at(3) = load;
365  answer.at(9) = load;
366  answer.at(15) = load;
367 
368  // transform result from global cs to local element cs.
369  if ( this->computeGtoLRotationMatrix(T) ) {
370  answer.rotatedWith(T, 'n');
371  }
372 
373  return;
374  }
375 }
376 
377 int
379 //
380 // returns a unit vectors of local coordinate system at element
381 // stored rowwise (mainly used by some materials with ortho and anisotrophy)
382 //
383 {
385  answer = GtoLRotationMatrix;
386  return 1;
387 }
388 
389 
390 //converts global coordinates to local planar area coordinates, does not return a coordinate in the thickness direction, but
391 //does check that the point is in the element thickness
392 #define POINT_TOL 1.e-3
393 bool
395 {
396  //set size of return value to 3 area coordinates
397  answer.resize(3);
398 
399  //rotate the input point Coordinate System into the element CS
400  FloatArray inputCoords_ElCS;
401  this->giveLocalCoordinates( inputCoords_ElCS, const_cast< FloatArray & >(coords) );
402 
403  //Nodes are defined in the global CS, so they also need to be rotated into the element CS, therefore get the node points and
404  //rotate them into the element CS
405  FloatArray nodeCoords;
406  double x1, x2, x3, y1, y2, y3, z1, z2, z3;
407 
408  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(1)->giveCoordinates() ) );
409  x1 = nodeCoords.at(1);
410  y1 = nodeCoords.at(2);
411  z1 = nodeCoords.at(3);
412 
413  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(2)->giveCoordinates() ) );
414  x2 = nodeCoords.at(1);
415  y2 = nodeCoords.at(2);
416  z2 = nodeCoords.at(3);
417 
418  this->giveLocalCoordinates( nodeCoords, * ( this->giveNode(3)->giveCoordinates() ) );
419  x3 = nodeCoords.at(1);
420  y3 = nodeCoords.at(2);
421  z3 = nodeCoords.at(3);
422 
423  //Compute the area coordinates corresponding to this point
424  double area;
425  area = 0.5 * ( x2 * y3 + x1 * y2 + y1 * x3 - x2 * y1 - x3 * y2 - x1 * y3 );
426 
427  answer.at(1) = ( ( x2 * y3 - x3 * y2 ) + ( y2 - y3 ) * inputCoords_ElCS.at(1) + ( x3 - x2 ) * inputCoords_ElCS.at(2) ) / 2. / area;
428  answer.at(2) = ( ( x3 * y1 - x1 * y3 ) + ( y3 - y1 ) * inputCoords_ElCS.at(1) + ( x1 - x3 ) * inputCoords_ElCS.at(2) ) / 2. / area;
429  answer.at(3) = ( ( x1 * y2 - x2 * y1 ) + ( y1 - y2 ) * inputCoords_ElCS.at(1) + ( x2 - x1 ) * inputCoords_ElCS.at(2) ) / 2. / area;
430 
431  //get midplane location at this point
432  double midplZ;
433  midplZ = z1 * answer.at(1) + z2 *answer.at(2) + z3 *answer.at(3);
434 
435  //check that the z is within the element
437  GaussPoint _gp(NULL, 1, answer, 1.0, _2dPlate);
438 
439  double elthick;
440 
441  elthick = cs->give(CS_Thickness, & _gp);
442 
443  if ( elthick / 2.0 + midplZ - fabs( inputCoords_ElCS.at(3) ) < -POINT_TOL ) {
444  answer.zero();
445  return false;
446  }
447 
448  //check that the point is in the element and set flag
449  for ( int i = 1; i <= 3; i++ ) {
450  if ( answer.at(i) < ( 0. - POINT_TOL ) ) {
451  return false;
452  }
453 
454  if ( answer.at(i) > ( 1. + POINT_TOL ) ) {
455  return false;
456  }
457  }
458 
459  return true;
460 }
461 
462 
463 bool
465 // Returns the rotation matrix of the receiver of the size [18,18]
466 // r(local) = T * r(global)
467 //
468 // local coordinate (described by vector triplet e1',e2',e3') is defined as follows:
469 //
470 // e1' : [N2-N1] Ni - means i - th node
471 // help : [N3-N1]
472 // e3' : e1' x help
473 // e2' : e3' x e1'
474 {
475  double val;
476 
478 
479 
480  answer.resize(18, 18);
481  answer.zero();
482 
483  for ( int i = 1; i <= 3; i++ ) {
484  for ( int j = 1; j <= 3; j++ ) {
485  val = GtoLRotationMatrix.at(i, j);
486  answer.at(i, j) = val;
487  answer.at(i + 3, j + 3) = val;
488  answer.at(i + 6, j + 6) = val;
489  answer.at(i + 9, j + 9) = val;
490  answer.at(i + 12, j + 12) = val;
491  answer.at(i + 15, j + 15) = val;
492  }
493  }
494 
495  return 1;
496 }
497 
498 
499 void
501 //
502 // Returns global coordinates given in global vector
503 // transformed into local coordinate system of the
504 // receiver
505 //
506 {
507  // test the parameter
508  if ( global.giveSize() != 3 ) {
509  OOFEM_ERROR("cannot transform coordinates- size mismatch");
510  exit(1);
511  }
512 
513  // first ensure that receiver's GtoLRotationMatrix[3,3]
514  // is defined
515 
517  answer.beProductOf(GtoLRotationMatrix, global);
518 }
519 
520 
521 void
523 //
524 // returns characteristic tensor of the receiver at given gp and tStep
525 //
526 {
527  answer.resize(3, 3);
528  answer.zero();
529 
530  if ( ( type == LocalForceTensor ) || ( type == GlobalForceTensor ) ) {
531  FloatArray stress, strain;
532  this->computeStrainVector(strain, gp, tStep);
533  this->computeStressVector(stress, strain, gp, tStep);
534  answer.at(1, 1) = stress.at(1);
535  answer.at(2, 2) = stress.at(2);
536  answer.at(1, 2) = stress.at(3);
537  answer.at(2, 1) = stress.at(3);
538  answer.at(1, 3) = stress.at(7);
539  answer.at(3, 1) = stress.at(7);
540  answer.at(2, 3) = stress.at(8);
541  answer.at(3, 2) = stress.at(8);
542  } else if ( ( type == LocalMomentTensor ) || ( type == GlobalMomentTensor ) ) {
543  FloatArray stress, strain;
544  this->computeStrainVector(strain, gp, tStep);
545  this->computeStressVector(stress, strain, gp, tStep);
546  answer.at(1, 1) = stress.at(4);
547  answer.at(2, 2) = stress.at(5);
548  answer.at(1, 2) = stress.at(6);
549  answer.at(2, 1) = stress.at(6);
550  } else if ( ( type == LocalStrainTensor ) || ( type == GlobalStrainTensor ) ) {
551  FloatArray strain;
552  this->computeStrainVector(strain, gp, tStep);
553 
554  answer.at(1, 1) = strain.at(1);
555  answer.at(2, 2) = strain.at(2);
556  answer.at(1, 2) = strain.at(3) / 2.;
557  answer.at(2, 1) = strain.at(3) / 2.;
558  answer.at(1, 3) = strain.at(7) / 2.;
559  answer.at(3, 1) = strain.at(7) / 2.;
560  answer.at(2, 3) = strain.at(8) / 2.;
561  answer.at(3, 2) = strain.at(8) / 2.;
562  } else if ( ( type == LocalCurvatureTensor ) || ( type == GlobalCurvatureTensor ) ) {
563  FloatArray curv;
564  this->computeStrainVector(curv, gp, tStep);
565  answer.at(1, 1) = curv.at(4);
566  answer.at(2, 2) = curv.at(5);
567  answer.at(1, 2) = curv.at(6) / 2.;
568  answer.at(2, 1) = curv.at(6) / 2.;
569  } else {
570  OOFEM_ERROR("unsupported tensor mode");
571  exit(1);
572  }
573 
574  if ( ( type == GlobalForceTensor ) || ( type == GlobalMomentTensor ) ||
575  ( type == GlobalStrainTensor ) || ( type == GlobalCurvatureTensor ) ) {
578  }
579 }
580 
581 
582 void
584  GaussPoint *masterGp, GaussPoint *slaveGp, TimeStep *tStep)
585 //
586 // returns full 3d strain vector of given layer (whose z-coordinate from center-line is
587 // stored in slaveGp) for given tStep
588 //
589 {
590  double layerZeta, layerZCoord, top, bottom;
591 
592  top = this->giveCrossSection()->give(CS_TopZCoord, masterGp);
593  bottom = this->giveCrossSection()->give(CS_BottomZCoord, masterGp);
594  layerZeta = slaveGp->giveNaturalCoordinate(3);
595  layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
596 
597  answer.resize(5); // {Exx,Eyy,GMyz,GMzx,GMxy}
598 
599  answer.at(1) = masterGpStrain.at(1) + masterGpStrain.at(4) * layerZCoord;
600  answer.at(2) = masterGpStrain.at(2) + masterGpStrain.at(5) * layerZCoord;
601  answer.at(5) = masterGpStrain.at(3) + masterGpStrain.at(6) * layerZCoord;
602  answer.at(3) = masterGpStrain.at(8);
603  answer.at(4) = masterGpStrain.at(7);
604 }
605 
606 
607 void
609 {
610  FloatArray v;
611 
612  fprintf(file, "element %d (%8d):\n", this->giveLabel(), number);
613 
614  for ( GaussPoint *gp: *integrationRulesArray [ 0 ] ) {
615 
616  fprintf( file, " GP 1.%d :", gp->giveNumber() );
617  this->giveIPValue(v, gp, IST_ShellStrainTensor, tStep);
618  fprintf(file, " strains ");
619  // eps_x, eps_y, eps_z, eps_yz, eps_xz, eps_xy (global)
620  fprintf( file,
621  " %.4e %.4e %.4e %.4e %.4e %.4e ",
622  v.at(1), v.at(2), v.at(3), v.at(4), v.at(5), v.at(6) );
623 
624  this->giveIPValue(v, gp, IST_CurvatureTensor, tStep);
625  fprintf(file, "\n curvatures ");
626  // k_x, k_y, k_z, k_yz, k_xz, k_xy (global)
627  fprintf( file,
628  " %.4e %.4e %.4e %.4e %.4e %.4e ",
629  v.at(1), v.at(2), v.at(3), v.at(4), v.at(5), v.at(6) );
630 
631  // Forces - Moments
632  this->giveIPValue(v, gp, IST_ShellForceTensor, tStep);
633  fprintf(file, "\n stresses ");
634  // n_x, n_y, n_z, v_yz, v_xz, v_xy (global)
635  fprintf( file,
636  " %.4e %.4e %.4e %.4e %.4e %.4e ",
637  v.at(1), v.at(2), v.at(3), v.at(4), v.at(5), v.at(6) );
638 
639  this->giveIPValue(v, gp, IST_ShellMomentTensor, tStep);
640  fprintf(file, "\n moments ");
641  // m_x, m_y, m_z, m_yz, m_xz, m_xy (global)
642  fprintf( file,
643  " %.4e %.4e %.4e %.4e %.4e %.4e ",
644  v.at(1), v.at(2), v.at(3), v.at(4), v.at(5), v.at(6) );
645 
646  fprintf(file, "\n");
647  }
648 }
649 
650 
651 void
652 RerShell :: giveDofManDofIDMask(int inode, IntArray &answer) const
653 {
654  answer = {D_u, D_v, D_w, R_u, R_v, R_w};
655 }
656 
657 
658 void
660  InternalStateType type, TimeStep *tStep)
661 {
662  this->giveIPValue(answer, integrationRulesArray [ 0 ]->getIntegrationPoint(0), type, tStep);
663 }
664 
665 
666 int
668 {
669  FloatMatrix globTensor;
670  CharTensor cht;
671 
672  answer.resize(6);
673 
674  if ( type == IST_CurvatureTensor || type == IST_ShellStrainTensor ) {
675  if ( type == IST_CurvatureTensor ) {
676  cht = GlobalCurvatureTensor;
677  } else {
678  cht = GlobalStrainTensor;
679  }
680 
681  this->giveCharacteristicTensor(globTensor, cht, gp, tStep);
682 
683  answer.at(1) = globTensor.at(1, 1); //xx
684  answer.at(2) = globTensor.at(2, 2); //yy
685  answer.at(3) = globTensor.at(3, 3); //zz
686  answer.at(4) = 2*globTensor.at(2, 3); //yz
687  answer.at(5) = 2*globTensor.at(1, 3); //xz
688  answer.at(6) = 2*globTensor.at(1, 2); //xy
689 
690  return 1;
691  } else if ( type == IST_ShellMomentTensor || type == IST_ShellForceTensor ) {
692  if ( type == IST_ShellMomentTensor ) {
693  cht = GlobalMomentTensor;
694  } else {
695  cht = GlobalForceTensor;
696  }
697 
698  this->giveCharacteristicTensor(globTensor, cht, gp, tStep);
699 
700  answer.at(1) = globTensor.at(1, 1); //xx
701  answer.at(2) = globTensor.at(2, 2); //yy
702  answer.at(3) = globTensor.at(3, 3); //zz
703  answer.at(4) = globTensor.at(2, 3); //yz
704  answer.at(5) = globTensor.at(1, 3); //xz
705  answer.at(6) = globTensor.at(1, 2); //xy
706 
707  return 1;
708  } else {
709  return StructuralElement :: giveIPValue(answer, gp, type, tStep);
710  }
711 }
712 
713 
714 #ifdef __OOFEG
715 /*
716  * void
717  * CCTPlate :: drawRawGeometry ()
718  * {
719  * WCRec p[3];
720  * GraphicObj *go;
721  *
722  * EASValsSetLineWidth(RAW_GEOMETRY_WIDTH);
723  * EASValsSetColor(elementColor);
724  * EASValsSetLayer(RAW_GEOMETRY_LAYER);
725  * p[0].x = (FPNum) this->giveNode(1)->giveCoordinate(1);
726  * p[0].y = (FPNum) this->giveNode(1)->giveCoordinate(2);
727  * p[0].z = (FPNum) this->giveNode(1)->giveCoordinate(3);
728  * p[1].x = (FPNum) this->giveNode(2)->giveCoordinate(1);
729  * p[1].y = (FPNum) this->giveNode(2)->giveCoordinate(2);
730  * p[1].z = (FPNum) this->giveNode(2)->giveCoordinate(3);
731  * p[2].x = (FPNum) this->giveNode(3)->giveCoordinate(1);
732  * p[2].y = (FPNum) this->giveNode(3)->giveCoordinate(2);
733  * p[2].z = (FPNum) this->giveNode(3)->giveCoordinate(3);
734  *
735  * go = CreateTriangle3D(p);
736  * EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
737  * EGAttachObject(go, (EObjectP) this);
738  * EMAddGraphicsToModel(ESIModel(), go);
739  * }
740  *
741  * void
742  * CCTPlate :: drawDeformedGeometry (UnknownType defMode)
743  * {
744  * WCRec p[3];
745  * GraphicObj *go;
746  *
747  * EASValsSetLineWidth(DEFORMED_GEOMETRY_WIDTH);
748  * EASValsSetColor(deformedElementColor);
749  * EASValsSetLayer(DEFORMED_GEOMETRY_LAYER);
750  * p[0].x = (FPNum) this->giveNode(1)->giveUpdatedCoordinate(1,tStep,defScale);
751  * p[0].y = (FPNum) this->giveNode(1)->giveUpdatedCoordinate(2,tStep,defScale);
752  * p[0].z = (FPNum) this->giveNode(1)->giveUpdatedCoordinate(3,tStep,defScale);
753  * p[1].x = (FPNum) this->giveNode(2)->giveUpdatedCoordinate(1,tStep,defScale);
754  * p[1].y = (FPNum) this->giveNode(2)->giveUpdatedCoordinate(2,tStep,defScale);
755  * p[1].z = (FPNum) this->giveNode(2)->giveUpdatedCoordinate(3,tStep,defScale);
756  * p[2].x = (FPNum) this->giveNode(3)->giveUpdatedCoordinate(1,tStep,defScale);
757  * p[2].y = (FPNum) this->giveNode(3)->giveUpdatedCoordinate(2,tStep,defScale);
758  * p[2].z = (FPNum) this->giveNode(3)->giveUpdatedCoordinate(3,tStep,defScale);
759  *
760  * go = CreateTriangle3D(p);
761  * EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
762  * EMAddGraphicsToModel(ESIModel(), go);
763  * }
764  *
765  */
766 
767 
768 //void
769 //RerShell :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
770 //{}
771 
772 
773 
774 /*
775  * int
776  * RerShell :: giveInternalStateAtNode (FloatArray& answer, InternalValueRequest& r, int node, TimeStep* tStep)
777  *
778  * //
779  * // see eleemnt.h for description
780  * //
781  * {
782  * opravit;
783  *
784  * DrawMode mode = gc.getDrawMode();
785  *
786  * if (!gc.testElementGraphicActivity(this)) return 0;
787  *
788  * const FloatArray* nodval;
789  * int result = this->giveDomain()->giveSmoother()->giveNodalVector(nodval, this->giveNode(inode)->giveNumber(),
790  * this->giveDomain()->giveSmoother()->giveElementRegion(this));
791  * if (result) {
792  * if (mode == sxForce ) {
793  ***val = nodval->at(1);
794  * return 1;
795  * } else if (mode == syForce) {
796  ***val = nodval->at(2);
797  * return 1;
798  * } else if (mode == sxyForce) {
799  ***val = nodval->at(3);
800  * return 1;
801  * } else if (mode == mxForce ) {
802  ***val = nodval->at(4);
803  * return 1;
804  * } else if (mode == myForce) {
805  ***val = nodval->at(5);
806  * return 1;
807  * } else if (mode == mxyForce) {
808  ***val = nodval->at(6);
809  * return 1;
810  * } else if (mode == szxForce ) {
811  ***val = nodval->at(7);
812  * return 1;
813  * } else if (mode == syzForce) {
814  ***val = nodval->at(8);
815  * return 1;
816  * } else return 0;
817  * }
818  * return 0;
819  * }
820  */
821 #endif
822 } // end namespace oofem
#define POINT_TOL
Definition: rershell.C:392
CrossSection * giveCrossSection()
Definition: element.C:495
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The element interface required by NodalAvergagingRecoveryModel.
int number
Component number.
Definition: femcmpnn.h:80
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
Definition: rershell.C:394
Class and object Domain.
Definition: domain.h:115
Bottom z coordinate.
Definition: crosssection.h:72
The element interface required by ZZNodalRecoveryModel.
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
void clear()
Clears receiver (zero size).
Definition: floatarray.h:206
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Computes constitutive matrix of receiver.
Definition: rershell.C:292
double Rxy
Definition: rershell.h:66
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to stream, for given time step.
Definition: rershell.C:608
Top z coordinate.
Definition: crosssection.h:71
virtual void computeStrainVectorInLayer(FloatArray &answer, const FloatArray &masterGpStrain, GaussPoint *masterGp, GaussPoint *slaveGp, TimeStep *tStep)
Computes full 3D strain vector in element layer.
Definition: rershell.C:583
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
Definition: rershell.C:72
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in full form.
Definition: rershell.C:667
virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Computes boundary condition value - its components values at given time.
Definition: load.C:82
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
void rotatedWith(FloatMatrix &r, char mode)
Returns the receiver a rotated according the change-of-base matrix r.
Definition: floatarray.C:799
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
Definition: rershell.C:652
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
Definition: rershell.C:87
void giveLocalCoordinates(FloatArray &answer, const FloatArray &global)
Definition: rershell.C:500
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
Definition: gausspoint.h:136
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer)
Computes interpolation matrix for element unknowns.
Definition: rershell.C:175
FloatMatrix GtoLRotationMatrix
Transformation Matrix form GtoL(3,3) is stored at the element level for computation efficiency...
Definition: cct3d.h:79
This class represent CCT plate element that can be arbitrary oriented in space, in contrast to base C...
Definition: cct3d.h:72
virtual void give3dShellStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)=0
Method for computing 3d shell stiffness matrix.
#define OOFEM_ERROR(...)
Definition: error.h:61
virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes the stress vector of receiver at given integration point, at time step tStep.
Definition: rershell.C:298
REGISTER_Element(LSpace)
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
void times(double f)
Multiplies receiver by factor f.
Definition: floatmatrix.C:1594
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver &#39;a&#39; transformed using give transformation matrix r.
Definition: floatmatrix.C:1557
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
Definition: floatarray.C:676
virtual void computeStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Compute strain vector of receiver evaluated at given integration point at given time step from elemen...
virtual int giveLocalCoordinateSystem(FloatMatrix &answer)
Returns local coordinate system of receiver Required by material models with ortho- and anisotrophy...
Definition: rershell.C:378
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
virtual void computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep)
Computes lumped mass matrix of receiver.
Definition: rershell.C:304
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
Definition: crosssection.C:54
int numberOfGaussPoints
Number of integration points as specified by nip.
Definition: element.h:188
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
Definition: crosssection.C:151
virtual void computeBodyLoadVectorAt(FloatArray &answer, Load *load, TimeStep *tStep, ValueModeType mode)
Computes the load vector due to body load acting on receiver, at given time step. ...
Definition: rershell.C:332
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
virtual double giveArea()
Definition: rershell.C:248
Class representing the general Input Record.
Definition: inputrecord.h:101
Class Interface.
Definition: interface.h:82
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
void giveCharacteristicTensor(FloatMatrix &answer, CharTensor type, GaussPoint *gp, TimeStep *tStep)
Definition: rershell.C:522
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
Definition: rershell.C:659
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: rershell.C:275
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
Definition: element.h:170
virtual void giveGeneralizedStress_Shell(FloatArray &answer, GaussPoint *gp, const FloatArray &generalizedStrain, TimeStep *tStep)=0
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
double area
Definition: cct.h:67
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
Load is base abstract class for all loads.
Definition: load.h:61
The element interface required by LayeredCrossSection.
RerShell(int n, Domain *d)
Definition: rershell.C:60
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
Abstract base class for all structural cross section models.
int giveLabel() const
Definition: element.h:1055
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
Definition: cct.C:350
Node * giveNode(int i) const
Returns reference to the i-th node of element.
Definition: element.h:610
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
Definition: rershell.C:163
virtual const FloatMatrix * computeGtoLRotationMatrix()
Definition: rershell.h:86
Class representing Gaussian-quadrature integration rule.
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011