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

Method recvSelf

DEVELOPER/core/PlaneStrainMaterial.cpp:323–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323int
324PlaneStrainMaterial::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
325{
326 int res = 0;
327
328 // recv an id containg the tag and associated materials class and db tags
329 static ID idData(3);
330 res = theChannel.sendID(this->getDbTag(), commitTag, idData);
331 if (res < 0) {
332 opserr << "PlaneStrainMaterial::sendSelf() - failed to send id data\n";
333 return res;
334 }
335
336 this->setTag(idData(0));
337 int matClassTag = idData(1);
338
339 // if the associated material has not yet been created or is of the wrong type
340 // create a new material for recvSelf later
341 if (theMaterial == 0 || theMaterial->getClassTag() != matClassTag) {
342 if (theMaterial != 0)
343 delete theMaterial;
344 theMaterial = theBroker.getNewNDMaterial(matClassTag);
345 if (theMaterial == 0) {
346 opserr << "PlaneStrainMaterial::recvSelf() - failed to get a material of type: " << matClassTag << endln;
347 return -1;
348 }
349 }
350 theMaterial->setDbTag(idData(2));
351
352 // now receive the materials data
353 res = theMaterial->recvSelf(commitTag, theChannel, theBroker);
354 if (res < 0)
355 opserr << "PlaneStrainMaterial::sendSelf() - failed to send vector material\n";
356
357 return res;
358}
359
360int
361PlaneStrainMaterial::setParameter(const char **argv, int argc,

Callers

nothing calls this directly

Calls 6

sendIDMethod · 0.45
getDbTagMethod · 0.45
setTagMethod · 0.45
getClassTagMethod · 0.45
getNewNDMaterialMethod · 0.45
setDbTagMethod · 0.45

Tested by

no test coverage detected