54IntArray TR_SHELL02 :: loc_plate = {3, 4, 5, 9, 10, 11, 15, 16, 17};
55IntArray TR_SHELL02 :: loc_membrane = {1, 2, 6, 7, 8, 12, 13, 14, 18};
69 StructuralElement :: initializeFrom(ir, priority);
70 plate->initializeFrom(ir, priority);
71 membrane->initializeFrom(ir, priority);
75TR_SHELL02 :: postInitialize()
77 StructuralElement :: postInitialize();
79 if (
plate->giveDefaultIntegrationRulePtr()->giveNumberOfIntegrationPoints() !=
membrane->giveDefaultIntegrationRulePtr()->giveNumberOfIntegrationPoints() ) {
80 OOFEM_ERROR(
"incompatible integration rules detected");
87 StructuralElement :: updateLocalNumbering(f);
88 plate->updateLocalNumbering(f);
92void TR_SHELL02 :: setCrossSection(
int csIndx)
94 StructuralElement :: setCrossSection(csIndx);
95 plate->setCrossSection(csIndx);
112 plate->giveCharacteristicVector(aux, mtrx, mode, tStep);
115 membrane->giveCharacteristicVector(aux, mtrx, mode, tStep);
130 plate->giveCharacteristicMatrix(aux, mtrx, tStep);
133 membrane->giveCharacteristicMatrix(aux, mtrx, tStep);
143 bool t1 =
plate->giveRotationMatrix(aux1);
144 bool t2 =
membrane->giveRotationMatrix(aux2);
154 for (
int i = 1; i <= 9; i++ ) {
155 for (
int j = 1; j <= ncol; j++ ) {
160 for (
int i = 1; i <= 9; i++ ) {
161 for (
int j = 1; j <= ncol; j++ ) {
174 plate->updateInternalState(tStep);
175 membrane->updateInternalState(tStep);
181 StructuralElement :: updateYourself(tStep);
183 plate->updateYourself(tStep);
208 return plate->computeVolumeAround(gp);
214 OOFEM_ERROR(
"This function is not implemented yet.");
220 if ( type == IST_ShellForceTensor || type == IST_ShellStrainTensor ||
221 type == IST_ShellMomentTensor || type == IST_CurvatureTensor ) {
226 plate->giveIPValue(answer, plateGP, type, tStep);
227 membrane->giveIPValue(aux, membraneGP, type, tStep);
231 return StructuralElement :: giveIPValue(answer, gp, type, tStep);
240TR_SHELL02 :: NodalAveragingRecoveryMI_computeNodalValue(
FloatArray &answer,
int node,
250TR_SHELL02 :: printOutputAt(FILE *file,
TimeStep *tStep)
258 fprintf( file,
" GP %2d.%-2d :", iRule->
giveNumber(), gp->giveNumber() );
259 GaussPoint *membraneGP =
membrane->giveDefaultIntegrationRulePtr()->getIntegrationPoint(gp->giveNumber() - 1);
261 plate->giveIPValue(v, gp, IST_ShellStrainTensor, tStep);
262 membrane->giveIPValue(aux, membraneGP, IST_ShellStrainTensor, tStep);
265 fprintf(file,
" strains ");
266 for (
auto &val : v ) fprintf(file,
" %.4e", val);
268 plate->giveIPValue(v, gp, IST_CurvatureTensor, tStep);
269 membrane->giveIPValue(aux, membraneGP, IST_CurvatureTensor, tStep);
272 fprintf(file,
"\n curvatures ");
273 for (
auto &val : v ) fprintf(file,
" %.4e", val);
276 plate->giveIPValue(v, gp, IST_ShellForceTensor, tStep);
277 membrane->giveIPValue(aux, membraneGP, IST_ShellForceTensor, tStep);
280 fprintf(file,
"\n stresses ");
281 for (
auto &val : v ) fprintf(file,
" %.4e", val);
283 plate->giveIPValue(v, gp, IST_ShellMomentTensor, tStep);
284 membrane->giveIPValue(aux, membraneGP, IST_ShellMomentTensor, tStep);
287 fprintf(file,
"\n moments ");
288 for (
auto &val : v ) fprintf(file,
" %.4e", val);
298 StructuralElement :: saveContext(stream, mode);
299 this->
plate->saveContext(stream, mode);
300 this->
membrane->saveContext(stream, mode);
307 StructuralElement :: restoreContext(stream, mode);
308 this->
plate->restoreContext(stream, mode);
309 this->
membrane->restoreContext(stream, mode);
314TR_SHELL02 :: ZZErrorEstimatorI_giveIntegrationRule()
317 this->
compositeIR = std::make_unique<GaussIntegrationRule>(1,
this, 1, 12);
318 this->
compositeIR->SetUpPointsOnTriangle(
plate->giveDefaultIntegrationRulePtr()->giveNumberOfIntegrationPoints(), _3dShell);
335 globTensor.
at(1, 1) = sig.
at(1);
336 globTensor.
at(1, 2) = sig.
at(6);
337 globTensor.
at(1, 3) = sig.
at(5);
339 globTensor.
at(2, 1) = sig.
at(6);
340 globTensor.
at(2, 2) = sig.
at(2);
341 globTensor.
at(2, 3) = sig.
at(4);
343 globTensor.
at(3, 1) = sig.
at(5);
344 globTensor.
at(3, 2) = sig.
at(4);
345 globTensor.
at(3, 3) = sig.
at(3);
351 answer.
at(1) = globTensor.
at(1, 1);
352 answer.
at(2) = globTensor.
at(2, 2);
353 answer.
at(3) = globTensor.
at(1, 2);
354 answer.
at(7) = globTensor.
at(2, 3);
355 answer.
at(8) = globTensor.
at(1, 3);
359 globTensor.
at(1, 1) = sig.
at(7);
360 globTensor.
at(1, 2) = sig.
at(12);
361 globTensor.
at(1, 3) = sig.
at(11);
363 globTensor.
at(2, 1) = sig.
at(12);
364 globTensor.
at(2, 2) = sig.
at(8);
365 globTensor.
at(2, 3) = sig.
at(10);
367 globTensor.
at(3, 1) = sig.
at(11);
368 globTensor.
at(3, 2) = sig.
at(10);
369 globTensor.
at(3, 3) = sig.
at(9);
374 answer.
at(4) = globTensor.
at(1, 1);
375 answer.
at(5) = globTensor.
at(2, 2);
376 answer.
at(6) = globTensor.
at(1, 2);
387 lt3 =
Vec3(0., 0., 1.);
396 const auto &coordinates = this->
giveNode(i)->giveCoordinates();
425 if ( !
gc.testElementGraphicActivity(
this) ) {
431 EASValsSetColor(
gc.getElementColor() );
432 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
433 EASValsSetEdgeFlag(
true);
434 EASValsSetFillStyle(FILL_SOLID);
436 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1);
437 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2);
438 p [ 0 ].z = ( FPNum ) this->
giveNode(1)->giveCoordinate(3);
439 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1);
440 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2);
441 p [ 1 ].z = ( FPNum ) this->
giveNode(2)->giveCoordinate(3);
442 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveCoordinate(1);
443 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveCoordinate(2);
444 p [ 2 ].z = ( FPNum ) this->
giveNode(3)->giveCoordinate(3);
446 go = CreateTriangle3D(p);
447 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
448 EGAttachObject(go, ( EObjectP )
this);
449 EMAddGraphicsToModel(ESIModel(), go);
458 double defScale =
gc.getDefScale();
460 if ( !
gc.testElementGraphicActivity(
this) ) {
466 EASValsSetColor(
gc.getDeformedElementColor() );
467 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
468 EASValsSetEdgeFlag(
true);
469 EASValsSetFillStyle(FILL_SOLID);
471 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(1, tStep, defScale);
472 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(2, tStep, defScale);
473 p [ 0 ].z = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(3, tStep, defScale);
474 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(1, tStep, defScale);
475 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(2, tStep, defScale);
476 p [ 1 ].z = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(3, tStep, defScale);
477 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(1, tStep, defScale);
478 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(2, tStep, defScale);
479 p [ 2 ].z = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(3, tStep, defScale);
481 go = CreateTriangle3D(p);
482 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
483 EMAddGraphicsToModel(ESIModel(), go);
490 int i, indx, result = 0;
494 double s [ 3 ], defScale;
495 if ( !
gc.testElementGraphicActivity(
this) ) {
511 this->
giveIPValue(a, gp, IST_ShellMomentTensor, tStep);
512 v.
add(gp->giveWeight(), a);
513 tot_w += gp->giveWeight();
521 indx =
gc.giveIntVarIndx();
523 s [ 0 ] = v1.
at(indx);
524 s [ 1 ] = v2.
at(indx);
525 s [ 2 ] = v3.
at(indx);
528 for ( i = 0; i < 3; i++ ) {
529 if (
gc.getInternalVarsDefGeoFlag() ) {
531 defScale =
gc.getDefScale();
532 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale);
533 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(2, tStep, defScale);
534 p [ i ].z = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(3, tStep, defScale);
536 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
537 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
538 p [ i ].z = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(3);
542 gc.updateFringeTableMinMax(s, 3);
543 tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
544 EGWithMaskChangeAttributes(LAYER_MASK, tr);
545 EMAddGraphicsToModel(ESIModel(), tr);
#define REGISTER_Element(class)
Node * giveNode(int i) const
virtual bool isActivated(TimeStep *tStep)
virtual int giveNumberOfNodes() const
virtual Material * giveMaterial()
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_plate
static IntArray loc_membrane
IntegrationRule * giveDefaultIntegrationRulePtr() override
std ::unique_ptr< DKTPlate3d > plate
Pointer to plate element.
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
std ::unique_ptr< IntegrationRule > compositeIR
std ::unique_ptr< TrPlanestressRotAllman3d > membrane
Pointer to membrane (plane stress) element.
ZZErrorEstimatorInterface(Element *element)
Constructor.
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
@ ZZNodalRecoveryModelInterfaceType
@ ZZErrorEstimatorInterfaceType
@ SpatialLocalizerInterfaceType
@ NodalAveragingRecoveryModelInterfaceType
static FloatArray Vec3(const double &a, const double &b, const double &c)
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