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

Method sendSelf

SRC/element/zeroLength/ZeroLength.cpp:1080–1177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1078
1079
1080int
1081ZeroLength::sendSelf(int commitTag, Channel &theChannel)
1082{
1083 int res = 0;
1084
1085 // note: we don't check for dataTag == 0 for Element
1086 // objects as that is taken care of in a commit by the Domain
1087 // object - don't want to have to do the check if sending data
1088 int dataTag = this->getDbTag();
1089
1090 // ZeroLength packs its data into an ID and sends this to theChannel
1091 // along with its dbTag and the commitTag passed in the arguments
1092
1093 // Make one size bigger so not a multiple of 3, otherwise will conflict
1094 // with classTags ID
1095 static ID idData(10);
1096
1097 idData(0) = this->getTag();
1098 idData(1) = dimension;
1099 idData(2) = numDOF;
1100 idData(3) = numMaterials1d;
1101 idData(4) = connectedExternalNodes(0);
1102 idData(5) = connectedExternalNodes(1);
1103 idData(6) = useRayleighDamping;
1104
1105 idData(7) = 0;
1106 idData(8) = 0;
1107 if (theDamping) {
1108 idData(7) = theDamping->getClassTag();
1109 int dbTag = theDamping->getDbTag();
1110 if (dbTag == 0) {
1111 dbTag = theChannel.getDbTag();
1112 if (dbTag != 0)
1113 theDamping->setDbTag(dbTag);
1114 }
1115 idData(8) = dbTag;
1116 }
1117
1118 res += theChannel.sendID(dataTag, commitTag, idData);
1119 if (res < 0) {
1120 opserr << "ZeroLength::sendSelf -- failed to send ID data\n";
1121 return res;
1122 }
1123
1124 // Send the 3x3 direction cosine matrix, have to send it since it is only set
1125 // in the constructor and not setDomain()
1126 res += theChannel.sendMatrix(dataTag, commitTag, transformation);
1127 if (res < 0) {
1128 opserr << "ZeroLength::sendSelf -- failed to send transformation Matrix\n";
1129 return res;
1130 }
1131
1132 if (numMaterials1d < 1)
1133 return res;
1134 else {
1135 ID classTags(numMaterials1d*3);
1136
1137 int i;

Callers

nothing calls this directly

Calls 6

getDbTagMethod · 0.45
getTagMethod · 0.45
getClassTagMethod · 0.45
setDbTagMethod · 0.45
sendIDMethod · 0.45
sendMatrixMethod · 0.45

Tested by

no test coverage detected