| 450 | } |
| 451 | |
| 452 | int |
| 453 | BeamFiberMaterial2d::sendSelf(int commitTag, Channel &theChannel) |
| 454 | { |
| 455 | int res = 0; |
| 456 | |
| 457 | // put tag and associated materials class and database tags into an id and send it |
| 458 | static ID idData(3); |
| 459 | idData(0) = this->getTag(); |
| 460 | idData(1) = theMaterial->getClassTag(); |
| 461 | int matDbTag = theMaterial->getDbTag(); |
| 462 | if (matDbTag == 0) { |
| 463 | matDbTag = theChannel.getDbTag(); |
| 464 | theMaterial->setDbTag(matDbTag); |
| 465 | } |
| 466 | idData(2) = matDbTag; |
| 467 | |
| 468 | res = theChannel.sendID(this->getDbTag(), commitTag, idData); |
| 469 | if (res < 0) { |
| 470 | opserr << "BeamFiberMaterial2d::sendSelf() - failed to send id data\n"; |
| 471 | return res; |
| 472 | } |
| 473 | |
| 474 | // put the strains in a vector and send it |
| 475 | static Vector vecData(4); |
| 476 | vecData(0) = Cstrain22; |
| 477 | vecData(1) = Cstrain33; |
| 478 | vecData(2) = Cgamma31; |
| 479 | vecData(3) = Cgamma23; |
| 480 | |
| 481 | res = theChannel.sendVector(this->getDbTag(), commitTag, vecData); |
| 482 | if (res < 0) { |
| 483 | opserr << "BeamFiberMaterial2d::sendSelf() - failed to send vector data\n"; |
| 484 | return res; |
| 485 | } |
| 486 | |
| 487 | // now send the materials data |
| 488 | res = theMaterial->sendSelf(commitTag, theChannel); |
| 489 | if (res < 0) |
| 490 | opserr << "BeamFiberMaterial2d::sendSelf() - failed to send vector material\n"; |
| 491 | |
| 492 | return res; |
| 493 | } |
| 494 | |
| 495 | int |
| 496 | BeamFiberMaterial2d::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker) |
nothing calls this directly
no test coverage detected