MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / Print

Method Print

SRC/element/forceBeamColumn/ElasticForceBeamColumn3d.cpp:972–1158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

970 }
971
972void
973ElasticForceBeamColumn3d::Print(OPS_Stream &s, int flag)
974 {
975 static Vector Se(NEBD);
976 static Vector vp(NEBD);
977 static Matrix fe(NEBD,NEBD);
978 double p0[NEBD];
979 Vector p0Vec(p0,NEBD);
980 p0Vec.Zero();
981
982 // flags with negative values are used by GSA
983 if (flag == -1) {
984 int eleTag = this->getTag();
985 s << "EL_BEAM\t" << eleTag << "\t";
986 s << sections[0]->getTag() << "\t" << sections[numSections-1]->getTag();
987 s << "\t" << connectedExternalNodes(0) << "\t" << connectedExternalNodes(1);
988 s << "\t0\t0.0000000\n";
989 }
990
991 // flags with negative values are used by GSA
992 else if (flag < -1) {
993 int eleTag = this->getTag();
994 int counter = (flag +1) * -1;
995 this->computeBasicForces(Se);
996 double P = Se(0);
997 double MZ1 = Se(1);
998 double MZ2 = Se(2);
999 double MY1 = Se(3);
1000 double MY2 = Se(4);
1001 double L = crdTransf->getInitialLength();
1002 double VY = (MZ1+MZ2)/L;
1003 theVector(1) = VY;
1004 theVector(4) = -VY;
1005 double VZ = (MY1+MY2)/L;
1006 double T = Se(5);
1007
1008 s << "FORCE\t" << eleTag << "\t" << counter << "\t0";
1009 s << "\t" << -P+p0[0] << "\t" << VY+p0[1] << "\t" << -VZ+p0[3] << endln;
1010 s << "FORCE\t" << eleTag << "\t" << counter << "\t1";
1011 s << "\t" << P << ' ' << -VY+p0[2] << ' ' << VZ+p0[4] << endln;
1012 s << "MOMENT\t" << eleTag << "\t" << counter << "\t0";
1013 s << "\t" << -T << "\t" << MY1 << "\t" << MZ1 << endln;
1014 s << "MOMENT\t" << eleTag << "\t" << counter << "\t1";
1015 s << "\t" << T << ' ' << MY2 << ' ' << MZ2 << endln;
1016 }
1017
1018 // flag set to 2 used to print everything .. used for viewing data for UCSD renderer
1019 else if (flag == 2) {
1020 static Vector xAxis(3);
1021 static Vector yAxis(3);
1022 static Vector zAxis(3);
1023
1024 crdTransf->getLocalAxes(xAxis, yAxis, zAxis);
1025
1026 s << "#ForceBeamColumn3D\n";
1027 s << "#LocalAxis " << xAxis(0) << " " << xAxis(1) << " " << xAxis(2);
1028 s << " " << yAxis(0) << " " << yAxis(1) << " " << yAxis(2) << " ";
1029 s << zAxis(0) << " " << zAxis(1) << " " << zAxis(2) << endln;

Callers 1

Calls 10

computeBasicForcesMethod · 0.95
getInitialFlexibilityMethod · 0.95
getCrdsMethod · 0.80
getBasicTrialDispMethod · 0.80
ZeroMethod · 0.45
getTagMethod · 0.45
getInitialLengthMethod · 0.45
getLocalAxesMethod · 0.45
getDispMethod · 0.45
addMatrixVectorMethod · 0.45

Tested by

no test coverage detected