MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / recvSelf

Method recvSelf

SRC/domain/node/Node.cpp:1552–1726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1550}
1551
1552int
1553Node::recvSelf(int cTag, Channel &theChannel,
1554 FEM_ObjectBroker &theBroker)
1555{
1556 int res = 0;
1557 int dataTag = this->getDbTag();
1558
1559
1560 ID data(14);
1561 res = theChannel.recvID(dataTag, cTag, data);
1562 if (res < 0) {
1563 opserr << "Node::recvSelf() - failed to receive ID data\n";
1564 return res;
1565 }
1566
1567 this->setTag(data(0));
1568 numberDOF = data(1);
1569 int numberCrd = data(7);
1570
1571 dbTag1 = data(8);
1572 dbTag2 = data(9);
1573 dbTag3 = data(10);
1574 dbTag4 = data(11);
1575
1576
1577 // create a Vector to hold coordinates IF one needed
1578 if (Crd == 0) {
1579 Crd = new Vector(numberCrd);
1580 }
1581
1582 // check we did not run out of memory
1583 if (Crd == 0) {
1584 opserr << "Node::recvSelf() - out of memory creating Coordinate vector\n";
1585 return -1;
1586 }
1587
1588 if (theChannel.recvVector(dataTag, cTag, *Crd) < 0) {
1589 opserr << "Node::recvSelf() - failed to receive the Coordinate vector\n";
1590 return -2;
1591 }
1592
1593 if (data(2) == 0) {
1594 // create the disp vectors if node is a total blank
1595 if (commitDisp == 0)
1596 this->createDisp();
1597
1598 // recv the committed disp
1599 if (theChannel.recvVector(dbTag1, cTag, *commitDisp) < 0) {
1600 opserr << "Node::recvSelf - failed to receive Disp data\n";
1601 return res;
1602 }
1603
1604 // set the trial quantities equal to committed
1605 for (int i=0; i<numberDOF; i++)
1606 disp[i] = disp[i+numberDOF]; // set trial equal committed
1607
1608 } else if (commitDisp != 0) {
1609 // if going back to initial we will just zero the vectors

Callers

nothing calls this directly

Calls 11

createDispMethod · 0.95
createVelMethod · 0.95
createAccelMethod · 0.95
exitFunction · 0.85
getDbTagMethod · 0.45
recvIDMethod · 0.45
setTagMethod · 0.45
recvVectorMethod · 0.45
ZeroMethod · 0.45
recvMatrixMethod · 0.45
noRowsMethod · 0.45

Tested by

no test coverage detected