218 for (
int m = 1; m <= 6; m++ ) {
219 for (
int k = 1; k <= 6; k++ ) {
220 answer.
at(m, k) = answerTemp.
at(m, k);
236 answer.
at(1, 7) = projectionComponent.
at(1) * answer.
at(1, 4);
237 answer.
at(1, 8) = projectionComponent.
at(2) * answer.
at(1, 5);
238 answer.
at(1, 9) = projectionComponent.
at(1) * answer.
at(1, 5);
240 answer.
at(2, 7) = projectionComponent.
at(1) * answer.
at(2, 4);
241 answer.
at(2, 8) = projectionComponent.
at(2) * answer.
at(2, 5);
242 answer.
at(2, 9) = projectionComponent.
at(1) * answer.
at(2, 5);
244 answer.
at(3, 7) = projectionComponent.
at(1) * answer.
at(3, 4);
245 answer.
at(3, 8) = projectionComponent.
at(2) * answer.
at(3, 5);
246 answer.
at(3, 9) = projectionComponent.
at(1) * answer.
at(3, 5);
248 answer.
at(4, 7) = projectionComponent.
at(1) * answer.
at(4, 4);
249 answer.
at(4, 8) = projectionComponent.
at(2) * answer.
at(4, 5);
250 answer.
at(4, 9) = projectionComponent.
at(1) * answer.
at(4, 5);
252 answer.
at(5, 7) = projectionComponent.
at(1) * answer.
at(5, 4);
253 answer.
at(5, 8) = projectionComponent.
at(2) * answer.
at(5, 5);
254 answer.
at(5, 9) = projectionComponent.
at(1) * answer.
at(5, 5);
256 answer.
at(6, 7) = projectionComponent.
at(1) * answer.
at(6, 4);
257 answer.
at(6, 8) = projectionComponent.
at(2) * answer.
at(6, 5);
258 answer.
at(6, 9) = projectionComponent.
at(1) * answer.
at(6, 5);
260 answer.
at(7, 1) = projectionComponent.
at(1) * answer.
at(4, 1);
261 answer.
at(7, 2) = projectionComponent.
at(1) * answer.
at(4, 2);
262 answer.
at(7, 3) = projectionComponent.
at(1) * answer.
at(4, 3);
263 answer.
at(7, 4) = projectionComponent.
at(1) * answer.
at(4, 4);
264 answer.
at(7, 5) = projectionComponent.
at(1) * answer.
at(4, 5);
265 answer.
at(7, 6) = projectionComponent.
at(1) * answer.
at(4, 6);
266 answer.
at(7, 7) = projectionComponent.
at(1) * projectionComponent.
at(1) * answer.
at(4, 4);
267 answer.
at(7, 8) = projectionComponent.
at(1) * projectionComponent.
at(2) * answer.
at(4, 5);
268 answer.
at(7, 9) = projectionComponent.
at(1) * projectionComponent.
at(1) * answer.
at(4, 5);
270 answer.
at(8, 1) = projectionComponent.
at(2) * answer.
at(5, 1);
271 answer.
at(8, 2) = projectionComponent.
at(2) * answer.
at(5, 2);
272 answer.
at(8, 3) = projectionComponent.
at(2) * answer.
at(5, 3);
273 answer.
at(8, 4) = projectionComponent.
at(2) * answer.
at(5, 4);
274 answer.
at(8, 5) = projectionComponent.
at(2) * answer.
at(5, 5);
275 answer.
at(8, 6) = projectionComponent.
at(2) * answer.
at(5, 6);
276 answer.
at(8, 7) = projectionComponent.
at(1) * projectionComponent.
at(2) * answer.
at(5, 4);
277 answer.
at(8, 8) = projectionComponent.
at(2) * projectionComponent.
at(2) * answer.
at(5, 5);
278 answer.
at(8, 9) = projectionComponent.
at(1) * projectionComponent.
at(2) * answer.
at(5, 5);
280 answer.
at(9, 1) = projectionComponent.
at(1) * answer.
at(5, 1);
281 answer.
at(9, 2) = projectionComponent.
at(1) * answer.
at(5, 2);
282 answer.
at(9, 3) = projectionComponent.
at(1) * answer.
at(5, 3);
283 answer.
at(9, 4) = projectionComponent.
at(1) * answer.
at(5, 4);
284 answer.
at(9, 5) = projectionComponent.
at(1) * answer.
at(5, 5);
285 answer.
at(9, 6) = projectionComponent.
at(1) * answer.
at(5, 6);
286 answer.
at(9, 7) = projectionComponent.
at(1) * projectionComponent.
at(1) * answer.
at(5, 4);
287 answer.
at(9, 8) = projectionComponent.
at(1) * projectionComponent.
at(2) * answer.
at(5, 5);
288 answer.
at(9, 9) = projectionComponent.
at(1) * projectionComponent.
at(1) * answer.
at(5, 5);
461Lattice2dBoundary :: giveInternalForcesVector(
FloatArray &answer,
TimeStep *tStep,
int useUpdatedGpRecord)
484 if ( useUpdatedGpRecord == 1 ) {
486 ->giveLatticeStress();
504 for (
int m = 1; m <= 6; m++ ) {
505 answer.
at(m) = bs.
at(m);
518 answer.
at(7) = projectionComponent.
at(1) * answer.
at(4);
519 answer.
at(8) = projectionComponent.
at(2) * answer.
at(5);
520 answer.
at(9) = projectionComponent.
at(1) * answer.
at(5);
615 if ( !
gc.testElementGraphicActivity(
this) ) {
620 EASValsSetColor(
gc.getCrossSectionColor() );
633 specimenDimension.
at(1) = this->
giveNode(3)->giveCoordinate(1);
634 specimenDimension.
at(2) = this->
giveNode(3)->giveCoordinate(2);
638 double x1, y1, x2, y2;
639 x1 = this->
giveNode(1)->giveCoordinate(1);
640 y1 = this->
giveNode(1)->giveCoordinate(2);
642 x2 = this->
giveNode(2)->giveCoordinate(1) + projectionComponent.
at(1) * specimenDimension.
at(1);
643 y2 = this->
giveNode(2)->giveCoordinate(2) + projectionComponent.
at(2) * specimenDimension.
at(2);
648 normalDirection.
resize(2);
649 normalDirection.
zero();
651 shearDirection.
zero();
652 normalDirection.
at(1) = x2 - x1;
653 normalDirection.
at(2) = y2 - y1;
655 if ( normalDirection.
at(2) == 0. ) {
656 shearDirection.
at(1) = 0.;
657 shearDirection.
at(2) = 1.;
659 shearDirection.
at(1) = 1.0;
660 shearDirection.
at(2) =
661 -normalDirection.
at(1) / normalDirection.
at(2);
665 p [ 0 ].x = ( FPNum ) this->gpCoords.
at(1) - shearDirection.
at(1) * this->
width / 2.;
666 p [ 0 ].y = ( FPNum ) this->gpCoords.
at(2) - shearDirection.
at(2) * this->
width / 2.;
669 p [ 1 ].x = ( FPNum ) this->gpCoords.
at(1) + shearDirection.
at(1) * this->
width / 2.;
670 p [ 1 ].y = ( FPNum ) this->gpCoords.
at(2) + shearDirection.
at(2) * this->
width / 2.;
673 go = CreateLine3D(p);
674 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
675 EGAttachObject(go, ( EObjectP )
this);
676 EMAddGraphicsToModel(ESIModel(), go);
686 if ( !
gc.testElementGraphicActivity(
this) ) {
691 EASValsSetColor(
gc.getElementColor() );
700 specimenDimension.
at(1) = this->
giveNode(3)->giveCoordinate(1);
701 specimenDimension.
at(2) = this->
giveNode(3)->giveCoordinate(2);
703 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1);
704 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2);
707 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1) + projectionComponent.
at(1) * specimenDimension.
at(1);
708 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2) + projectionComponent.
at(2) * specimenDimension.
at(2);
711 go = CreateLine3D(p);
712 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
713 EGAttachObject(go, ( EObjectP )
this);
714 EMAddGraphicsToModel(ESIModel(), go);
723 if ( !
gc.testElementGraphicActivity(
this) ) {
727 double defScale =
gc.getDefScale();
731 EASValsSetColor(
gc.getDeformedElementColor() );
740 specimenDimension.
at(1) = this->
giveNode(3)->giveCoordinate(1);
741 specimenDimension.
at(2) = this->
giveNode(3)->giveCoordinate(2);
743 double x1, y1, x2, y2;
744 x1 = this->
giveNode(1)->giveCoordinate(1);
745 y1 = this->
giveNode(1)->giveCoordinate(2);
746 x2 = this->
giveNode(2)->giveCoordinate(1) + projectionComponent.
at(1) * specimenDimension.
at(1);
747 y2 = this->
giveNode(2)->giveCoordinate(2) + projectionComponent.
at(2) * specimenDimension.
at(2);
751 dispOne.
at(1) = this->
giveNode(1)->giveDofWithID(D_u)->giveUnknown(VM_Total, tStep);
752 dispOne.
at(2) = this->
giveNode(1)->giveDofWithID(D_v)->giveUnknown(VM_Total, tStep);
753 dispOne.
at(3) = this->
giveNode(1)->giveDofWithID(R_w)->giveUnknown(VM_Total, tStep);
757 dispTwo.
at(1) = this->
giveNode(2)->giveDofWithID(D_u)->giveUnknown(VM_Total, tStep);
758 dispTwo.
at(2) = this->
giveNode(2)->giveDofWithID(D_v)->giveUnknown(VM_Total, tStep);
759 dispTwo.
at(3) = this->
giveNode(2)->giveDofWithID(R_w)->giveUnknown(VM_Total, tStep);
763 dispThree.
at(1) = this->
giveNode(3)->giveDofWithID(E_xx)->giveUnknown(VM_Total, tStep);
764 dispThree.
at(2) = this->
giveNode(3)->giveDofWithID(E_yy)->giveUnknown(VM_Total, tStep);
765 dispThree.
at(3) = this->
giveNode(3)->giveDofWithID(G_xy)->giveUnknown(VM_Total, tStep);
768 dispTwo.
at(1) = dispTwo.
at(1) + projectionComponent.
at(1) * dispThree.
at(1);
769 dispTwo.
at(2) = dispTwo.
at(2) + projectionComponent.
at(2) * dispThree.
at(2) + projectionComponent.
at(1) * dispThree.
at(3);
771 p [ 0 ].x = ( FPNum ) x1 + defScale * dispOne.
at(1);
772 p [ 0 ].y = ( FPNum ) y1 + defScale * dispOne.
at(2);
775 p [ 1 ].x = ( FPNum ) x2 + defScale * dispTwo.
at(1);
776 p [ 1 ].y = ( FPNum ) y2 + defScale * dispTwo.
at(2);
779 go = CreateLine3D(p);
780 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
781 EMAddGraphicsToModel(ESIModel(), go);
798 if ( !
gc.testElementGraphicActivity(
this) ) {
801 if (
gc.giveIntVarType() == IST_CrackState ) {
803 mat->
giveIPValue(crackStatuses, gp, IST_CrackStatuses, tStep);
804 if ( crackStatuses(0) == 1. || crackStatuses(0) == 2. ) {
810 specimenDimension.
at(1) = this->
giveNode(3)->giveCoordinate(1);
811 specimenDimension.
at(2) = this->
giveNode(3)->giveCoordinate(2);
818 double x1, y1, x2, y2;
819 x1 = this->
giveNode(1)->giveCoordinate(1);
820 y1 = this->
giveNode(1)->giveCoordinate(2);
821 x2 = this->
giveNode(2)->giveCoordinate(1) + projectionComponent.
at(1) * specimenDimension.
at(1);
822 y2 = this->
giveNode(2)->giveCoordinate(2) + projectionComponent.
at(2) * specimenDimension.
at(2);
827 normalDirection.
resize(2);
828 normalDirection.
zero();
830 shearDirection.
zero();
831 normalDirection.
at(1) = x2 - x1;
832 normalDirection.
at(2) = y2 - y1;
834 if ( normalDirection.
at(2) == 0. ) {
835 shearDirection.
at(1) = 0.;
836 shearDirection.
at(2) = 1.;
838 shearDirection.
at(1) = 1.0;
839 shearDirection.
at(2) =
840 -normalDirection.
at(1) / normalDirection.
at(2);
844 l [ 0 ].x = ( FPNum ) this->gpCoords.
at(1) - shearDirection.
at(1) * this->
width / 2.;
845 l [ 0 ].y = ( FPNum ) this->gpCoords.
at(2) - shearDirection.
at(2) * this->
width / 2.;
847 l [ 1 ].x = ( FPNum ) this->gpCoords.
at(1) + shearDirection.
at(1) * this->
width / 2.;
849 l [ 1 ].y = ( FPNum ) this->gpCoords.
at(2) + shearDirection.
at(2) * this->
width / 2.;
854 if ( ( crackStatuses(0) == 1. ) ) {
855 EASValsSetColor(
gc.getActiveCrackColor() );
856 }
else if ( crackStatuses(0) == 2. ) {
857 EASValsSetColor(
gc.getCrackPatternColor() );
859 tr = CreateLine3D(l);
860 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, tr);
861 EMAddGraphicsToModel(ESIModel(), tr);
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]