70Lattice3dBoundaryTruss :: ~Lattice3dBoundaryTruss()
88 answer.
at(1, 1) = -1.;
92 answer.
at(1, 5) = -this->
eccT;
93 answer.
at(1, 6) = this->
eccS;
98 answer.
at(1, 10) = 0.;
99 answer.
at(1, 11) = this->
eccT;
100 answer.
at(1, 12) = -this->
eccS;
104 answer.
at(2, 1) = 0.;
105 answer.
at(2, 2) = -1.;
106 answer.
at(2, 3) = 0.;
107 answer.
at(2, 4) = this->
eccT;
109 answer.
at(2, 6) = -this->
length / 2.;
111 answer.
at(2, 7) = 0.;
112 answer.
at(2, 8) = 1.;
113 answer.
at(2, 9) = 0.;
114 answer.
at(2, 10) = -this->
eccT;
115 answer.
at(2, 11) = 0;
116 answer.
at(2, 12) = -this->
length / 2.;
120 answer.
at(3, 1) = 0.;
121 answer.
at(3, 2) = 0.;
122 answer.
at(3, 3) = -1.;
123 answer.
at(3, 4) = -this->
eccS;
124 answer.
at(3, 5) = this->
length / 2.;
125 answer.
at(3, 6) = 0.;
127 answer.
at(3, 7) = 0.;
128 answer.
at(3, 8) = 0.;
129 answer.
at(3, 9) = 1.;
130 answer.
at(3, 10) = this->
eccS;
131 answer.
at(3, 11) = this->
length / 2.;
132 answer.
at(3, 12) = 0.;
136 answer.
at(4, 1) = 0.;
138 answer.
at(4, 3) = 0.;
139 answer.
at(4, 4) = -sqrt(
Ip / this->
area);
140 answer.
at(4, 5) = 0.;
141 answer.
at(4, 6) = 0.;
143 answer.
at(4, 7) = 0.;
144 answer.
at(4, 8) = 0.;
145 answer.
at(4, 9) = 0.;
146 answer.
at(4, 10) = sqrt(
Ip / this->
area);
147 answer.
at(4, 11) = 0.;
148 answer.
at(4, 12) = 0.;
152 answer.
at(5, 1) = 0.;
153 answer.
at(5, 2) = 0.;
154 answer.
at(5, 3) = 0.;
155 answer.
at(5, 4) = 0.;
156 answer.
at(5, 5) = -sqrt(
I1 / this->
area);
157 answer.
at(5, 6) = 0.;
159 answer.
at(5, 7) = 0.;
160 answer.
at(5, 8) = 0.;
161 answer.
at(5, 9) = 0.;
162 answer.
at(5, 10) = 0.;
163 answer.
at(5, 11) = sqrt(
I1 / this->
area);
164 answer.
at(5, 12) = 0.;
168 answer.
at(6, 1) = 0.;
169 answer.
at(6, 2) = 0.;
170 answer.
at(6, 3) = 0.;
171 answer.
at(6, 4) = 0.;
172 answer.
at(6, 5) = 0.;
173 answer.
at(6, 6) = -sqrt(
I2 / this->
area);
175 answer.
at(6, 7) = 0.;
176 answer.
at(6, 8) = 0.;
177 answer.
at(6, 9) = 0.;
178 answer.
at(6, 10) = 0.;
179 answer.
at(6, 11) = 0.;
180 answer.
at(6, 12) = sqrt(
I2 / this->
area);
188Lattice3dBoundaryTruss :: computeStiffnessMatrix(
FloatMatrix &answer, MatResponseMode rMode,
195 FloatMatrix answerTemp(12, 12), answerHelp, ttk(13, 12);
196 bool matStiffSymmFlag = this->
giveCrossSection()->isCharacteristicMtrxSymmetric(rMode);
209 for (
int i = 1; i <= 6; i++ ) {
210 d.
at(i, i) *= volume;
215 answerTemp.beProductOf(bjt, dbj);
223 for (
int m = 1; m <= 12; m++ ) {
224 for (
int k = 1; k <= 12; k++ ) {
225 answer.
at(m, k) = answerTemp.at(m, k);
229 if ( matStiffSymmFlag ) {
240 for (
int m = 1; m <= 12; m++ ) {
241 for (
int k = 1; k <= 12; k++ ) {
242 answerTemp.at(m, k) = answer.
at(m, k);
246 IntArray projectionComponentNodeOne(3);
247 projectionComponentNodeOne.
zero();
252 IntArray projectionComponentNodeTwo(3);
253 projectionComponentNodeTwo.
zero();
258 for (
int k = 1; k <= 12; k++ ) {
261 t.at(1, 13) = projectionComponentNodeOne.
at(1);
262 t.at(7, 13) = projectionComponentNodeTwo.
at(1);
279Lattice3dBoundaryTruss :: computeVolumeAround(
GaussPoint *aGaussPoint)
289Lattice3dBoundaryTruss :: recalculateCoordinates(
int nodeNumber,
FloatArray &coords) {
295 specimenDimension.
at(1) = this->
giveNode(3)->giveCoordinate(1);
296 specimenDimension.
at(2) = this->
giveNode(3)->giveCoordinate(2);
297 specimenDimension.
at(3) = this->
giveNode(3)->giveCoordinate(3);
300 projectionComponent.
zero();
302 if ( nodeNumber == 1 ) {
307 }
else if ( nodeNumber == 2 ) {
313 OOFEM_ERROR(
"wrong element used in the vtk module");
316 for (
int i = 0; i < 3; i++ ) {
317 coords.
at(i + 1) = node->
giveCoordinate(i + 1) + projectionComponent.
at(i + 1) * specimenDimension.
at(i + 1);
342 IntArray projectionComponentNodeOne(3);
343 projectionComponentNodeOne.
zero();
348 IntArray projectionComponentNodeTwo(3);
349 projectionComponentNodeTwo.
zero();
361 u.
at(1) = u.
at(1) + projectionComponentNodeOne.
at(1) * u.
at(13);
363 u.
at(7) = u.
at(7) + projectionComponentNodeTwo.
at(1) * u.
at(13);
371 for (
int i = 1; i <= 12; i++ ) {
372 uTemp.
at(i) = u.
at(i);
379Lattice3dBoundaryTruss :: computeGtoLRotationMatrix(
FloatMatrix &answer)
388 for ( i = 1; i <= 3; i++ ) {
389 for ( j = 1; j <= 3; j++ ) {
390 answer.
at(i, j) = lcs.
at(i, j);
391 answer.
at(i + 3, j + 3) = lcs.
at(i, j);
392 answer.
at(i + 6, j + 6) = lcs.
at(i, j);
393 answer.
at(i + 9, j + 9) = lcs.
at(i, j);
396 answer.
at(13, 13) = 1.;
402Lattice3dBoundaryTruss :: giveLocalCoordinateSystem(
FloatMatrix &answer)
416Lattice3dBoundaryTruss :: giveDofManDofIDMask(
int inode,
IntArray &answer)
const
421 answer = { D_u, D_v, D_w, R_u, R_v, R_w };
426Lattice3dBoundaryTruss :: initializeFrom(
InputRecord &ir,
int priority)
429 Lattice3d :: initializeFrom(ir, priority);
434Lattice3dBoundaryTruss :: postInitialize()
438 Lattice3d :: postInitialize();
444Lattice3dBoundaryTruss :: giveInternalForcesVector(
FloatArray &answer,
TimeStep *tStep,
int useUpdatedGpRecord)
465 if ( useUpdatedGpRecord == 1 ) {
467 ->giveLatticeStress();
481 for (
int m = 1; m <= 12; m++ ) {
482 answer.
at(m) = bs.
at(m);
489 IntArray projectionComponentNodeOne(3);
490 projectionComponentNodeOne.
zero();
495 IntArray projectionComponentNodeTwo(3);
496 projectionComponentNodeTwo.
zero();
503 answer.
at(13) = projectionComponentNodeOne.
at(1) * answer.
at(1) + projectionComponentNodeTwo.
at(1) * answer.
at(7);
517 for (
int x = -1; x < 2; x++ ) {
518 for (
int y = -1; y < 2; y++ ) {
519 for (
int z = -1; z < 2; z++ ) {
520 if ( !( z == 0 && y == 0 && x == 0 ) ) {
536Lattice3dBoundaryTruss :: computeGeometryProperties()
547 specimenDimension.
at(1) = this->
giveNode(3)->giveCoordinate(1);
548 specimenDimension.
at(2) = this->
giveNode(3)->giveCoordinate(2);
549 specimenDimension.
at(3) = this->
giveNode(3)->giveCoordinate(3);
551 IntArray projectionComponentNodeOne(3);
552 projectionComponentNodeOne.
zero();
557 IntArray projectionComponentNodeTwo(3);
558 projectionComponentNodeTwo.
zero();
563 for (
int i = 0; i < 3; i++ ) {
564 coordsA.
at(i + 1) = nodeA->
giveCoordinate(i + 1) + projectionComponentNodeOne.
at(i + 1) * specimenDimension.
at(i + 1);
565 coordsB.
at(i + 1) = nodeB->
giveCoordinate(i + 1) + projectionComponentNodeTwo.
at(i + 1) * specimenDimension.
at(i + 1);
574 for (
int i = 0; i < 3; i++ ) {
575 this->
normal.at(i + 1) = coordsB.
at(i + 1) - coordsA.
at(i + 1);
580 for (
int i = 0; i < 3; i++ ) {
586 for (
int i = 0; i < 3; i++ ) {
587 this->
midPoint.at(i + 1) = 0.5 * ( coordsB.
at(i + 1) + coordsA.
at(i + 1) );
602 Lattice3d :: saveContext(stream, mode);
618 Lattice3d :: restoreContext(stream, mode);
623 if ( ( iores = this->
location.restoreYourself(stream) ) !=
CIO_OK ) {
658 if ( !
gc.testElementGraphicActivity(
this) ) {
663 EASValsSetColor(
gc.getActiveCrackColor() );
668 specimenDimension.
at(1) = this->
giveNode(3)->giveCoordinate(1);
669 specimenDimension.
at(2) = this->
giveNode(3)->giveCoordinate(2);
670 specimenDimension.
at(3) = this->
giveNode(3)->giveCoordinate(3);
673 IntArray projectionComponentNodeOne(3);
674 projectionComponentNodeOne.
zero();
679 IntArray projectionComponentNodeTwo(3);
680 projectionComponentNodeTwo.
zero();
686 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1) + projectionComponentNodeOne.
at(1) * specimenDimension.
at(1);
687 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2) + projectionComponentNodeOne.
at(2) * specimenDimension.
at(2);
688 p [ 0 ].z = ( FPNum ) this->
giveNode(1)->giveCoordinate(3) + projectionComponentNodeOne.
at(3) * specimenDimension.
at(3);
689 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1) + projectionComponentNodeTwo.
at(1) * specimenDimension.
at(1);
690 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2) + projectionComponentNodeTwo.
at(2) * specimenDimension.
at(2);
691 p [ 1 ].z = ( FPNum ) this->
giveNode(2)->giveCoordinate(3) + projectionComponentNodeTwo.
at(3) * specimenDimension.
at(3);
693 go = CreateLine3D(p);
694 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
695 EGAttachObject(go, ( EObjectP )
this);
696 EMAddGraphicsToModel(ESIModel(), go);
710 if ( !
gc.testElementGraphicActivity(
this) ) {
728 pTemp [ 0 ] = p [ i ];
729 pTemp [ 1 ] = p [ i + 1 ];
731 pTemp [ 0 ] = p [ i ];
732 pTemp [ 1 ] = p [ 0 ];
735 go = CreateLine3D(pTemp);
736 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
737 EGAttachObject(go, ( EObjectP )
this);
738 EMAddGraphicsToModel(ESIModel(), go);
749 if ( !
gc.testElementGraphicActivity(
this) ) {
753 double defScale =
gc.getDefScale();
758 EASValsSetColor(
gc.getDeformedElementColor() );
762 specimenDimension.
at(1) = this->
giveNode(3)->giveCoordinate(1);
763 specimenDimension.
at(2) = this->
giveNode(3)->giveCoordinate(2);
764 specimenDimension.
at(3) = this->
giveNode(3)->giveCoordinate(3);
767 dispOne.
at(1) = this->
giveNode(1)->giveDofWithID(D_u)->giveUnknown(VM_Total, tStep);
768 dispOne.
at(2) = this->
giveNode(1)->giveDofWithID(D_v)->giveUnknown(VM_Total, tStep);
769 dispOne.
at(3) = this->
giveNode(1)->giveDofWithID(D_w)->giveUnknown(VM_Total, tStep);
770 dispOne.
at(4) = this->
giveNode(1)->giveDofWithID(R_u)->giveUnknown(VM_Total, tStep);
771 dispOne.
at(5) = this->
giveNode(1)->giveDofWithID(R_v)->giveUnknown(VM_Total, tStep);
772 dispOne.
at(6) = this->
giveNode(1)->giveDofWithID(R_w)->giveUnknown(VM_Total, tStep);
775 dispTwo.
at(1) = this->
giveNode(2)->giveDofWithID(D_u)->giveUnknown(VM_Total, tStep);
776 dispTwo.
at(2) = this->
giveNode(2)->giveDofWithID(D_v)->giveUnknown(VM_Total, tStep);
777 dispTwo.
at(3) = this->
giveNode(2)->giveDofWithID(D_w)->giveUnknown(VM_Total, tStep);
778 dispTwo.
at(4) = this->
giveNode(2)->giveDofWithID(R_u)->giveUnknown(VM_Total, tStep);
779 dispTwo.
at(5) = this->
giveNode(2)->giveDofWithID(R_v)->giveUnknown(VM_Total, tStep);
780 dispTwo.
at(6) = this->
giveNode(2)->giveDofWithID(R_w)->giveUnknown(VM_Total, tStep);
783 dispThree.
at(1) = this->
giveNode(3)->giveDofWithID(E_xx)->giveUnknown(VM_Total, tStep);
785 IntArray projectionComponentNodeOne(3);
786 projectionComponentNodeOne.
zero();
791 IntArray projectionComponentNodeTwo(3);
792 projectionComponentNodeTwo.
zero();
798 dispOne.
at(1) = dispOne.
at(1) + projectionComponentNodeOne.
at(1) * dispThree.
at(1);
799 dispOne.
at(2) = dispOne.
at(2);
800 dispOne.
at(3) = dispOne.
at(3);
803 dispTwo.
at(1) = dispTwo.
at(1) + projectionComponentNodeTwo.
at(1) * dispThree.
at(1);
804 dispTwo.
at(2) = dispTwo.
at(2);
805 dispTwo.
at(3) = dispTwo.
at(3);
807 double x1, y1, z1, x2, y2, z2;
808 x1 = this->
giveNode(1)->giveCoordinate(1) + projectionComponentNodeOne.
at(1) * specimenDimension.
at(1);
809 y1 = this->
giveNode(1)->giveCoordinate(2) + projectionComponentNodeOne.
at(2) * specimenDimension.
at(2);
810 z1 = this->
giveNode(1)->giveCoordinate(3) + projectionComponentNodeOne.
at(3) * specimenDimension.
at(3);
812 x2 = this->
giveNode(2)->giveCoordinate(1) + projectionComponentNodeTwo.
at(1) * specimenDimension.
at(1);
813 y2 = this->
giveNode(2)->giveCoordinate(2) + projectionComponentNodeTwo.
at(2) * specimenDimension.
at(2);
814 z2 = this->
giveNode(2)->giveCoordinate(3) + projectionComponentNodeTwo.
at(3) * specimenDimension.
at(3);
816 p [ 0 ].x = ( FPNum ) x1 + defScale * dispOne.
at(1);
817 p [ 0 ].y = ( FPNum ) y1 + defScale * dispOne.
at(2);
818 p [ 0 ].z = ( FPNum ) z1 + defScale * dispOne.
at(3);
820 p [ 1 ].x = ( FPNum ) x2 + defScale * dispTwo.
at(1);
821 p [ 1 ].y = ( FPNum ) y2 + defScale * dispTwo.
at(2);
822 p [ 1 ].z = ( FPNum ) z2 + defScale * dispTwo.
at(3);
824 go = CreateLine3D(p);
825 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
826 EMAddGraphicsToModel(ESIModel(), go);
#define REGISTER_Element(class)
double giveCoordinate(int i) const
Node * giveNode(int i) const
virtual bool giveRotationMatrix(FloatMatrix &answer)
virtual bool isActivated(TimeStep *tStep)
virtual Material * giveMaterial()
virtual MaterialMode giveMaterialMode()
int numberOfDofMans
Number of dofmanagers.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
CrossSection * giveCrossSection()
virtual void drawSpecial(oofegGraphicContext &gc, TimeStep *tStep)
Domain * giveDomain() const
int number
Component number.
void zero()
Zeroes all coefficients of receiver.
void rotatedWith(FloatMatrix &r, char mode)
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void subtract(const FloatArray &src)
void rotatedWith(const FloatMatrix &r, char mode='n')
void resize(Index rows, Index cols)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void beTranspositionOf(const FloatMatrix &src)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
void zero()
Sets all component to zero.
int computeNumberOfDofs() override
void giveSwitches(IntArray &answer, int location)
bool computeGtoLRotationMatrix(FloatMatrix &) override
double computeVolumeAround(GaussPoint *) override
int giveLocalCoordinateSystem(FloatMatrix &answer) override
void computeGeometryProperties() override
void drawDeformedGeometry(oofegGraphicContext &, TimeStep *tStep, UnknownType) override
static ParamKey IPK_Lattice3dBoundaryTruss_location
void computeStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *stepN) override
void computeBmatrixAt(GaussPoint *, FloatMatrix &, int=1, int=ALL_STRAINS) override
void drawRawCrossSections(oofegGraphicContext &, TimeStep *tStep)
void drawRawGeometry(oofegGraphicContext &, TimeStep *tStep) override
Lattice3dBoundary(int n, Domain *)
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
virtual void computeCrossSectionProperties()
FloatMatrix localCoordinateSystem
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
int numberOfPolygonVertices
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
std::unique_ptr< FloatArray > initialDisplacements
Initial displacement vector, describes the initial nodal displacements when element has been casted.
#define OOFEG_RAW_CROSSSECTION_LAYER
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_DEFORMED_GEOMETRY_LAYER
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_LAYER
#define PM_ELEMENT_ERROR_IFNOTSET(_pm, _componentnum, _paramkey)
#define PM_UPDATE_PARAMETER(_val, _pm, _ir, _componentnum, _paramkey, _prio)