| 394 | } |
| 395 | |
| 396 | int |
| 397 | FiberSection::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker) |
| 398 | { |
| 399 | int res = 0; |
| 400 | |
| 401 | // Create an ID for tag, number and size of fibers, and section order |
| 402 | static ID data(5); |
| 403 | |
| 404 | // Receive the data ID |
| 405 | res += theChannel.recvID(this->getDbTag(), commitTag, data); |
| 406 | if (res < 0) { |
| 407 | opserr << "FiberSection::recvSelf -- failed to receive data ID"; |
| 408 | return res; |
| 409 | } |
| 410 | |
| 411 | this->setTag(data(0)); |
| 412 | numFibers = data(1); |
| 413 | sizeFibers = data(2); |
| 414 | order = data(3); |
| 415 | otherDbTag = data(4); |
| 416 | |
| 417 | // Check that section variables are of the right size, allocate if needed |
| 418 | if (order > 0) { |
| 419 | if (e == 0) |
| 420 | e = new Vector(order); |
| 421 | if (eCommit == 0) |
| 422 | eCommit = new Vector(order); |
| 423 | if (s == 0) |
| 424 | s = new Vector(order); |
| 425 | if (ks == 0) |
| 426 | ks = new Matrix(order,order); |
| 427 | if (code == 0) |
| 428 | code = new ID(order); |
| 429 | |
| 430 | if (e->Size() != order) { |
| 431 | delete e; |
| 432 | e = new Vector(order); |
| 433 | } |
| 434 | if (eCommit->Size() != order) { |
| 435 | delete eCommit; |
| 436 | eCommit = new Vector(order); |
| 437 | } |
| 438 | if (s->Size() != order) { |
| 439 | delete s; |
| 440 | s = new Vector(order); |
| 441 | } |
| 442 | if (ks->noRows() != order) { |
| 443 | delete ks; |
| 444 | ks = new Matrix(order,order); |
| 445 | } |
| 446 | if (code->Size() != order) { |
| 447 | delete code; |
| 448 | code = new ID(order); |
| 449 | } |
| 450 | |
| 451 | // Receive the committed section deformation |
| 452 | res += theChannel.recvVector(this->getDbTag(), commitTag, *eCommit); |
| 453 | if (res < 0) { |
nothing calls this directly
no test coverage detected