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

Method recvSelf

SRC/domain/pattern/LoadPattern.cpp:679–921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677
678
679int
680LoadPattern::recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
681{
682
683 // get my current database tag
684 // NOTE - dbTag equals 0 if not sending to a database OR has not yet been sent
685 int myDbTag = this->getDbTag();
686
687 // into an ID we place all info needed to determine state of LoadPattern
688 int numNod, numEle, numSPs;
689 ID lpData(11);
690
691 if (theChannel.recvID(myDbTag, cTag, lpData) < 0) {
692 opserr << "LoadPattern::recvSelf - channel failed to recv the initial ID\n";
693 return -1;
694 }
695
696 isConstant = lpData(7);
697
698 this->setTag(lpData(10));
699
700
701 Vector data(2);
702 if (theChannel.recvVector(myDbTag, cTag, data) < 0) {
703 opserr << "LoadPattern::recvSelf - channel failed to recv the Vector\n";
704 return -2;
705 }
706 loadFactor = data(0);
707 scaleFactor = data(1);
708
709
710 // read data about the time series
711 if (lpData(8) != -1) {
712 if (theSeries == 0) {
713 theSeries = theBroker.getNewTimeSeries(lpData(8));
714 } else if (theSeries->getClassTag() != lpData(8)) {
715 delete theSeries;
716 theSeries = theBroker.getNewTimeSeries(lpData(8));
717 }
718 if (theSeries == 0) {
719 opserr << "LoadPattern::recvSelf - failed to create TimeSeries\n";
720 return -3;
721 }
722
723 theSeries->setDbTag(lpData(9));
724
725 if (theSeries->recvSelf(cTag, theChannel, theBroker) < 0) {
726 opserr << "LoadPattern::recvSelf - the TimeSeries failed to recv\n";
727 return -3;
728 }
729 }
730
731 /*
732 if (theChannel.isDatastore() == 1) {
733 static ID theLastSendTag(1);
734 if (theChannel.recvID(myDbTag,0,theLastSendTag) == 0)
735 lastGeoSendTag = theLastSendTag(0);
736 }

Callers

nothing calls this directly

Calls 15

clearAllMethod · 0.95
addNodalLoadMethod · 0.95
addElementalLoadMethod · 0.95
addSP_ConstraintMethod · 0.95
getDbTagMethod · 0.45
recvIDMethod · 0.45
setTagMethod · 0.45
recvVectorMethod · 0.45
getNewTimeSeriesMethod · 0.45
getClassTagMethod · 0.45
setDbTagMethod · 0.45
getTagMethod · 0.45

Tested by

no test coverage detected