53IntArray TR_SHELL01 :: loc_plate = {3, 4, 5, 9, 10, 11, 15, 16, 17};
54IntArray TR_SHELL01 :: loc_membrane = {1, 2, 6, 7, 8, 12, 13, 14, 18};
68 StructuralElement :: initializeFrom(ir, priority);
69 plate->initializeFrom(ir, priority);
70 membrane->initializeFrom(ir, priority);
75 OOFEM_WARNING(
"key word NIP is not allowed for element TR_SHELL01");
80 OOFEM_WARNING(
"key word NIProt is not allowed for element TR_SHELL01");
87TR_SHELL01 :: postInitialize()
89 StructuralElement :: postInitialize();
91 if (
plate->giveDefaultIntegrationRulePtr()->giveNumberOfIntegrationPoints() !=
membrane->giveDefaultIntegrationRulePtr()->giveNumberOfIntegrationPoints() ) {
92 OOFEM_ERROR(
"incompatible integration rules detected %d vs %d IPs",
93 plate->giveDefaultIntegrationRulePtr()->giveNumberOfIntegrationPoints(),
94 membrane->giveDefaultIntegrationRulePtr()->giveNumberOfIntegrationPoints());
101 StructuralElement :: updateLocalNumbering(f);
102 plate->updateLocalNumbering(f);
106void TR_SHELL01 :: setCrossSection(
int csIndx)
108 StructuralElement :: setCrossSection(csIndx);
109 plate->setCrossSection(csIndx);
125 plate->giveCharacteristicVector(aux, mtrx, mode, tStep);
128 membrane->giveCharacteristicVector(aux, mtrx, mode, tStep);
143 plate->giveCharacteristicMatrix(aux, mtrx, tStep);
146 membrane->giveCharacteristicMatrix(aux, mtrx, tStep);
157 plate->computeBodyLoadVectorAt(aux, forLoad, tStep, mode);
160 membrane->computeBodyLoadVectorAt(aux, forLoad, tStep, mode);
173 bool t1 =
plate->giveRotationMatrix(aux1);
174 bool t2 =
membrane->giveRotationMatrix(aux2);
184 for (
int i = 1; i <= 9; i++ ) {
185 for (
int j = 1; j <= ncol; j++ ) {
190 for (
int i = 1; i <= 9; i++ ) {
191 for (
int j = 1; j <= ncol; j++ ) {
204 plate->updateInternalState(tStep);
205 membrane->updateInternalState(tStep);
211 StructuralElement :: updateYourself(tStep);
213 plate->updateYourself(tStep);
237 return plate->computeVolumeAround(gp);
243 if ( type == IST_ShellForceTensor || type == IST_ShellStrainTensor ||
244 type == IST_ShellMomentTensor || type == IST_CurvatureTensor ) {
249 plate->giveIPValue(answer, plateGP, type, tStep);
250 membrane->giveIPValue(aux, membraneGP, type, tStep);
254 return StructuralElement :: giveIPValue(answer, gp, type, tStep);
260TR_SHELL01 :: NodalAveragingRecoveryMI_computeNodalValue(
FloatArray &answer,
int node,
268TR_SHELL01 :: printOutputAt(FILE *file,
TimeStep *tStep)
274 for (
auto &gp: *iRule ) {
275 fprintf( file,
" GP %2d.%-2d :", iRule->
giveNumber(), gp->giveNumber() );
277 this->
giveIPValue(v, gp, IST_ShellStrainTensor, tStep);
279 fprintf(file,
" strains ");
281 fprintf(file,
" %.4e %.4e %.4e %.4e %.4e %.4e ",
284 this->
giveIPValue(v, gp, IST_CurvatureTensor, tStep);
286 fprintf(file,
"\n curvatures ");
288 fprintf(file,
" %.4e %.4e %.4e %.4e %.4e %.4e ",
292 this->
giveIPValue(v, gp, IST_ShellForceTensor, tStep);
294 fprintf(file,
"\n stresses ");
296 fprintf(file,
" %.4e %.4e %.4e %.4e %.4e %.4e ",
299 this->
giveIPValue(v, gp, IST_ShellMomentTensor, tStep);
301 fprintf(file,
"\n moments ");
303 fprintf(file,
" %.4e %.4e %.4e %.4e %.4e %.4e ",
306 if ( gp->hasSlaveGaussPoint()) {
307 fprintf(file,
"\n Layers report {\n");
309 for (
auto &sgp: gp->giveSlaveGaussPoints()) {
310 sgp->printOutputAt(file, tStep,
" ");
312 fprintf(file,
" }\n");
325 StructuralElement :: saveContext(stream, mode);
326 this->
plate->saveContext(stream, mode);
327 this->
membrane->saveContext(stream, mode);
333 StructuralElement :: restoreContext(stream, mode);
334 this->
plate->restoreContext(stream, mode);
335 this->
membrane->restoreContext(stream, mode);
339TR_SHELL01 :: ZZErrorEstimatorI_giveIntegrationRule()
342 this->
compositeIR = std::make_unique<GaussIntegrationRule>(1,
this, 1, 12);
343 this->
compositeIR->SetUpPointsOnTriangle(
plate->giveDefaultIntegrationRulePtr()->giveNumberOfIntegrationPoints(), _3dShell);
360 globTensor.
at(1, 1) = sig.
at(1);
361 globTensor.
at(1, 2) = sig.
at(6);
362 globTensor.
at(1, 3) = sig.
at(5);
364 globTensor.
at(2, 1) = sig.
at(6);
365 globTensor.
at(2, 2) = sig.
at(2);
366 globTensor.
at(2, 3) = sig.
at(4);
368 globTensor.
at(3, 1) = sig.
at(5);
369 globTensor.
at(3, 2) = sig.
at(4);
370 globTensor.
at(3, 3) = sig.
at(3);
376 answer.
at(1) = globTensor.
at(1, 1);
377 answer.
at(2) = globTensor.
at(2, 2);
378 answer.
at(3) = globTensor.
at(1, 2);
379 answer.
at(7) = globTensor.
at(2, 3);
380 answer.
at(8) = globTensor.
at(1, 3);
384 globTensor.
at(1, 1) = sig.
at(7);
385 globTensor.
at(1, 2) = sig.
at(12);
386 globTensor.
at(1, 3) = sig.
at(11);
388 globTensor.
at(2, 1) = sig.
at(12);
389 globTensor.
at(2, 2) = sig.
at(8);
390 globTensor.
at(2, 3) = sig.
at(10);
392 globTensor.
at(3, 1) = sig.
at(11);
393 globTensor.
at(3, 2) = sig.
at(10);
394 globTensor.
at(3, 3) = sig.
at(9);
399 answer.
at(4) = globTensor.
at(1, 1);
400 answer.
at(5) = globTensor.
at(2, 2);
401 answer.
at(6) = globTensor.
at(1, 2);
421 const auto &coordinates = this->
giveNode(i)->giveCoordinates();
450 if ( !
gc.testElementGraphicActivity(
this) ) {
456 EASValsSetColor(
gc.getElementColor() );
457 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
458 EASValsSetEdgeFlag(
true);
459 EASValsSetFillStyle(FILL_SOLID);
461 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1);
462 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2);
463 p [ 0 ].z = ( FPNum ) this->
giveNode(1)->giveCoordinate(3);
464 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1);
465 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2);
466 p [ 1 ].z = ( FPNum ) this->
giveNode(2)->giveCoordinate(3);
467 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveCoordinate(1);
468 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveCoordinate(2);
469 p [ 2 ].z = ( FPNum ) this->
giveNode(3)->giveCoordinate(3);
471 go = CreateTriangle3D(p);
472 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
473 EGAttachObject(go, ( EObjectP )
this);
474 EMAddGraphicsToModel(ESIModel(), go);
483 double defScale =
gc.getDefScale();
485 if ( !
gc.testElementGraphicActivity(
this) ) {
491 EASValsSetColor(
gc.getDeformedElementColor() );
492 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
493 EASValsSetEdgeFlag(
true);
494 EASValsSetFillStyle(FILL_SOLID);
496 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(1, tStep, defScale);
497 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(2, tStep, defScale);
498 p [ 0 ].z = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(3, tStep, defScale);
499 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(1, tStep, defScale);
500 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(2, tStep, defScale);
501 p [ 1 ].z = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(3, tStep, defScale);
502 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(1, tStep, defScale);
503 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(2, tStep, defScale);
504 p [ 2 ].z = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(3, tStep, defScale);
506 go = CreateTriangle3D(p);
507 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
508 EMAddGraphicsToModel(ESIModel(), go);
515 int indx, result = 0;
519 double s [ 3 ], defScale;
520 if ( !
gc.testElementGraphicActivity(
this) ) {
536 this->
giveIPValue(a, gp, IST_ShellMomentTensor, tStep);
537 v.
add(gp->giveWeight(), a);
538 tot_w += gp->giveWeight();
546 indx =
gc.giveIntVarIndx();
548 s [ 0 ] = v1.
at(indx);
549 s [ 1 ] = v2.
at(indx);
550 s [ 2 ] = v3.
at(indx);
553 for (
int i = 0; i < 3; i++ ) {
554 if (
gc.getInternalVarsDefGeoFlag() ) {
556 defScale =
gc.getDefScale();
557 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale);
558 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(2, tStep, defScale);
559 p [ i ].z = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(3, tStep, defScale);
561 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
562 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
563 p [ i ].z = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(3);
567 gc.updateFringeTableMinMax(s, 3);
568 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
569 EGWithMaskChangeAttributes(LAYER_MASK, tr);
570 EMAddGraphicsToModel(ESIModel(), tr);
#define REGISTER_Element(class)
Node * giveNode(int i) const
virtual bool isActivated(TimeStep *tStep)
virtual int giveNumberOfNodes() const
int numberOfDofMans
Number of dofmanagers.
void assemble(const FloatArray &fe, const IntArray &loc)
void beMinOf(const FloatArray &a, const FloatArray &b)
void zero()
Zeroes all coefficients of receiver.
bool isEmpty() const
Returns true if receiver is empty.
void beMaxOf(const FloatArray &a, const FloatArray &b)
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
void subtract(const FloatArray &src)
void rotatedWith(const FloatMatrix &r, char mode='n')
void resize(Index rows, Index cols)
int giveNumberOfColumns() const
Returns number of columns of receiver.
void beTranspositionOf(const FloatMatrix &src)
void zero()
Zeroes all coefficient of receiver.
bool isNotEmpty() const
Tests for empty matrix.
void assemble(const FloatMatrix &src, const IntArray &loc)
double at(std::size_t i, std::size_t j) const
int giveNumber()
Returns number of receiver.
NodalAveragingRecoveryModelInterface()
Constructor.
SpatialLocalizerInterface(Element *element)
StructuralElement(int n, Domain *d)
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep) override
static IntArray loc_membrane
std ::unique_ptr< CCTPlate3d > plate
Pointer to plate element.
IntegrationRule * giveDefaultIntegrationRulePtr() override
std ::unique_ptr< IntegrationRule > compositeIR
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
static IntArray loc_plate
std ::unique_ptr< TrPlaneStrRot3d > membrane
Pointer to membrane (plane stress) element.
ZZErrorEstimatorInterface(Element *element)
Constructor.
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
#define OOFEM_WARNING(...)
@ ZZNodalRecoveryModelInterfaceType
@ ZZErrorEstimatorInterfaceType
@ SpatialLocalizerInterfaceType
@ NodalAveragingRecoveryModelInterfaceType
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_VARPLOT_PATTERN_LAYER
#define OOFEG_DEFORMED_GEOMETRY_LAYER
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_LAYER
#define _IFT_TrPlaneStrRot_niprot