| 450 | } |
| 451 | |
| 452 | int |
| 453 | LoadPattern::sendSelf(int cTag, Channel &theChannel) |
| 454 | { |
| 455 | // get my current database tag |
| 456 | // NOTE - dbTag equals 0 if not sending to a database OR has not yet been sent |
| 457 | int myDbTag = this->getDbTag(); |
| 458 | |
| 459 | // into an ID we place all info needed to determine state of LoadPattern |
| 460 | int numNodLd, numEleLd, numSPs; |
| 461 | ID lpData(11); |
| 462 | |
| 463 | numNodLd = theNodalLoads->getNumComponents(); |
| 464 | numEleLd = theElementalLoads->getNumComponents(); |
| 465 | numSPs = theSPs->getNumComponents(); |
| 466 | |
| 467 | lpData(10) = this->getTag(); |
| 468 | lpData(0) = currentGeoTag; |
| 469 | lpData(1) = numNodLd; |
| 470 | lpData(2) = numEleLd; |
| 471 | lpData(3) = numSPs; |
| 472 | |
| 473 | if (dbNod == 0) { |
| 474 | dbNod = theChannel.getDbTag(); |
| 475 | dbEle = theChannel.getDbTag(); |
| 476 | dbSPs = theChannel.getDbTag(); |
| 477 | } |
| 478 | |
| 479 | lpData(4) = dbNod; |
| 480 | lpData(5) = dbEle; |
| 481 | lpData(6) = dbSPs; |
| 482 | |
| 483 | lpData(7) = isConstant; |
| 484 | |
| 485 | if (theSeries != 0) { |
| 486 | int dbtag = theSeries->getDbTag(); |
| 487 | int classtag = theSeries->getClassTag(); |
| 488 | if (dbtag == 0) { |
| 489 | dbtag = theChannel.getDbTag(); |
| 490 | theSeries->setDbTag(dbtag); |
| 491 | } |
| 492 | lpData(8) = classtag; |
| 493 | lpData(9) = dbtag; |
| 494 | } else |
| 495 | lpData(8) = -1; |
| 496 | |
| 497 | |
| 498 | // see if we can save sending the vector containing just the load factor |
| 499 | // will happen in parallel if sending the loadPattern .. not in database |
| 500 | |
| 501 | if (theChannel.sendID(myDbTag, cTag, lpData) < 0) { |
| 502 | opserr << "LoadPattern::sendSelf - channel failed to send the initial ID\n"; |
| 503 | return -1; |
| 504 | } |
| 505 | |
| 506 | |
| 507 | Vector data(2); |
| 508 | data(0) = loadFactor; |
| 509 | data(1) = scaleFactor; |
nothing calls this directly
no test coverage detected