| 442 | } |
| 443 | |
| 444 | int |
| 445 | BeamFiberMaterial::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker) |
| 446 | { |
| 447 | int res = 0; |
| 448 | |
| 449 | // recv an id containing the tag and associated materials class and db tags |
| 450 | static ID idData(3); |
| 451 | res = theChannel.sendID(this->getDbTag(), commitTag, idData); |
| 452 | if (res < 0) { |
| 453 | opserr << "BeamFiberMaterial::sendSelf() - failed to send id data\n"; |
| 454 | return res; |
| 455 | } |
| 456 | |
| 457 | this->setTag(idData(0)); |
| 458 | int matClassTag = idData(1); |
| 459 | |
| 460 | // if the associated material has not yet been created or is of the wrong type |
| 461 | // create a new material for recvSelf later |
| 462 | if (theMaterial == 0 || theMaterial->getClassTag() != matClassTag) { |
| 463 | if (theMaterial != 0) |
| 464 | delete theMaterial; |
| 465 | theMaterial = theBroker.getNewNDMaterial(matClassTag); |
| 466 | if (theMaterial == 0) { |
| 467 | opserr << "BeamFiberMaterial::recvSelf() - failed to get a material of type: " << matClassTag << endln; |
| 468 | return -1; |
| 469 | } |
| 470 | } |
| 471 | theMaterial->setDbTag(idData(2)); |
| 472 | |
| 473 | // recv a vector containing strains and set the strains |
| 474 | static Vector vecData(3); |
| 475 | res = theChannel.recvVector(this->getDbTag(), commitTag, vecData); |
| 476 | if (res < 0) { |
| 477 | opserr << "BeamFiberMaterial::sendSelf() - failed to send vector data\n"; |
| 478 | return res; |
| 479 | } |
| 480 | |
| 481 | Cstrain22 = vecData(0); |
| 482 | Cstrain33 = vecData(1); |
| 483 | Cgamma23 = vecData(2); |
| 484 | |
| 485 | Tstrain22 = Cstrain22; |
| 486 | Tstrain33 = Cstrain33; |
| 487 | Tgamma23 = Cgamma23; |
| 488 | |
| 489 | // now receive the materials data |
| 490 | res = theMaterial->recvSelf(commitTag, theChannel, theBroker); |
| 491 | if (res < 0) |
| 492 | opserr << "BeamFiberMaterial::sendSelf() - failed to send vector material\n"; |
| 493 | |
| 494 | return res; |
| 495 | } |
| 496 | |
| 497 | int |
| 498 | BeamFiberMaterial::setParameter(const char **argv, int argc, |
nothing calls this directly
no test coverage detected