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

Method sendSelf

SRC/domain/pattern/LoadPattern.cpp:452–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452int
453LoadPattern::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;

Callers

nothing calls this directly

Calls 8

getDbTagMethod · 0.45
getNumComponentsMethod · 0.45
getTagMethod · 0.45
getClassTagMethod · 0.45
setDbTagMethod · 0.45
sendIDMethod · 0.45
sendVectorMethod · 0.45
isDatastoreMethod · 0.45

Tested by

no test coverage detected