| 436 | } |
| 437 | |
| 438 | int |
| 439 | PileToe3D::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker) |
| 440 | { |
| 441 | int res; |
| 442 | int dataTag = this->getDbTag(); |
| 443 | |
| 444 | // PileToe3D creates a Vector, receives the Vector and then sets the |
| 445 | // internal data with the data in the Vector |
| 446 | static Vector data(6); |
| 447 | res = theChannel.recvVector(dataTag, commitTag, data); |
| 448 | if (res < 0) { |
| 449 | opserr <<"WARNING PileToe3D::recvSelf() - failed to receive Vector\n"; |
| 450 | return -1; |
| 451 | } |
| 452 | |
| 453 | this->setTag((int)data(0)); |
| 454 | mRadius = data(1); |
| 455 | mSubgradeCoeff = data(2); |
| 456 | mCC = data(3); |
| 457 | |
| 458 | MyTag = (int)data(0); |
| 459 | |
| 460 | // PileToe3D now receives the tags of it's one external node |
| 461 | res = theChannel.recvID(dataTag, commitTag, externalNodes); |
| 462 | if (res < 0) { |
| 463 | opserr <<"WARNING PileToe3D::recvSelf() - " << this->getTag() << " failed to receive ID\n"; |
| 464 | return -2; |
| 465 | } |
| 466 | |
| 467 | // PileToe3D now receives the tags of it's two beam external nodes |
| 468 | res = theChannel.recvID(dataTag, commitTag, externalBNodes); |
| 469 | if (res < 0) { |
| 470 | opserr <<"WARNING PileToe3D::recvSelf() - " << this->getTag() << " failed to receive ID\n"; |
| 471 | return -2; |
| 472 | } |
| 473 | |
| 474 | int crdClass = (int)data(4); |
| 475 | int crdDb = (int)data(5); |
| 476 | |
| 477 | // check if we have a material object already & if we do if of right type |
| 478 | if ((crdTransf == 0) || (crdTransf->getClassTag() != crdClass)) { |
| 479 | |
| 480 | // if old one .. delete it |
| 481 | if (crdTransf != 0) |
| 482 | delete crdTransf; |
| 483 | |
| 484 | // create a new material object |
| 485 | crdTransf = theBroker.getNewCrdTransf(crdClass); |
| 486 | |
| 487 | if (crdTransf == 0) { |
| 488 | opserr <<"WARNING PileToe3D::recvSelf() - " << this->getTag() |
| 489 | << " failed to get a blank CrdTransf of type " << crdClass << endln; |
| 490 | return -3; |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | crdTransf->setDbTag(crdDb); // note: we set the dbTag before we receive the material |
| 495 |
nothing calls this directly
no test coverage detected