| 677 | |
| 678 | |
| 679 | int |
| 680 | LoadPattern::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 | } |
nothing calls this directly
no test coverage detected