| 475 | } |
| 476 | |
| 477 | int |
| 478 | ZeroLengthSection::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker) |
| 479 | { |
| 480 | int res = 0; |
| 481 | |
| 482 | int dataTag = this->getDbTag(); |
| 483 | |
| 484 | // ZeroLengthSection creates an ID, receives the ID and then sets the |
| 485 | // internal data with the data in the ID |
| 486 | |
| 487 | static ID idData(9); |
| 488 | |
| 489 | res += theChannel.recvID(dataTag, commitTag, idData); |
| 490 | if (res < 0) { |
| 491 | opserr << "ZeroLengthSection::recvSelf -- failed to receive ID data\n"; |
| 492 | return res; |
| 493 | } |
| 494 | |
| 495 | res += theChannel.recvMatrix(dataTag, commitTag, transformation); |
| 496 | if (res < 0) { |
| 497 | opserr << "ZeroLengthSection::recvSelf -- failed to receive transformation Matrix\n"; |
| 498 | return res; |
| 499 | } |
| 500 | |
| 501 | this->setTag(idData(0)); |
| 502 | dimension = idData(1); |
| 503 | numDOF = idData(2); |
| 504 | connectedExternalNodes(0) = idData(4); |
| 505 | connectedExternalNodes(1) = idData(5); |
| 506 | useRayleighDamping =idData(8); |
| 507 | |
| 508 | // Check that there is correct number of materials, reallocate if needed |
| 509 | if (order != idData(3)) { |
| 510 | |
| 511 | order = idData(3); |
| 512 | |
| 513 | // Allocate transformation matrix |
| 514 | if (A != 0) |
| 515 | delete A; |
| 516 | |
| 517 | A = new Matrix(order, numDOF); |
| 518 | |
| 519 | if (A == 0) { |
| 520 | opserr << "ZeroLengthSection::recvSelf -- failed to allocate transformation Matrix\n"; |
| 521 | exit(-1); |
| 522 | } |
| 523 | |
| 524 | // Allocate section deformation vector |
| 525 | if (v != 0) |
| 526 | delete v; |
| 527 | |
| 528 | v = new Vector(order); |
| 529 | |
| 530 | if (v == 0) { |
| 531 | opserr << "ZeroLengthSection::recvSelf -- failed to allocate deformation Vector\n"; |
| 532 | exit(-1); |
| 533 | } |
| 534 |
nothing calls this directly
no test coverage detected