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

Method setOrder

SRC/handler/XmlFileStream.cpp:1187–1328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1185
1186
1187int
1188XmlFileStream::setOrder(const ID &orderData)
1189{
1190 if (fileOpen == 0)
1191 this->open();
1192
1193 if (sendSelfCount == 0)
1194 return 0;
1195
1196 if (xmlOrderProcessed == 0) {
1197 xmlColumns = new ID(orderData.Size());
1198 xmlOrderProcessed = 1;
1199 } else if (xmlOrderProcessed == 1) {
1200 this->mergeXML();
1201 xmlOrderProcessed = 2;
1202 }
1203
1204 if (sendSelfCount < 0) {
1205 static ID numColumnID(1);
1206 int numColumn = orderData.Size();
1207 numColumnID(0) = numColumn;
1208 theChannels[0]->sendID(0, 0, numColumnID);
1209
1210 theColumns = new ID *[1];
1211 theColumns[0] = new ID(orderData);
1212
1213 if (numColumn != 0)
1214 theChannels[0]->sendID(0, 0, orderData);
1215 }
1216
1217 if (sendSelfCount > 0) {
1218
1219 sizeColumns = new ID(sendSelfCount+1);
1220 theColumns = new ID *[sendSelfCount+1];
1221 theData = new double *[sendSelfCount+1];
1222 theRemoteData = new Vector *[sendSelfCount+1];
1223
1224 int numColumns = orderData.Size();
1225 (*sizeColumns)(0) = numColumns;
1226 if (numColumns != 0) {
1227 theColumns[0] = new ID(orderData);
1228 theData[0] = new double [numColumns];
1229 } else {
1230 theColumns[0] = 0;
1231 theData[0] = 0;
1232 }
1233 theRemoteData[0] = 0;
1234
1235 maxCount = 0;
1236 if (numColumns != 0)
1237 maxCount = orderData(numColumns-1);
1238
1239 // now receive orderData from the other channels
1240 for (int i=0; i<sendSelfCount; i++) {
1241 static ID numColumnID(1);
1242 if (theChannels[i]->recvID(0, 0, numColumnID) < 0) {
1243 opserr << "XmlFileStream::setOrder - failed to recv column size for process: " << i+1 << endln;
1244 return -1;

Callers

nothing calls this directly

Calls 5

openMethod · 0.95
mergeXMLMethod · 0.95
SizeMethod · 0.45
sendIDMethod · 0.45
recvIDMethod · 0.45

Tested by

no test coverage detected