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

Method recvSelf

SRC/element/UWelements/PileToe3D.cpp:438–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438int
439PileToe3D::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
440{
441 int res;
442 int dataTag = this->getDbTag();
443
444 // PileToe3D creates a Vector, receives the Vector and then sets the
445 // internal data with the data in the Vector
446 static Vector data(6);
447 res = theChannel.recvVector(dataTag, commitTag, data);
448 if (res < 0) {
449 opserr <<"WARNING PileToe3D::recvSelf() - failed to receive Vector\n";
450 return -1;
451 }
452
453 this->setTag((int)data(0));
454 mRadius = data(1);
455 mSubgradeCoeff = data(2);
456 mCC = data(3);
457
458 MyTag = (int)data(0);
459
460 // PileToe3D now receives the tags of it's one external node
461 res = theChannel.recvID(dataTag, commitTag, externalNodes);
462 if (res < 0) {
463 opserr <<"WARNING PileToe3D::recvSelf() - " << this->getTag() << " failed to receive ID\n";
464 return -2;
465 }
466
467 // PileToe3D now receives the tags of it's two beam external nodes
468 res = theChannel.recvID(dataTag, commitTag, externalBNodes);
469 if (res < 0) {
470 opserr <<"WARNING PileToe3D::recvSelf() - " << this->getTag() << " failed to receive ID\n";
471 return -2;
472 }
473
474 int crdClass = (int)data(4);
475 int crdDb = (int)data(5);
476
477 // check if we have a material object already & if we do if of right type
478 if ((crdTransf == 0) || (crdTransf->getClassTag() != crdClass)) {
479
480 // if old one .. delete it
481 if (crdTransf != 0)
482 delete crdTransf;
483
484 // create a new material object
485 crdTransf = theBroker.getNewCrdTransf(crdClass);
486
487 if (crdTransf == 0) {
488 opserr <<"WARNING PileToe3D::recvSelf() - " << this->getTag()
489 << " failed to get a blank CrdTransf of type " << crdClass << endln;
490 return -3;
491 }
492 }
493
494 crdTransf->setDbTag(crdDb); // note: we set the dbTag before we receive the material
495

Callers

nothing calls this directly

Calls 8

getDbTagMethod · 0.45
recvVectorMethod · 0.45
setTagMethod · 0.45
recvIDMethod · 0.45
getTagMethod · 0.45
getClassTagMethod · 0.45
getNewCrdTransfMethod · 0.45
setDbTagMethod · 0.45

Tested by

no test coverage detected