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

Method recvSelf

SRC/element/zeroLength/ZeroLength.cpp:1179–1327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1177}
1178
1179int
1180ZeroLength::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
1181{
1182 int res = 0;
1183
1184 int dataTag = this->getDbTag();
1185
1186 // ZeroLength creates an ID, receives the ID and then sets the
1187 // internal data with the data in the ID
1188
1189 static ID idData(10);
1190
1191 res += theChannel.recvID(dataTag, commitTag, idData);
1192 if (res < 0) {
1193 opserr << "ZeroLength::recvSelf -- failed to receive ID data\n";
1194
1195 return res;
1196 }
1197
1198 res += theChannel.recvMatrix(dataTag, commitTag, transformation);
1199 if (res < 0) {
1200 opserr << "ZeroLength::recvSelf -- failed to receive transformation Matrix\n";
1201
1202 return res;
1203 }
1204
1205 this->setTag(idData(0));
1206 dimension = idData(1);
1207 numDOF = idData(2);
1208 connectedExternalNodes(0) = idData(4);
1209 connectedExternalNodes(1) = idData(5);
1210 useRayleighDamping = idData(6);
1211
1212 if (idData(3) < 1) {
1213 numMaterials1d = 0;
1214 if (dir1d != 0) {
1215 delete dir1d;
1216 dir1d = 0;
1217 }
1218 return res;
1219 }
1220 else {
1221 // Check that there is correct number of materials, reallocate if needed
1222 if (numMaterials1d != idData(3)) {
1223 int i;
1224 if (theMaterial1d != 0) {
1225 for (i = 0; i < numMaterials1d; i++)
1226 delete theMaterial1d[i];
1227 delete [] theMaterial1d;
1228 theMaterial1d = 0;
1229 }
1230
1231 numMaterials1d = idData(3);
1232
1233 theMaterial1d = new UniaxialMaterial *[numMaterials1d];
1234 if (theMaterial1d == 0) {
1235 opserr << "ZeroLength::recvSelf -- failed to new Material1d array\n";
1236 return -1;

Callers

nothing calls this directly

Calls 9

exitFunction · 0.85
getDbTagMethod · 0.45
recvIDMethod · 0.45
recvMatrixMethod · 0.45
setTagMethod · 0.45
getClassTagMethod · 0.45
setDbTagMethod · 0.45
getNewDampingMethod · 0.45

Tested by

no test coverage detected