OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
layeredcrosssection.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/CrossSections/layeredcrosssection.h"
36 #include "../sm/Elements/structuralelement.h"
37 #include "../sm/Materials/structuralmaterial.h"
38 #include "../sm/Materials/structuralms.h"
39 #include "gausspoint.h"
40 #include "material.h"
41 #include "floatarray.h"
42 #include "contextioerr.h"
43 #include "gaussintegrationrule.h"
44 #include "mathfem.h"
45 #include "classfactory.h"
46 #include "lobattoir.h"
47 #include "dynamicinputrecord.h"
48 #include "cltypes.h"
49 
50 namespace oofem {
51 REGISTER_CrossSection(LayeredCrossSection);
52 
53 
54 void
56 {
58  // Determine which layer the gp belongs to. This code assumes that the gauss point are created consistently (through CrossSection::setupIntegrationPoints)
60  int gpnum = gp->giveNumber();
61  int gpsperlayer = ngps / this->numberOfLayers;
62  int layer = ( gpnum - 1 ) / gpsperlayer + 1;
63  Material *layerMat = this->domain->giveMaterial( this->giveLayerMaterial(layer) );
64  if ( this->layerRots.at(layer) != 0. ) {
65  double rot = this->layerRots.at(layer);
66  double c = cos(rot * M_PI / 180.);
67  double s = sin(rot * M_PI / 180.);
68 
69  FloatArray rotStress;
70  FloatArray rotStrain(6);
71  rotStrain.at(1) = c * c * strain.at(1) - c *s *strain.at(6) + s *s *strain.at(2);
72  rotStrain.at(2) = c * c * strain.at(2) + c *s *strain.at(6) + s *s *strain.at(1);
73  rotStrain.at(3) = strain.at(3);
74  rotStrain.at(4) = c * strain.at(4) + s *strain.at(5);
75  rotStrain.at(5) = c * strain.at(5) - s *strain.at(4);
76  rotStrain.at(6) = ( c * c - s * s ) * strain.at(6) + 2 * c * s * ( strain.at(1) - strain.at(2) );
77 
78  static_cast< StructuralMaterial * >(layerMat)->giveRealStressVector_3d(rotStress, gp, rotStrain, tStep);
79 
80  answer = {
81  c *c * rotStress.at(1) + 2 * c * s * rotStress.at(6) + s * s * rotStress.at(2),
82  c * c * rotStress.at(2) - 2 * c * s * rotStress.at(6) + s * s * rotStress.at(1),
83  rotStress.at(3),
84  c * rotStress.at(4) - s * rotStress.at(5),
85  c * rotStress.at(5) + s * rotStress.at(4),
86  ( c * c - s * s ) * rotStress.at(6) - c * s * ( rotStress.at(1) - rotStress.at(2) ),
87  };
88  } else {
89  static_cast< StructuralMaterial * >(layerMat)->giveRealStressVector_3d(answer, gp, strain, tStep);
90  }
91  } else {
92  OOFEM_ERROR("Only cubes and wedges are meaningful for layered cross-sections");
93  }
94 }
95 
96 void
98 {
100  answer.resize(6);
101  answer.zero();
102 }
103 
104 
105 
106 void
108 {
109  OOFEM_ERROR("Not supported");
110 }
111 
112 
113 void
115 {
116  //strain eps_x, eps_y, gamma_xy
117  //stress sig_x, sig_y, tau_xy
118  //answer n_x, n_y, n_xy
119 
120  answer.resize(3);
121  answer.zero();
122 
123  double layerThick, layerZCoord, top, bottom, layerZeta;
124  FloatArray layerStrain, reducedLayerStress;
125 
126  bottom = this->give(CS_BottomZCoord, masterGp);
127  top = this->give(CS_TopZCoord, masterGp);
128 
129  StructuralElement *element = dynamic_cast< StructuralElement * >( masterGp->giveElement() );
130 
131 
132  for ( int layer = 1; layer <= numberOfLayers; layer++ ) {
133  GaussPoint *layerGp = this->giveSlaveGaussPoint(masterGp, layer - 1);
134  Material *layerMat = this->domain->giveMaterial( this->giveLayerMaterial(layer) );
135  LayeredCrossSectionInterface *interface = static_cast< LayeredCrossSectionInterface * >( element->giveInterface(LayeredCrossSectionInterfaceType) );
136 
137  // resolve current layer z-coordinate
138  layerThick = this->layerThicks.at(layer);
139  layerZeta = layerGp->giveNaturalCoordinate(3);
140  layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
141 
142  // Compute the layer stress
143  interface->computeStrainVectorInLayer(layerStrain, strain, masterGp, layerGp, tStep);
144  dynamic_cast< StructuralMaterial * >(layerMat)->giveRealStressVector_PlaneStress(reducedLayerStress, layerGp, layerStrain, tStep);
145  answer.at(1) += reducedLayerStress.at(1) * layerThick;
146  answer.at(2) += reducedLayerStress.at(2) * layerThick * layerZCoord;
147  answer.at(3) += reducedLayerStress.at(3) * layerThick * ( 5. / 6. );
148  }
149 
150  StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >
151  ( domain->giveMaterial( layerMaterials.at(1) )->giveStatus(masterGp) );
152  status->letTempStrainVectorBe(strain);
153  status->letTempStressVectorBe(answer);
154 }
155 
156 
157 void
159 {
160  OOFEM_ERROR("Not supported");
161 }
162 
163 
164 void
166 {
167  OOFEM_ERROR("Not supported");
168 }
169 
170 
171 void
173 {
175  // Determine which layer the gp belongs to. This code assumes that the gauss point are created consistently (through CrossSection::setupIntegrationPoints)
177  int gpnum = gp->giveNumber();
178  int gpsperlayer = ngps / this->numberOfLayers;
179  int layer = ( gpnum - 1 ) / gpsperlayer + 1;
180  Material *layerMat = this->domain->giveMaterial( this->giveLayerMaterial(layer) );
181  static_cast< StructuralMaterial * >(layerMat)->give3dMaterialStiffnessMatrix(answer, rMode, gp, tStep);
182 
183  if ( this->layerRots.at(layer) != 0. ) {
184  double rot = this->layerRots.at(layer);
185  double c = cos(rot * M_PI / 180.);
186  double s = sin(rot * M_PI / 180.);
187 
188  FloatMatrix rotTangent = {
189  { c *c, s *s, 0, 0, 0, -c *s },
190  { s *s, c *c, 0, 0, 0, c *s },
191  { 0, 0, 1, 0, 0, 0 },
192  { 0, 0, 0, c, s, 0 },
193  { 0, 0, 0, -s, c, 0 },
194  { 2 * c * s, -2 * c * s, 0, 0, 0, c * c - s * s }
195  };
196  answer.rotatedWith(rotTangent, 't');
197  }
198  } else {
199  OOFEM_ERROR("Only cubes and wedges are meaningful for layered cross-sections");
200  }
201 }
202 
203 
204 void
206 {
207  answer.resize(3,3);
208  answer.zero();
209  double totThick = 0.;
210 
211  //Average stiffness over all layers
212  for ( int layer = 1; layer <= numberOfLayers; layer++ ) {
213  FloatMatrix subAnswer;
214  GaussPoint *slaveGP = this->giveSlaveGaussPoint(masterGp, layer - 1);
215  Material *layerMat = this->domain->giveMaterial( this->giveLayerMaterial(layer) );
216  double layerThick = this->layerThicks.at(layer);
217  totThick += layerThick;
218  dynamic_cast< StructuralMaterial * >(layerMat)->givePlaneStressStiffMtrx(subAnswer, rMode, slaveGP, tStep);
219  subAnswer.times(layerThick);
220  answer.add(subAnswer);
221  }
222  answer.times(1./totThick);
223 }
224 
225 
226 void
228 {
229  OOFEM_ERROR("Not supported");
230 }
231 
232 
233 void
235 {
236  OOFEM_ERROR("Not supported");
237 }
238 
239 
240 void
242 {
243  double layerThick, layerWidth, layerZCoord, top, bottom, layerZeta;
244  FloatArray layerStrain, reducedLayerStress;
245  StructuralElement *element = static_cast< StructuralElement * >( gp->giveElement() );
246  LayeredCrossSectionInterface *interface = static_cast< LayeredCrossSectionInterface * >( element->giveInterface(LayeredCrossSectionInterfaceType) );
247 
248  answer.resize(3);
249  answer.zero();
250 
251  // perform integration over layers
252  bottom = this->give(CS_BottomZCoord, gp);
253  top = this->give(CS_TopZCoord, gp);
254 
255  if ( interface == NULL ) {
256  OOFEM_ERROR("element with no layer support encountered");
257  }
258 
259  for ( int layer = 1; layer <= numberOfLayers; layer++ ) {
260  GaussPoint *layerGp = this->giveSlaveGaussPoint(gp, layer - 1);
261  StructuralMaterial *layerMat = static_cast< StructuralMaterial * >( domain->giveMaterial( layerMaterials.at(layer) ) );
262 
263  // resolve current layer z-coordinate
264  layerThick = this->layerThicks.at(layer);
265  layerWidth = this->layerWidths.at(layer);
266  layerZeta = layerGp->giveNaturalCoordinate(3);
267  layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
268 
269  // Compute the layer stress
270  interface->computeStrainVectorInLayer(layerStrain, strain, gp, layerGp, tStep);
271 
272  if ( this->layerRots.at(layer) != 0. ) {
273  OOFEM_ERROR("Rotation not supported for beams");
274  } else {
275  layerMat->giveRealStressVector_2dBeamLayer(reducedLayerStress, layerGp, layerStrain, tStep);
276  }
277 
278  answer.at(1) += reducedLayerStress.at(1) * layerWidth * layerThick; //Nx
279  answer.at(2) += reducedLayerStress.at(1) * layerWidth * layerThick * layerZCoord;//My
280  answer.at(3) += reducedLayerStress.at(2) * layerWidth * layerThick; //Vz
281  }
282 
283  // Create material status according to the first layer material
285  //CrossSectionStatus *status = new CrossSectionStatus(gp);
286  //gp->setMaterialStatus(status);
287  StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >
288  ( domain->giveMaterial( layerMaterials.at(1) )->giveStatus(gp) );
289  status->letTempStrainVectorBe(strain);
290  status->letTempStressVectorBe(answer);
291 }
292 
293 
294 void
296 {
297  OOFEM_ERROR("Not supported");
298 }
299 
300 
301 void
303 {
304  double layerThick, layerWidth, layerZCoord, top, bottom, layerZeta;
305  FloatArray layerStrain, reducedLayerStress;
306  StructuralElement *element = static_cast< StructuralElement * >( gp->giveElement() );
307  LayeredCrossSectionInterface *interface = static_cast< LayeredCrossSectionInterface * >( element->giveInterface(LayeredCrossSectionInterfaceType) );
308 
309  answer.resize(5);
310  answer.zero();
311 
312  // perform integration over layers
313  bottom = this->give(CS_BottomZCoord, gp);
314  top = this->give(CS_TopZCoord, gp);
315 
316  if ( interface == NULL ) {
317  OOFEM_ERROR("element with no layer support encountered");
318  }
319 
320  for ( int layer = 1; layer <= numberOfLayers; layer++ ) {
321  GaussPoint *layerGp = this->giveSlaveGaussPoint(gp, layer - 1);
322  StructuralMaterial *layerMat = static_cast< StructuralMaterial * >( domain->giveMaterial( layerMaterials.at(layer) ) );
323 
324  // resolve current layer z-coordinate
325  layerThick = this->layerThicks.at(layer);
326  layerWidth = this->layerWidths.at(layer);
327  layerZeta = layerGp->giveNaturalCoordinate(3);
328  layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
329 
330  // Compute the layer stress
331  interface->computeStrainVectorInLayer(layerStrain, strain, gp, layerGp, tStep);
332 
333  if ( this->layerRots.at(layer) != 0. ) {
334  double rot = this->layerRots.at(layer);
335  double c = cos(rot * M_PI / 180.);
336  double s = sin(rot * M_PI / 180.);
337 
338  FloatArray rotStress;
339  FloatArray rotStrain = {
340  c *c * layerStrain.at(1) - c * s * layerStrain.at(5) + s * s * layerStrain.at(2),
341  c * c * layerStrain.at(2) + c * s * layerStrain.at(5) + s * s * layerStrain.at(1),
342  c * layerStrain.at(3) + s * layerStrain.at(4),
343  c * layerStrain.at(4) - s * layerStrain.at(3),
344  ( c * c - s * s ) * layerStrain.at(5) + c * s * ( layerStrain.at(1) - layerStrain.at(2) ),
345  };
346 
347  layerMat->giveRealStressVector_PlateLayer(rotStress, layerGp, rotStrain, tStep);
348 
349  reducedLayerStress = {
350  c *c * rotStress.at(1) + 2 * c * s * rotStress.at(5) + s * s * rotStress.at(2),
351  c * c * rotStress.at(2) - 2 * c * s * rotStress.at(5) + s * s * rotStress.at(1),
352  c * rotStress.at(3) - s * rotStress.at(4),
353  c * rotStress.at(4) + s * rotStress.at(3),
354  ( c * c - s * s ) * rotStress.at(5) - c * s * ( rotStress.at(1) - rotStress.at(2) ),
355  };
356  } else {
357  layerMat->giveRealStressVector_PlateLayer(reducedLayerStress, layerGp, layerStrain, tStep);
358  }
359 
360  answer.at(1) += reducedLayerStress.at(1) * layerWidth * layerThick * layerZCoord;
361  answer.at(2) += reducedLayerStress.at(2) * layerWidth * layerThick * layerZCoord;
362  answer.at(3) += reducedLayerStress.at(5) * layerWidth * layerThick * layerZCoord;
363  answer.at(4) += reducedLayerStress.at(4) * layerWidth * layerThick;
364  answer.at(5) += reducedLayerStress.at(3) * layerWidth * layerThick;
365  }
366 
367  // now we must update master gp
368  // Create material status according to the first layer material
370  //CrossSectionStatus *status = new CrossSectionStatus(gp);
371  //gp->setMaterialStatus(status);
372  StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >
373  ( domain->giveMaterial( layerMaterials.at(1) )->giveStatus(gp) );
374  status->letTempStrainVectorBe(strain);
375  status->letTempStressVectorBe(answer);
376 }
377 
378 
379 void
381 {
382  double layerThick, layerWidth, layerZCoord, top, bottom, layerZeta;
383  FloatArray layerStrain, reducedLayerStress;
384  StructuralElement *element = static_cast< StructuralElement * >( gp->giveElement() );
385  LayeredCrossSectionInterface *interface = static_cast< LayeredCrossSectionInterface * >( element->giveInterface(LayeredCrossSectionInterfaceType) );
386 
387  answer.resize(8);
388  answer.zero();
389 
390  // perform integration over layers
391  bottom = this->give(CS_BottomZCoord, gp);
392  top = this->give(CS_TopZCoord, gp);
393 
394  if ( interface == NULL ) {
395  OOFEM_ERROR("element with no layer support encountered");
396  }
397 
398  for ( int layer = 1; layer <= numberOfLayers; layer++ ) {
399  GaussPoint *layerGp = this->giveSlaveGaussPoint(gp, layer - 1);
400  StructuralMaterial *layerMat = static_cast< StructuralMaterial * >( domain->giveMaterial( layerMaterials.at(layer) ) );
401 
402  // resolve current layer z-coordinate
403  layerThick = this->layerThicks.at(layer);
404  layerWidth = this->layerWidths.at(layer);
405  layerZeta = layerGp->giveNaturalCoordinate(3);
406  layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
407 
408  // Compute the layer stress
409  interface->computeStrainVectorInLayer(layerStrain, strain, gp, layerGp, tStep);
410 
411  if ( this->layerRots.at(layer) != 0. ) {
412  double rot = this->layerRots.at(layer);
413  double c = cos(rot * M_PI / 180.);
414  double s = sin(rot * M_PI / 180.);
415 
416  FloatArray rotStress;
417  FloatArray rotStrain = {
418  c *c * layerStrain.at(1) - c * s * layerStrain.at(5) + s * s * layerStrain.at(2),
419  c * c * layerStrain.at(2) + c * s * layerStrain.at(5) + s * s * layerStrain.at(1),
420  c * layerStrain.at(3) + s * layerStrain.at(4),
421  c * layerStrain.at(4) - s * layerStrain.at(3),
422  ( c * c - s * s ) * layerStrain.at(5) + c * s * ( layerStrain.at(1) - layerStrain.at(2) ),
423  };
424 
425  layerMat->giveRealStressVector_PlateLayer(rotStress, layerGp, rotStrain, tStep);
426 
427  reducedLayerStress = {
428  c *c * rotStress.at(1) + 2 * c * s * rotStress.at(5) + s * s * rotStress.at(2),
429  c * c * rotStress.at(2) - 2 * c * s * rotStress.at(5) + s * s * rotStress.at(1),
430  c * rotStress.at(3) - s * rotStress.at(4),
431  c * rotStress.at(4) + s * rotStress.at(3),
432  ( c * c - s * s ) * rotStress.at(5) - c * s * ( rotStress.at(1) - rotStress.at(2) ),
433  };
434  } else {
435  layerMat->giveRealStressVector_PlateLayer(reducedLayerStress, layerGp, layerStrain, tStep);
436  }
437 
438  // 1) membrane terms sx, sy, sxy
439  answer.at(1) += reducedLayerStress.at(1) * layerWidth * layerThick;
440  answer.at(2) += reducedLayerStress.at(2) * layerWidth * layerThick;
441  answer.at(3) += reducedLayerStress.at(5) * layerWidth * layerThick;
442  // 2) bending terms mx, my, mxy
443  answer.at(4) += reducedLayerStress.at(1) * layerWidth * layerThick * layerZCoord;
444  answer.at(5) += reducedLayerStress.at(2) * layerWidth * layerThick * layerZCoord;
445  answer.at(6) += reducedLayerStress.at(5) * layerWidth * layerThick * layerZCoord;
446  // 3) shear terms qx, qy
447  answer.at(7) += reducedLayerStress.at(4) * layerWidth * layerThick;
448  answer.at(8) += reducedLayerStress.at(3) * layerWidth * layerThick;
449  }
450 
451  // now we must update master gp
453  //CrossSectionStatus *status = new CrossSectionStatus(gp);
454  //gp->setMaterialStatus(status);
455  // Create material status according to the first layer material
456  StructuralMaterialStatus *status = static_cast< StructuralMaterialStatus * >
457  ( domain->giveMaterial( layerMaterials.at(1) )->giveStatus(gp) );
458  status->letTempStrainVectorBe(strain);
459  status->letTempStressVectorBe(answer);
460 }
461 
462 
463 void
465 {
466  OOFEM_ERROR("Not supported in given cross-section (yet).");
467 }
468 
469 void
471 {
472  OOFEM_ERROR("Not supported in given cross-section (yet).");
473 }
474 
475 void
477  MatResponseMode rMode,
478  GaussPoint *gp,
479  TimeStep *tStep)
480 //
481 // only interface to material class, forcing returned matrix to be in reduced form.
482 //
483 {
484  MaterialMode mode = gp->giveMaterialMode();
485  if ( mode == _2dBeam ) {
486  this->give2dBeamStiffMtrx(answer, rMode, gp, tStep);
487  } else if ( mode == _3dBeam ) {
488  this->give3dBeamStiffMtrx(answer, rMode, gp, tStep);
489  } else if ( mode == _2dPlate ) {
490  this->give2dPlateStiffMtrx(answer, rMode, gp, tStep);
491  } else if ( mode == _3dShell ) {
492  this->give3dShellStiffMtrx(answer, rMode, gp, tStep);
493  } else {
495  int gpnum = gp->giveNumber();
496  int gpsperlayer = ngps / this->numberOfLayers;
497  int layer = ( gpnum - 1 ) / gpsperlayer + 1;
498  StructuralMaterial *mat = static_cast< StructuralMaterial * >( domain->giveMaterial( this->giveLayerMaterial(layer) ) );
499  if ( mat->hasMaterialModeCapability( gp->giveMaterialMode() ) ) {
500  mat->giveStiffnessMatrix(answer, rMode, gp, tStep);
501  } else {
502  OOFEM_ERROR("unsupported StressStrainMode");
503  }
504  }
505 }
506 
507 
508 void
510  MatResponseMode rMode,
511  GaussPoint *gp,
512  TimeStep *tStep)
513 
514 //
515 // assumption sigma_z = 0.
516 //
517 // General strain layer vector has one of the following forms:
518 // 1) strainVector3d {eps_x,eps_y,eps_z,gamma_yz,gamma_zx,gamma_xy}
519 //
520 // returned strain or stress vector has the form:
521 // 2) strainVectorShell {eps_x,eps_y,gamma_xy, kappa_x, kappa_y, kappa_xy, gamma_zx, gamma_zy}
522 //
523 {
524  FloatMatrix layerMatrix;
525  double layerThick, layerWidth, layerZCoord, top, bottom, layerZeta;
526  double layerZCoord2;
527 
528  answer.resize(5, 5);
529  answer.zero();
530 
531  // perform integration over layers
532  bottom = this->give(CS_BottomZCoord, gp);
533  top = this->give(CS_TopZCoord, gp);
534 
535  for ( int layer = 1; layer <= numberOfLayers; layer++ ) {
536  GaussPoint *layerGp = giveSlaveGaussPoint(gp, layer - 1);
537 
539  StructuralMaterial *mat = static_cast< StructuralMaterial * >( domain->giveMaterial( this->giveLayerMaterial(layer) ) );
540  mat->givePlateLayerStiffMtrx(layerMatrix, rMode, layerGp, tStep);
541  if ( this->layerRots.at(layer) != 0. ) {
542  double rot = this->layerRots.at(layer);
543  double c = cos(rot * M_PI / 180.);
544  double s = sin(rot * M_PI / 180.);
545  FloatMatrix rotTangent = {
546  { c *c, s *s, 0, 0, -c *s },
547  { s *s, c *c, 0, 0, c *s },
548  { 0, 0, c, s, 0 },
549  { 0, 0, -s, c, 0 },
550  { 2 * c * s, -2 * c * s, 0, 0, c * c - s * s }
551  };
552  layerMatrix.rotatedWith(rotTangent, 't');
553  }
554 
555  //
556  // resolve current layer z-coordinate
557  //
558  layerThick = this->layerThicks.at(layer);
559  layerWidth = this->layerWidths.at(layer);
560  layerZeta = layerGp->giveNaturalCoordinate(3);
561  layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
562  layerZCoord2 = layerZCoord * layerZCoord;
563  //
564  // perform integration
565  //
566  // 1) bending terms mx, my, mxy
567 
568  answer.at(1, 1) += layerMatrix.at(1, 1) * layerWidth * layerThick * layerZCoord2;
569  answer.at(1, 2) += layerMatrix.at(1, 2) * layerWidth * layerThick * layerZCoord2;
570  answer.at(1, 3) += layerMatrix.at(1, 5) * layerWidth * layerThick * layerZCoord2;
571 
572  answer.at(2, 1) += layerMatrix.at(2, 1) * layerWidth * layerThick * layerZCoord2;
573  answer.at(2, 2) += layerMatrix.at(2, 2) * layerWidth * layerThick * layerZCoord2;
574  answer.at(2, 3) += layerMatrix.at(2, 5) * layerWidth * layerThick * layerZCoord2;
575 
576  answer.at(3, 1) += layerMatrix.at(5, 1) * layerWidth * layerThick * layerZCoord2;
577  answer.at(3, 2) += layerMatrix.at(5, 2) * layerWidth * layerThick * layerZCoord2;
578  answer.at(3, 3) += layerMatrix.at(5, 5) * layerWidth * layerThick * layerZCoord2;
579 
580  // 2) shear terms qx = qxz, qy = qyz
581  answer.at(4, 4) += layerMatrix.at(4, 4) * layerWidth * layerThick;
582  answer.at(4, 5) += layerMatrix.at(4, 3) * layerWidth * layerThick;
583  answer.at(5, 4) += layerMatrix.at(3, 4) * layerWidth * layerThick;
584  answer.at(5, 5) += layerMatrix.at(3, 3) * layerWidth * layerThick;
585  }
586 }
587 
588 
589 void
591  MatResponseMode rMode,
592  GaussPoint *gp,
593  TimeStep *tStep)
594 //
595 // assumption sigma_z = 0.
596 //
597 // General strain layer vector has one of the following forms:
598 // 1) strainVector3d {eps_x,eps_y,eps_z,gamma_yz,gamma_zx,gamma_xy}
599 //
600 // returned strain or stress vector has the form:
601 // 2) strainVectorShell {eps_x,eps_y,gamma_xy, kappa_x, kappa_y, kappa_xy, gamma_zx, gamma_zy}
602 //
603 {
604  FloatMatrix layerMatrix;
605  double layerThick, layerWidth, layerZCoord, top, bottom, layerZeta;
606  // double zi, zi1;
607  double layerZCoord2;
608 
609  answer.resize(8, 8);
610  answer.zero();
611  // perform integration over layers
612  bottom = this->give(CS_BottomZCoord, gp);
613  top = this->give(CS_TopZCoord, gp);
614 
615  for ( int layer = 1; layer <= numberOfLayers; layer++ ) {
616  GaussPoint *layerGp = giveSlaveGaussPoint(gp, layer - 1);
617 
620  StructuralMaterial *mat = static_cast< StructuralMaterial * >( domain->giveMaterial( this->giveLayerMaterial(layer) ) );
621  mat->givePlateLayerStiffMtrx(layerMatrix, rMode, layerGp, tStep);
622  if ( this->layerRots.at(layer) != 0. ) {
623  double rot = this->layerRots.at(layer);
624  double c = cos(rot);
625  double s = sin(rot);
626  FloatMatrix rotTangent = {
627  { c *c, s *s, 0, 0, -c *s },
628  { s *s, c *c, 0, 0, c *s },
629  { 0, 0, c, s, 0 },
630  { 0, 0, -s, c, 0 },
631  { 2 * c * s, -2 * c * s, 0, 0, c * c - s * s }
632  };
633  layerMatrix.rotatedWith(rotTangent, 't');
634  }
635 
636  //
637  // resolve current layer z-coordinate
638  //
639  layerThick = this->layerThicks.at(layer);
640  layerWidth = this->layerWidths.at(layer);
641  layerZeta = layerGp->giveNaturalCoordinate(3);
642  layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
643  layerZCoord2 = layerZCoord * layerZCoord;
644  //
645  // perform integration
646  //
647  // 1) membrane terms sx, sy, sxy
648  answer.at(1, 1) += layerMatrix.at(1, 1) * layerWidth * layerThick;
649  answer.at(1, 2) += layerMatrix.at(1, 2) * layerWidth * layerThick;
650  answer.at(1, 3) += layerMatrix.at(1, 5) * layerWidth * layerThick;
651 
652  answer.at(2, 1) += layerMatrix.at(2, 1) * layerWidth * layerThick;
653  answer.at(2, 2) += layerMatrix.at(2, 2) * layerWidth * layerThick;
654  answer.at(2, 3) += layerMatrix.at(2, 5) * layerWidth * layerThick;
655 
656  answer.at(3, 1) += layerMatrix.at(5, 1) * layerWidth * layerThick;
657  answer.at(3, 2) += layerMatrix.at(5, 2) * layerWidth * layerThick;
658  answer.at(3, 3) += layerMatrix.at(5, 5) * layerWidth * layerThick;
659 
660  // 2) bending terms mx, my, mxy
661 
662  answer.at(4, 4) += layerMatrix.at(1, 1) * layerWidth * layerThick * layerZCoord2;
663  answer.at(4, 5) += layerMatrix.at(1, 2) * layerWidth * layerThick * layerZCoord2;
664  answer.at(4, 6) += layerMatrix.at(1, 5) * layerWidth * layerThick * layerZCoord2;
665 
666  answer.at(5, 4) += layerMatrix.at(2, 1) * layerWidth * layerThick * layerZCoord2;
667  answer.at(5, 5) += layerMatrix.at(2, 2) * layerWidth * layerThick * layerZCoord2;
668  answer.at(5, 6) += layerMatrix.at(2, 5) * layerWidth * layerThick * layerZCoord2;
669 
670  answer.at(6, 4) += layerMatrix.at(5, 1) * layerWidth * layerThick * layerZCoord2;
671  answer.at(6, 5) += layerMatrix.at(5, 2) * layerWidth * layerThick * layerZCoord2;
672  answer.at(6, 6) += layerMatrix.at(5, 5) * layerWidth * layerThick * layerZCoord2;
673 
674  // 3) shear terms qx, qy
675  answer.at(7, 7) += layerMatrix.at(4, 4) * layerWidth * layerThick;
676  answer.at(7, 8) += layerMatrix.at(4, 3) * layerWidth * layerThick;
677  answer.at(8, 7) += layerMatrix.at(3, 4) * layerWidth * layerThick;
678  answer.at(8, 8) += layerMatrix.at(3, 3) * layerWidth * layerThick;
679  }
680 }
681 
682 void
684 {
686  answer.resize(6,6);
687  answer.zero();
688 }
689 
690 
691 
692 
693 void
695  MatResponseMode rMode,
696  GaussPoint *gp,
697  TimeStep *tStep)
698 //
699 // assumption sigma_z = 0.
700 //
701 // General strain layer vector has one of the following forms:
702 // 1) strainVector3d {eps_x,eps_y,eps_z,gamma_yz,gamma_zx,gamma_xy}
703 //
704 // returned strain or stress vector has the form:
705 // 2) strainVectorShell {eps_x,eps_y,gamma_xy, kappa_x, kappa_y, kappa_xy, gamma_zx, gamma_zy}
706 //
707 {
708  FloatMatrix layerMatrix;
709  double layerThick, layerWidth, layerZCoord, top, bottom, layerZeta;
710  double layerZCoord2;
711 
712  // perform integration over layers
713  bottom = this->give(CS_BottomZCoord, gp);
714  top = this->give(CS_TopZCoord, gp);
715 
716  answer.resize(3, 3);
717  answer.zero();
718 
719  for ( int i = 1; i <= numberOfLayers; i++ ) {
720  GaussPoint *layerGp = giveSlaveGaussPoint(gp, i - 1);
721 
724  StructuralMaterial *mat = static_cast< StructuralMaterial * >( domain->giveMaterial( this->giveLayerMaterial(i) ) );
725  mat->give2dBeamLayerStiffMtrx(layerMatrix, rMode, layerGp, tStep);
726  if ( this->layerRots.at(i) != 0. ) {
727  OOFEM_ERROR("Doesn't support layer rotations.");
728  }
729 
730  //
731  // resolve current layer z-coordinate
732  //
733  layerThick = this->layerThicks.at(i);
734  layerWidth = this->layerWidths.at(i);
735  layerZeta = layerGp->giveNaturalCoordinate(3);
736  layerZCoord = 0.5 * ( ( 1. - layerZeta ) * bottom + ( 1. + layerZeta ) * top );
737  layerZCoord2 = layerZCoord * layerZCoord;
738  //
739  // perform integration
740  //
741  // 1) membrane terms sx
742  answer.at(1, 1) += layerMatrix.at(1, 1) * layerWidth * layerThick;
743  answer.at(1, 3) += layerMatrix.at(1, 2) * layerWidth * layerThick;
744  // 2) bending terms my
745  answer.at(2, 2) += layerMatrix.at(1, 1) * layerWidth * layerThick * layerZCoord2;
746  answer.at(2, 3) += layerMatrix.at(1, 2) * layerWidth * layerThick * layerZCoord2;
747  // 3) shear terms qx
748  answer.at(3, 1) += layerMatrix.at(2, 1) * layerWidth * layerThick;
749  answer.at(3, 3) += layerMatrix.at(2, 2) * layerWidth * layerThick;
750  }
751 }
752 
753 
754 void
756 {
757  OOFEM_ERROR("Not implemented");
758 }
759 
760 
761 void
763 {
764  OOFEM_ERROR("Not implemented");
765 }
766 
767 void
769 {
770  OOFEM_ERROR("Not implemented");
771 }
772 
773 
774 
775 FloatArray *
777 //
778 // returns modified gradient of stress vector, which is used to
779 // bring stresses back to yield surface.
780 //
781 // imposes zeros on places, where zero stress occurs. if energetically connected
782 // strain is zero, we do not impose zero there, because stress exist and
783 // must be taken into account when computing yeld function. In such case
784 // a problem is assumed to be full 3d with some explicit strain equal to 0.
785 //
786 // On the other hand, if some stress is imposed to be zero, we understand
787 // such case as subspace of 3d case (like a classical plane stess problem, with no
788 // tracing of ez, sigma_z)
789 //
790 {
791  MaterialMode mode = gp->giveMaterialMode();
792  int size = gradientStressVector3d->giveSize();
793  if ( size != 6 ) {
794  OOFEM_ERROR("size mismatch");
795  }
796 
797  switch ( mode ) {
798  case _PlateLayer:
799  gradientStressVector3d->at(3) = 0.;
800  break;
801  case _2dBeamLayer:
802  for ( int i = 2; i <= 5; i++ ) {
803  gradientStressVector3d->at(i) = 0.;
804  }
805 
806  break;
807  default:
809  }
810 
811  return gradientStressVector3d;
812 }
813 
814 
815 FloatArray *
817 //
818 // returns modified gradient of strain vector, which is used to
819 // compute plastic strain increment.
820 //
821 // imposes zeros on places, where zero strain occurs or energetically connected stress
822 // is prescribed to be zero.
823 //
824 {
825  MaterialMode mode = gp->giveMaterialMode();
826  if ( gradientStrainVector3d->giveSize() != 6 ) {
827  OOFEM_ERROR("size mismatch");
828  }
829 
830  switch ( mode ) {
831  case _PlateLayer:
832  gradientStrainVector3d->at(3) = 0.;
833  break;
834  case _2dBeamLayer:
835  for ( int i = 2; i <= 5; i++ ) {
836  gradientStrainVector3d->at(i) = 0.;
837  }
838 
839  break;
840  default:
842  }
843 
844  return gradientStrainVector3d;
845 }
846 
847 
850 {
851  IRResultType result; // Required by IR_GIVE_FIELD macro
852 
853  result = CrossSection :: initializeFrom(ir);
854  if ( result != IRRT_OK ) {
855  return result;
856  }
857 
862  layerWidths.zero();
865  layerRots.zero();
867 
868  if ( numberOfLayers != layerRots.giveSize() ) { //|| ( numberOfLayers != layerWidths.giveSize() ) ) || numberOfLayers != layerThicks.giveSize() || numberOfLayers != layerMaterials.giveSize()
869  OOFEM_WARNING("numberOfLayers does not equal given number of layer rotations. ");
870  return IRRT_BAD_FORMAT;
871  }
872 
873  if ( numberOfLayers != layerThicks.giveSize() ) {
874  if ( layerThicks.giveSize() == 1 ) {
875  OOFEM_WARNING("Assuming same thickness in all layers");
876  double temp = layerThicks.at(1);
878  layerThicks.add(temp);
879  } else {
880  OOFEM_WARNING("numberOfLayers does not equal given number of thicknesses. ");
881  return IRRT_BAD_FORMAT;
882  }
883  }
884 
885  if ( numberOfLayers != layerMaterials.giveSize() ) {
886  if ( layerMaterials.giveSize() == 1 ) {
887  OOFEM_WARNING("Assuming same material in all layers");
888  double temp = layerMaterials.at(1);
890  layerMaterials.add(temp);
891  } else {
892  OOFEM_WARNING("numberOfLayers does not equal given number of materials. ");
893  return IRRT_BAD_FORMAT;
894  }
895  }
896 
897  if ( numberOfLayers <= 0 ) {
898  OOFEM_WARNING("numberOfLayers<= 0 is not allowed");
899  return IRRT_BAD_FORMAT;
900  }
901 
902  // Interface materials // add check if correct numbers
906 
909 
910  // read z-coordinate of mid-surface measured from bottom layer
911  midSurfaceZcoordFromBottom = 0.5 * this->computeIntegralThick(); // Default: geometric midplane
912  midSurfaceXiCoordFromBottom = 1.0; // add to IR
914 
915  this->setupLayerMidPlanes();
916 
917  return IRRT_OK;
918 }
919 
921 {
923 
932 }
933 
935 {
936  for ( int i = 1; i <= numberOfLayers; i++ ) {
937  GaussPoint *layerGp = giveSlaveGaussPoint(& iGP, i - 1);
938  StructuralMaterial *mat = static_cast< StructuralMaterial * >( domain->giveMaterial( this->giveLayerMaterial(i) ) );
939  MaterialStatus *matStat = mat->CreateStatus(layerGp);
940  layerGp->setMaterialStatus(matStat);
941  }
942 }
943 
944 
945 void
947 {
948  // z-coord of each layer midplane measured from the global cross section z-coord
949  this->layerMidZ.resize(this->numberOfLayers);
950  double layerBottomZ = -midSurfaceZcoordFromBottom; // initialize to the bottom coord
951  for ( int j = 1; j <= numberOfLayers; j++ ) {
952  double thickness = this->layerThicks.at(j);
953  this->layerMidZ.at(j) = layerBottomZ + thickness * 0.5;
954  layerBottomZ += thickness;
955  }
956 }
957 
958 
959 Material *
961 {
965  ) {
966  return domain->giveMaterial( layerMaterials.at(1) );
967  //return this->domain->giveMaterial( this->giveLayerMaterial(ip->giveNumber()) );
968  }
969 
970  if (ip->hasSlaveGaussPoint()) {
971  return domain->giveMaterial( layerMaterials.at(1) );//virtual master, has no material assigned in input file
972  } else {
973  return domain->giveMaterial( layerMaterials.at(1) );//virtual master, has no material assigned in input file
974  //OOFEM_ERROR("Not implemented.")
975  }
976  return NULL;
977 }
978 
979 
980 int
982 {
984  if ( element->giveIntegrationDomain() == _Cube ) {
985 #if 0
986  return irule.SetUpPointsOnCubeLayers(npoints.at(1), npoints.at(2), this->numberOfIntegrationPoints,
988  element->giveMaterialMode(), this->layerThicks);
989 
990 #else
991  int points1 = ( int ) floor(cbrt( double ( npoints ) ) + 0.5);
992  // If numberOfIntegrationPoints > 0 then use that, otherwise use the element's default.
993  return irule.SetUpPointsOnCubeLayers(points1, points1, this->numberOfIntegrationPoints ? numberOfIntegrationPoints : points1,
994  element->giveMaterialMode(), this->layerThicks);
995 
996 #endif
997  } else if ( element->giveIntegrationDomain() == _Wedge ) {
998 #if 0
999  return irule.SetUpPointsOnWedgeLayers(npoints.at(1), this->numberOfIntegrationPoints,
1001  element->giveMaterialMode(), this->layerThicks);
1002 
1003 #else
1004  if ( npoints == 2 ) {
1006  element->giveMaterialMode(), this->layerThicks);
1007  } else {
1009  element->giveMaterialMode(), this->layerThicks);
1010  }
1011 #endif
1012  } else {
1013  return irule.setUpIntegrationPoints( element->giveIntegrationDomain(), npoints, element->giveMaterialMode() );
1014  }
1015 }
1016 
1017 int
1018 LayeredCrossSection :: setupIntegrationPoints(IntegrationRule &irule, int nPointsXY, int nPointsZ, Element *element)
1019 {
1020  switch ( element->giveIntegrationDomain() ) {
1021  case _3dDegShell:
1022  return irule.SetUpPointsOn3dDegShellLayers(nPointsXY, nPointsZ, element->giveMaterialMode(), this->layerThicks);
1023  default:
1024  OOFEM_ERROR("Unknown mode (%d)", element->giveIntegrationDomain());
1025  }
1026  return 0;
1027 }
1028 
1029 
1030 GaussPoint *
1032 //
1033 // return the i-th slave gauss point of master gp
1034 // if slave gp don't exists - create them
1035 //
1036 {
1037  GaussPoint *slave = masterGp->giveSlaveGaussPoint(i);
1038  if ( slave == NULL ) {
1039  // check for proper dimensions - slave can be NULL if index too high or if not
1040  // slaves previously defined
1041  if ( i > this->numberOfLayers ) {
1042  OOFEM_ERROR("no such layer defined");
1043  }
1044 
1045  // create new slave record in masterGp
1046  // (requires that this is friend of gp)
1047  double currentZTopCoord, currentZCoord, bottom, top;
1048  const FloatArray &masterCoords = masterGp->giveNaturalCoordinates();
1049  // resolve slave material mode
1050  MaterialMode slaveMode, masterMode = masterGp->giveMaterialMode();
1051  slaveMode = this->giveCorrespondingSlaveMaterialMode(masterMode);
1052 
1053  bottom = this->give(CS_BottomZCoord, masterGp);
1054  top = this->give(CS_TopZCoord, masterGp);
1055 
1057  masterGp->gaussPoints.resize( numberOfLayers );
1058  currentZTopCoord = -midSurfaceZcoordFromBottom;
1059  for ( int j = 0; j < numberOfLayers; j++ ) {
1060  FloatArray zCoord(3);
1061  currentZTopCoord += this->layerThicks.at(j + 1);
1062  currentZCoord = currentZTopCoord - this->layerThicks.at(j + 1) / 2.0; // z-coord of layer mid surface
1063  if ( masterCoords.giveSize() > 0 ) {
1064  zCoord.at(1) = masterCoords.at(1); // gp x-coord of mid surface
1065  }
1066 
1067  if ( masterCoords.giveSize() > 1 ) {
1068  zCoord.at(2) = masterCoords.at(2); // gp y-coord of mid surface
1069  }
1070 
1071  zCoord.at(3) = ( 2.0 * currentZCoord - top - bottom ) / ( top - bottom );
1072  // in gp - is stored isoparametric coordinate (-1,1) of z-coordinate
1073  masterGp->gaussPoints [ j ] = new GaussPoint(masterGp->giveIntegrationRule(), j + 1, zCoord, 0., slaveMode);
1074 
1075  // test - remove!
1076 // masterGp->gaussPoints [ j ] = new GaussPoint(masterGp->giveIntegrationRule(), j + 1, zCoord, 1.0, slaveMode);
1077  }
1078 
1079  slave = masterGp->gaussPoints [ i ];
1080  }
1081 
1082  return slave;
1083 }
1084 
1085 double
1087 //
1088 // computes total thickness of receiver
1089 //
1090 {
1091  if ( totalThick == 0 ) {
1093  }
1094 
1095  return totalThick;
1096 }
1097 
1098 
1099 void
1101 // Prints the receiver on screen.
1102 {
1103  printf("Cross Section with properties: \n");
1105  printf("Layer Materials: \n");
1107  printf("Thickness of each layer: \n");
1109  if ( layerWidths.giveSize() ) {
1110  printf("Width of each layer: \n");
1112  }
1113  printf("Number of integration points per layer: %i \n", this->numberOfIntegrationPoints);
1114  printf("MidSurfaceZCoordinate from bottom: %f \n", midSurfaceZcoordFromBottom);
1115 }
1116 
1117 
1120 //
1121 // saves full material context (saves state variables, that completely describe
1122 // current state)
1123 // stores also slaves records of master gp
1124 //
1125 {
1126  contextIOResultType iores;
1127 
1128  if ( ( iores = CrossSection :: saveIPContext(stream, mode, masterGp) ) != CIO_OK ) {
1129  THROW_CIOERR(iores);
1130  }
1131 
1132  // saved master gp record;
1133 
1134  // and now save slave gp of master:
1135  for ( int i = 1; i <= numberOfLayers; i++ ) {
1136  GaussPoint *slaveGP = this->giveSlaveGaussPoint(masterGp, i - 1);
1137  StructuralMaterial *mat = dynamic_cast< StructuralMaterial * >( domain->giveMaterial( layerMaterials.at(i) ) );
1138  if ( ( iores = mat->saveIPContext(stream, mode, slaveGP) ) != CIO_OK ) {
1139  THROW_CIOERR(iores);
1140  }
1141  }
1142 
1143  return CIO_OK;
1144 }
1145 
1146 
1149 //
1150 // restores full material context (saves state variables, that completely describe
1151 // current state)
1152 //
1153 // restores also slaves of master gp
1154 //
1155 {
1156  contextIOResultType iores;
1157 
1158  if ( ( iores = CrossSection :: restoreIPContext(stream, mode, masterGp) ) != CIO_OK ) {
1159  THROW_CIOERR(iores); // saved masterGp
1160  }
1161 
1162  // and now save slave gp of master:
1163  for ( int i = 1; i <= numberOfLayers; i++ ) {
1164  // creates also slaves if they don't exists
1165  GaussPoint *slaveGP = this->giveSlaveGaussPoint(masterGp, i - 1);
1166  StructuralMaterial *mat = dynamic_cast< StructuralMaterial * >( domain->giveMaterial( layerMaterials.at(i) ) );
1167  if ( ( iores = mat->restoreIPContext(stream, mode, slaveGP) ) != CIO_OK ) {
1168  THROW_CIOERR(iores);
1169  }
1170  }
1171 
1172  return CIO_OK;
1173 }
1174 
1175 
1178 //
1179 // returns corresponding slave material mode to master mode
1180 //
1181 {
1182  if ( masterMode == _2dPlate ) {
1183  return _PlateLayer;
1184  } else if ( masterMode == _2dBeam ) {
1185  return _2dBeamLayer;
1186  } else if ( masterMode == _PlaneStress ) {
1187  return _PlaneStress;
1188  } else if ( masterMode == _3dShell ) {
1189  return _PlateLayer;
1190  } else if ( masterMode == _3dDegeneratedShell ) {
1191  return _3dDegeneratedShell;
1192  } else if ( masterMode == _3dMat ) {
1193  return _3dMat;
1194  } else {
1195  OOFEM_ERROR("unsupported material mode %s", __MaterialModeToString(masterMode) );
1196  }
1197 
1198  return _Unknown;
1199 }
1200 
1201 
1202 double
1204 {
1205  if ( aProperty == CS_Thickness ) {
1206  return this->computeIntegralThick();
1207  } else if ( aProperty == CS_TopZCoord ) {
1208  this->computeIntegralThick();
1210  } else if ( aProperty == CS_BottomZCoord ) {
1212  } else if ( aProperty == CS_Area ) {
1213  return this->giveArea();
1214  } else if ( aProperty == CS_NumLayers ) {
1215  return this->numberOfLayers;
1216  //} else if (aProperty == CS_Layer ) {
1217  // return this->giveLayer(gp);
1218  }
1219 
1220  return CrossSection :: give(aProperty, gp);
1221 }
1222 
1223 int
1224 LayeredCrossSection :: giveLayer(GaussPoint *gp) //@todo: works only for equal thickness of each layer
1225 {
1226  FloatArray lCoords;
1227  int noLayers = this->giveNumberOfLayers();
1228  double dh = 2.0/noLayers;
1229  lCoords = gp->giveNaturalCoordinates();
1230  double lowXi = -1.0;
1231 
1232  for (int i = 1; i <= noLayers; i++)
1233  {
1234  if (lCoords.at(3) > lowXi && lCoords.at(3) < lowXi+dh)
1235  {
1236  return i;
1237  }
1238  lowXi+=dh;
1239  }
1240  OOFEM_ERROR("LayeredCrossSection :: giveLayer - the actual integration point can not be associated with a layer in the cross section");
1241 }
1242 
1243 double
1244 LayeredCrossSection :: give(CrossSectionProperty aProperty, const FloatArray &coords, Element *elem, bool local)
1245 {
1246  if ( aProperty == CS_Thickness ) {
1247  return this->computeIntegralThick();
1248  } else if ( aProperty == CS_TopZCoord ) {
1249  this->computeIntegralThick();
1251  } else if ( aProperty == CS_BottomZCoord ) {
1253  } else if ( aProperty == CS_Area ) {
1254  return this->giveArea();
1255  } else if ( aProperty == CS_NumLayers ) {
1256  return this->numberOfLayers;
1257  }
1258 
1259  return CrossSection :: give(aProperty, coords, elem, local);
1260 }
1261 
1262 
1263 int
1265 {
1266  return this->numberOfLayers;
1267 }
1268 
1269 double
1271 {
1272  if ( this->area <= 0.0 ) {
1273  this->area = this->layerThicks.dotProduct(this->layerWidths);
1274  }
1275 
1276  return area;
1277 }
1278 
1279 
1281 {
1282  for ( int i = 1; i <= this->numberOfLayers; i++ ) {
1283  if ( !this->domain->giveMaterial( this->giveLayerMaterial(i) )->isCharacteristicMtrxSymmetric(rMode) ) {
1284  return false;
1285  }
1286  }
1287  return true;
1288 }
1289 
1290 
1291 void
1293 {
1294  // returns an array with the xi-coords corresponding to the boundaries where
1295  // the layers meet (size = number of layers -1)
1296 
1297  int numInterfaces = this->giveNumberOfLayers() - 1;
1298  answer.resize(numInterfaces);
1299  double totalThickness = this->computeIntegralThick();
1300  for ( int i = 1; i <= numInterfaces; i++ ) {
1301  double midZ = this->giveLayerMidZ(i);
1302  double interfaceZ = midZ + this->giveLayerThickness(i) * 0.5;
1303  answer.at(i) = interfaceZ * ( 2.0 / totalThickness );
1304  }
1305 }
1306 
1307 void
1308 LayeredCrossSection :: setupLayeredIntegrationRule(std :: vector< std :: unique_ptr< IntegrationRule > > &integrationRulesArray, Element *el, int numInPlanePoints)
1309 {
1310  // Loop over each layer and set up an integration rule as if each layer was an independent element
1311  // @todo - only works for wedge integration at the moment
1312  int numberOfLayers = this->giveNumberOfLayers();
1313  int numPointsThickness = this->giveNumIntegrationPointsInLayer();
1314 
1315  integrationRulesArray.clear();
1316  integrationRulesArray.reserve( numberOfLayers );
1317  for ( int i = 0; i < numberOfLayers; i++ ) {
1318  integrationRulesArray.emplace_back( new LayeredIntegrationRule(i + 1, el) );
1319  integrationRulesArray.back()->SetUpPointsOnWedge(numInPlanePoints, numPointsThickness, _3dMat);
1320  }
1321  this->mapLayerGpCoordsToShellCoords(integrationRulesArray);
1322 }
1323 
1324 
1325 void
1326 LayeredCrossSection :: mapLayerGpCoordsToShellCoords(std :: vector< std :: unique_ptr< IntegrationRule > > &layerIntegrationRulesArray)
1327 /*
1328  * Maps the local xi-coord (z-coord) in each layer [-1,1] to the corresponding
1329  * xi-coord in the cross section coordinate system.
1330  * Also renames the gp numbering from layerwise to global (1,2,1,2 -> 1,2,3,4)
1331  * xi
1332  * -------- 1 -------- 1
1333  | | |
1334  | | |
1335  | -------- -1 => -------- x
1336  | -------- 1 -------- x
1337  | | |
1338  | -------- -1 -------- -1
1339  */
1340 {
1341  double scaleFactor = 0.999; // Will be numerically unstable with xfem if the endpoints lie at +-1
1342  double totalThickness = this->computeIntegralThick();
1343  int number = 1;
1344  for ( int layer = 1; layer <= numberOfLayers; layer++ ) {
1345  for ( GaussPoint *gp: *layerIntegrationRulesArray [ layer - 1 ] ) {
1346 
1347  // Map local layer cs to local shell cs
1348  double zMid_i = this->giveLayerMidZ(layer); // global z-coord
1349  double xiMid_i = 1.0 - 2.0 * ( totalThickness - this->midSurfaceZcoordFromBottom - zMid_i ) / totalThickness; // local z-coord
1350  double deltaxi = gp->giveNaturalCoordinates().at(3) * this->giveLayerThickness(layer) / totalThickness; // distance from layer mid
1351  double xinew = xiMid_i + deltaxi * scaleFactor;
1352  FloatArray lcoords = gp->giveNaturalCoordinates();
1353  lcoords.at(3) = xinew;
1354  gp->setNaturalCoordinates(lcoords);
1355  gp->number = number; // fix gp ordering
1356  number++;
1357  }
1358  }
1359 }
1360 
1361 
1363  int startIndx, int endIndx, bool dynamic) :
1364  IntegrationRule(n, e, startIndx, endIndx, dynamic) { }
1365 
1367  IntegrationRule(n, e) { }
1368 
1370 { }
1371 
1372 int
1373 LayeredIntegrationRule :: SetUpPointsOnWedge(int nPointsTri, int nPointsThickness, MaterialMode mode)
1374 {
1375  // Set up integration rule for a specific layer
1376 
1377  int nPoints = nPointsTri * nPointsThickness;
1378  //@todo - is not really a Gauss point but rather a hybrid.
1379  this->gaussPoints.resize( nPoints );
1380 
1381  // uses Gauss integration in the plane and Lobatto in the thickness
1382  FloatArray coords_xi1, coords_xi2, coords_xi, weights_tri, weights_thickness;
1383  GaussIntegrationRule :: giveTriCoordsAndWeights(nPointsTri, coords_xi1, coords_xi2, weights_tri);
1384  //LobattoIntegrationRule :: giveLineCoordsAndWeights(nPointsThickness, coords_xi, weights_thickness );
1385  GaussIntegrationRule :: giveLineCoordsAndWeights(nPointsThickness, coords_xi, weights_thickness);
1386 
1387  // Assumes that the integration rules of the layers are the same such that the ordering of the ip's are also
1388  // the same => upperInterfacePoints.at(i) of one layer is paired with lowerInterfacePoints.at(i) of the next.
1389  // This will be used to estimate interlaminar stresses, sice values in the two ip will generally be different
1390  // due to beam/plate/shell theory assumptions.
1391  if ( nPointsThickness != 1 ) { // otherwise there are no points on the interface
1392  this->lowerInterfacePoints.resize(nPointsTri);
1393  this->upperInterfacePoints.resize(nPointsTri);
1394  }
1395  for ( int i = 1, ind = 0; i <= nPointsThickness; i++ ) {
1396  for ( int j = 1; j <= nPointsTri; j++ ) {
1397  this->gaussPoints [ ind ] =
1398  new GaussPoint(this, 1, {coords_xi1.at(j), coords_xi2.at(j), coords_xi.at(i)},
1399  weights_tri.at ( j ) *weights_thickness.at ( i ), mode);
1400 
1401  // store interface points
1402  if ( i == 1 && nPointsThickness > 1 ) { //then lower surface
1403  this->lowerInterfacePoints.at(j) = ind;
1404  } else if ( i == nPointsThickness && nPointsThickness > 1 ) { //then upper surface
1405  this->upperInterfacePoints.at(j) = ind;
1406  }
1407  ind++;
1408  }
1409  }
1410  return this->giveNumberOfIntegrationPoints();
1411 }
1412 
1413 
1414 int
1416 //
1417 // check internal consistency
1418 // mainly tests, whether material and crossSection data
1419 // are safe for conversion to "Structural" versions
1420 //
1421 {
1422  int result = 1;
1423  for ( int i = 1; this->giveNumberOfLayers(); i++ ) {
1424  Material *mat = this->giveDomain()->giveMaterial( this->giveLayerMaterial(i) );
1425  if ( !dynamic_cast< StructuralMaterial * >(mat) ) {
1426  OOFEM_WARNING("material %s without structural support", mat->giveClassName() );
1427  result = 0;
1428  continue;
1429  }
1430  }
1431  return result;
1432 }
1433 
1434 
1435 int
1437 {
1439  // Determine which layer the gp belongs to. This code assumes that the gauss point are created consistently (through CrossSection::setupIntegrationPoints)
1441  int gpnum = gp->giveNumber();
1442  int gpsperlayer = ngps / this->numberOfLayers;
1443  int layer = ( gpnum - 1 ) / gpsperlayer + 1;
1444  Material *layerMat = this->domain->giveMaterial( this->giveLayerMaterial(layer) );
1445  if ( this->layerRots.at(layer) != 0. ) {
1446  FloatArray rotVal; // the requested value in the material c.s.
1448  double rot = this->layerRots.at(layer);
1449  double c = cos(rot * M_PI / 180.);
1450  double s = sin(rot * M_PI / 180.);
1451 
1452  int ret = layerMat->giveIPValue(rotVal, gp, type, tStep);
1453  if ( ret == 0 ) {
1454  return 0;
1455  }
1456 
1457  // Determine how to rotate it according to the value type
1458  if ( valType == ISVT_TENSOR_S3 ) {
1459  answer = {
1460  c *c * rotVal.at(1) + 2 * c * s * rotVal.at(6) + s * s * rotVal.at(2),
1461  c * c * rotVal.at(2) - 2 * c * s * rotVal.at(6) + s * s * rotVal.at(1),
1462  rotVal.at(3),
1463  c * rotVal.at(4) - s * rotVal.at(5),
1464  c * rotVal.at(5) + s * rotVal.at(4),
1465  ( c * c - s * s ) * rotVal.at(6) - c * s * ( rotVal.at(1) - rotVal.at(2) ),
1466  };
1467  } else if ( valType == ISVT_TENSOR_S3E ) {
1468  answer = {
1469  c *c * rotVal.at(1) + c * s * rotVal.at(6) + s * s * rotVal.at(2),
1470  c * c * rotVal.at(2) - c * s * rotVal.at(6) + s * s * rotVal.at(1),
1471  rotVal.at(3),
1472  c * rotVal.at(4) - s * rotVal.at(5),
1473  c * rotVal.at(5) + s * rotVal.at(4),
1474  ( c * c - s * s ) * rotVal.at(6) - 2 * c * s * ( rotVal.at(1) - rotVal.at(2) ),
1475  };
1476  } else if ( valType == ISVT_VECTOR ) {
1477  answer = {
1478  c *rotVal.at(1) - s * rotVal.at(2), s * rotVal.at(1) +c * rotVal.at(2), rotVal.at(3)
1479  };
1480  } else if ( valType == ISVT_SCALAR ) {
1481  answer = rotVal;
1482  } else {
1483  return 0;
1484  }
1485  return 1;
1486  } else {
1487  return layerMat->giveIPValue(answer, gp, type, tStep);
1488  }
1489  } else {
1490  //return CrossSection :: giveIPValue(answer, gp, type, tStep);
1491 
1493  int layer = gp->giveIntegrationRule()->giveNumber();
1494  return this->giveDomain()->giveMaterial( this->giveLayerMaterial(layer) )->giveIPValue(answer, gp, type, tStep);
1495  }
1496 }
1497 
1498 
1499 double
1501 {
1502  double average = 0.;
1503  for ( int layer = 1; layer <= numberOfLayers; ++layer ) {
1504  Material *mat = this->giveDomain()->giveMaterial( giveLayerMaterial(layer) );
1505  average += mat->give(aProperty, gp) * giveLayerThickness(layer);
1506  }
1507  return average / this->totalThick;
1508 }
1509 
1510 } // end namespace oofem
virtual FloatArray * imposeStressConstrainsOnGradient(GaussPoint *gp, FloatArray *gradientStressVector3d)
Returns modified gradient of stress vector, which is used to bring stresses back to yield surface...
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
void setField(int item, InputFieldType id)
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Definition: gausspoint.h:191
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: crosssection.C:67
void printYourself()
Prints the receiver on screen.
Definition: dictionary.C:145
int number
Component number.
Definition: femcmpnn.h:80
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
Definition: structuralms.h:137
#define _IFT_LayeredCrossSection_nlayers
virtual void giveStiffnessMatrix_PlaneStress(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
void printYourself() const
Prints receiver on stdout.
Definition: intarray.C:225
virtual Material * giveMaterial(IntegrationPoint *ip)
Returns the material associated with the GP.
Bottom z coordinate.
Definition: crosssection.h:72
int numberOfIntegrationPoints
num integration points per layer
#define _IFT_LayeredCrossSection_midsurf
IntegrationPointStatus * setMaterialStatus(IntegrationPointStatus *ptr, int n)
Sets Material status managed by receiver.
Definition: gausspoint.h:213
static void giveTriCoordsAndWeights(int nPoints, FloatArray &coords_xi1, FloatArray &coords_xi2, FloatArray &weights)
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
static void giveLineCoordsAndWeights(int nPoints, FloatArray &coords_xi, FloatArray &weights)
virtual int checkConsistency()
Allows programmer to test some internal data, before computation begins.
virtual contextIOResultType saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Stores integration point state to output stream.
Definition: material.C:173
virtual void give2dPlateStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing 2d plate stiffness matrix.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
#define _IFT_LayeredCrossSection_layerRotations
virtual FloatArray * imposeStrainConstrainsOnGradient(GaussPoint *gp, FloatArray *gradientStressVector3d)
Returns modified gradient of strain vector, which is used to compute plastic strain increment...
bool hasSlaveGaussPoint()
True if gauss point has slave points.
Definition: gausspoint.C:124
void zero()
Sets all component to zero.
Definition: intarray.C:52
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
virtual void giveRealStress_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)
virtual void give3dShellStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing 3d shell stiffness matrix.
This class implements a structural material status information.
Definition: structuralms.h:65
virtual void giveGeneralizedStress_Plate(FloatArray &answer, GaussPoint *gp, const FloatArray &generalizedStrain, TimeStep *tStep)
int giveNumber()
Returns receiver number.
virtual int SetUpPointsOnWedgeLayers(int nPointsTri, int nPointsDepth, MaterialMode mode, const FloatArray &layerThickness)
Sets up receiver&#39;s integration points on a wedge integration domain divided into layers in the zeta-d...
virtual int SetUpPointsOn3dDegShellLayers(int nPointsXY, int nPointsZ, MaterialMode mode, const FloatArray &layerThickness)
Sets up receiver&#39;s integration points on shell integration domain wih layers.
FloatArray layerThicks
Thickness for each layer.
virtual void givePlateLayerStiffMtrx(FloatMatrix &answer, MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep)
Method for computing 2d plate layer stiffness matrix of receiver.
REGISTER_CrossSection(EmptyCS)
virtual contextIOResultType restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Reads integration point state to output stream.
Definition: crosssection.C:128
Abstract base class for all finite elements.
Definition: element.h:145
InternalStateValueType
Determines the type of internal variable.
void mapLayerGpCoordsToShellCoords(std::vector< std::unique_ptr< IntegrationRule > > &layerIntegrationRulesArray)
symmetric 3x3 tensor, packed with off diagonal components multiplied by 2 (engineering strain vector...
Top z coordinate.
Definition: crosssection.h:71
Element * giveElement()
Returns corresponding element to receiver.
Definition: gausspoint.h:188
MaterialMode giveCorrespondingSlaveMaterialMode(MaterialMode mode)
virtual MaterialMode giveMaterialMode()
Returns material mode for receiver integration points.
Definition: element.h:691
virtual contextIOResultType restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Reads integration point state to output stream.
Definition: material.C:204
CrossSectionProperty
List of properties possibly stored in a cross section.
Definition: crosssection.h:58
GaussPoint * giveSlaveGaussPoint(int index)
Returns index-th slave gauss point of receiver.
Definition: gausspoint.C:106
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: crosssection.C:82
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
virtual FloatArray * imposeStressConstrainsOnGradient(GaussPoint *gp, FloatArray *)
Returns modified gradient of stress vector, which is used to bring stresses back to yield surface...
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
MatResponseMode
Describes the character of characteristic material matrix.
void giveInterfaceXiCoords(FloatArray &answer)
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
virtual int giveIPValue(FloatArray &answer, GaussPoint *ip, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
virtual void giveStiffnessMatrix_3d(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing the stiffness matrix.
Abstract base class representing integration rule.
virtual void give2dBeamStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the stiffness matrix for 2d beams.
IntArray layerMaterials
Material of each layer.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
double sum() const
Computes the sum of receiver values.
Definition: floatarray.C:852
#define _IFT_LayeredCrossSection_interfacematerials
double computeIntegralThick()
Returns the total thickness of all layers.
const char * __MaterialModeToString(MaterialMode _value)
Definition: cltypes.C:314
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property &#39;aProperty&#39;.
Definition: material.C:52
Abstract base class for all "structural" finite elements.
virtual void giveRealStressVector_2dBeamLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
double giveNaturalCoordinate(int i) const
Returns i-th natural element coordinate of receiver.
Definition: gausspoint.h:136
virtual void giveStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the stiffness matrix for giveRealStressVector of receiver in given integration point...
virtual void printYourself()
Prints receiver state on stdout. Useful for debugging.
virtual void giveGeneralizedStress_PlateSubSoil(FloatArray &answer, GaussPoint *gp, const FloatArray &generalizedStrain, TimeStep *tStep)
#define _IFT_LayeredCrossSection_thicks
FloatArray layerMidZ
z-coord of the mid plane for each layer
Dictionary propertyDictionary
Dictionary for storing cross section parameters (like dimensions).
Definition: crosssection.h:115
Material * giveMaterial(int n)
Service for accessing particular domain material model.
Definition: domain.C:281
#define M_PI
Definition: mathfem.h:52
double dotProduct(const FloatArray &x) const
Computes the dot product (or inner product) of receiver and argument.
Definition: floatarray.C:463
virtual FloatArray * imposeStrainConstrainsOnGradient(GaussPoint *gp, FloatArray *)
Returns modified gradient of strain vector, which is used to compute plastic strain increment...
#define OOFEM_ERROR(...)
Definition: error.h:61
double giveLayerThickness(int layer)
virtual int SetUpPointsOnWedge(int nPointsTri, int nPointsDepth, MaterialMode mode)
Sets up receiver&#39;s integration points on a wedge integration domain.
virtual void giveGeneralizedStress_Beam2d(FloatArray &answer, GaussPoint *gp, const FloatArray &generalizedStrain, TimeStep *tStep)
Computes the generalized stress vector for given strain and integration point.
void setupLayeredIntegrationRule(std::vector< std::unique_ptr< IntegrationRule > > &layerIntegrationRulesArray, Element *el, int numInPlanePoints)
int giveNumber()
Returns number of receiver.
Definition: gausspoint.h:184
FloatArray layerWidths
Width for each layer.
void times(double f)
Multiplies receiver by factor f.
Definition: floatmatrix.C:1594
Number of layers that makes up the cross section.
Definition: crosssection.h:73
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver &#39;a&#39; transformed using give transformation matrix r.
Definition: floatmatrix.C:1557
virtual int SetUpPointsOnCubeLayers(int nPoints1, int nPoints2, int nPointsDepth, MaterialMode mode, const FloatArray &layerThickness)
Sets up receiver&#39;s integration points on unit cube integration domain divided into layers in the zeta...
virtual void createMaterialStatus(GaussPoint &iGP)
virtual void giveRealStress_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)
virtual void giveStiffnessMatrix_PlaneStrain(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
virtual contextIOResultType saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Stores integration point state to output stream.
Abstract base class for all material models.
Definition: material.h:95
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
void resize(int n)
Checks size of receiver towards requested bounds.
Definition: intarray.C:124
virtual contextIOResultType saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Stores integration point state to output stream.
Definition: crosssection.C:110
IntArray interfacerMaterials
Interface (cohesive zone) material for each interface.
IntegrationRule * giveIntegrationRule()
Returns corresponding integration rule to receiver.
Definition: gausspoint.h:186
virtual void giveRealStress_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)
virtual void giveRealStress_3dDegeneratedShell(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)
virtual integrationDomain giveIntegrationDomain() const
Returns integration domain for receiver, used to initialize integration point over receiver volume...
Definition: element.C:1521
Abstract base class representing a material status information.
Definition: matstatus.h:84
void add(int val)
Adds given scalar to all values of receiver.
Definition: intarray.C:58
Symmetric 3x3 tensor.
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual void give3dBeamStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the stiffness matrix for 2d beams.
virtual void giveCharMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the stiffness matrix of receiver in given integration point, respecting its history...
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
#define _IFT_LayeredCrossSection_widths
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
double cbrt(double x)
Returns the cubic root of x.
Definition: mathfem.h:109
virtual contextIOResultType restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Reads integration point state to output stream.
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
Definition: structuralms.h:135
#define _IFT_LayeredCrossSection_layermaterials
virtual const char * giveClassName() const =0
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode mode)
Check for symmetry of stiffness matrix.
virtual int hasMaterialModeCapability(MaterialMode mode)
Tests if material supports material mode.
FloatArray layerRots
Rotation of the material in each layer.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
std::vector< GaussPoint * > gaussPoints
List of slave integration points.
Definition: gausspoint.h:114
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void give2dPlateSubSoilStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing subsoil stiffness matrix for plates.
virtual void printYourself() const
Print receiver on stdout.
Definition: floatarray.C:747
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
virtual void giveGeneralizedStress_Shell(FloatArray &answer, GaussPoint *gp, const FloatArray &generalizedStrain, TimeStep *tStep)
void add(const FloatMatrix &a)
Adds matrix to the receiver.
Definition: floatmatrix.C:1023
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
int giveNumberOfIntegrationPoints() const
Returns number of integration points of receiver.
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
virtual void giveGeneralizedStress_Beam3d(FloatArray &answer, GaussPoint *gp, const FloatArray &generalizedStrain, TimeStep *tStep)
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
Definition: femcmpnn.h:179
Class representing the a dynamic Input Record.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
Abstract base class for all "structural" constitutive models.
integrationDomain giveIntegrationDomain() const
Returns the domain for the receiver.
int setUpIntegrationPoints(integrationDomain intdomain, int nPoints, MaterialMode matMode)
Initializes the receiver.
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
virtual void give2dBeamLayerStiffMtrx(FloatMatrix &answer, MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep)
Method for computing 2d beam layer stiffness matrix of receiver.
LayeredIntegrationRule(int n, Element *e, int startIndx, int endIndx, bool dynamic=false)
virtual void giveRealStress_Warping(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)
The element interface required by LayeredCrossSection.
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
InternalStateValueType giveInternalStateValueType(InternalStateType type)
Definition: cltypes.C:77
int giveSize() const
Definition: intarray.h:203
virtual void give3dDegeneratedShellStiffMtrx(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Method for computing 3d shell stiffness matrix on degenerated shell elements.
virtual void giveMembraneRotStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Method for computing membrane stiffness matrix with added drilling stiffness.
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void giveRealStressVector_PlateLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
virtual void giveGeneralizedStress_MembraneRot(FloatArray &answer, GaussPoint *gp, const FloatArray &generalizedStrain, TimeStep *tStep)
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
GaussPoint * giveSlaveGaussPoint(GaussPoint *gp, int slaveIndex)
#define _IFT_LayeredCrossSection_nintegrationpoints
Class representing integration point in finite element program.
Definition: gausspoint.h:93
#define OOFEM_WARNING(...)
Definition: error.h:62
Class representing solution step.
Definition: timestep.h:80
std::vector< GaussPoint * > gaussPoints
Array containing integration points.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Definition: material.C:142
void add(const FloatArray &src)
Adds array src to receiver.
Definition: floatarray.C:156
virtual void giveStiffnessMatrix_1d(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Definition: gausspoint.h:138
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
Definition: material.h:316
virtual void giveRealStress_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)

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:29 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011