| 423 | |
| 424 | |
| 425 | int |
| 426 | UniformExcitation::recvSelf(int commitTag, Channel &theChannel, |
| 427 | FEM_ObjectBroker &theBroker) |
| 428 | { |
| 429 | int dbTag = this->getDbTag(); |
| 430 | |
| 431 | static Vector data(6); |
| 432 | int res = theChannel.recvVector(dbTag, commitTag, data); |
| 433 | if (res < 0) { |
| 434 | opserr << "UniformExcitation::recvSelf() - channel failed to recv data\n"; |
| 435 | return res; |
| 436 | } |
| 437 | |
| 438 | this->setTag(int(data(0))); |
| 439 | theDof = int(data(1)); |
| 440 | vel0 = data(2); |
| 441 | fact = data(5); |
| 442 | int motionClassTag = int(data(3)); |
| 443 | int motionDbTag = int(data(4)); |
| 444 | |
| 445 | if (theMotion == 0 || theMotion->getClassTag() != motionClassTag) { |
| 446 | if (theMotion != 0) |
| 447 | delete theMotion; |
| 448 | theMotion = theBroker.getNewGroundMotion(motionClassTag); |
| 449 | if (theMotion == 0) { |
| 450 | opserr << "UniformExcitation::recvSelf() - could not create a grond motion\n"; |
| 451 | return -3; |
| 452 | } |
| 453 | |
| 454 | // have to set the motion in EarthquakePattern base class |
| 455 | if (numMotions == 0) |
| 456 | this->addMotion(*theMotion); |
| 457 | else |
| 458 | theMotions[0] = theMotion; |
| 459 | } |
| 460 | |
| 461 | theMotion->setDbTag(motionDbTag); |
| 462 | res = theMotion->recvSelf(commitTag, theChannel, theBroker); |
| 463 | if (res < 0) { |
| 464 | opserr << "UniformExcitation::recvSelf() - motion could not receive itself \n"; |
| 465 | return res; |
| 466 | } |
| 467 | |
| 468 | return 0; |
| 469 | } |
| 470 | |
| 471 | |
| 472 | void |
nothing calls this directly
no test coverage detected