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

Method recvSelf

DEVELOPER/core/PlateFiberMaterial.cpp:504–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504int
505PlateFiberMaterial::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
506{
507 int res = 0;
508
509 // recv an id containg the tag and associated materials class and db tags
510 static ID idData(3);
511 res = theChannel.recvID(this->getDbTag(), commitTag, idData);
512 if (res < 0) {
513 opserr << "PlateFiberMaterial::sendSelf() - failed to send id data\n";
514 return res;
515 }
516
517 this->setTag(idData(0));
518 int matClassTag = idData(1);
519
520 // if the associated material has not yet been created or is of the wrong type
521 // create a new material for recvSelf later
522 if (theMaterial == 0 || theMaterial->getClassTag() != matClassTag) {
523 if (theMaterial != 0)
524 delete theMaterial;
525 theMaterial = theBroker.getNewNDMaterial(matClassTag);
526 if (theMaterial == 0) {
527 opserr << "PlateFiberMaterial::recvSelf() - failed to get a material of type: " << matClassTag << endln;
528 return -1;
529 }
530 }
531 theMaterial->setDbTag(idData(2));
532
533 // recv a vector containing strains and set the strains
534 static Vector vecData(1);
535 res = theChannel.recvVector(this->getDbTag(), commitTag, vecData);
536 if (res < 0) {
537 opserr << "PlateFiberMaterial::sendSelf() - failed to send vector data\n";
538 return res;
539 }
540
541 Cstrain22 = vecData(0);
542 Tstrain22 = Cstrain22;
543
544 // now receive the assocaited materials data
545 res = theMaterial->recvSelf(commitTag, theChannel, theBroker);
546 if (res < 0)
547 opserr << "PlateFiberMaterial::sendSelf() - failed to send vector material\n";
548
549 return res;
550}
551
552int
553PlateFiberMaterial::setParameter(const char **argv, int argc,

Callers

nothing calls this directly

Calls 7

recvIDMethod · 0.45
getDbTagMethod · 0.45
setTagMethod · 0.45
getClassTagMethod · 0.45
getNewNDMaterialMethod · 0.45
setDbTagMethod · 0.45
recvVectorMethod · 0.45

Tested by

no test coverage detected