| 321 | } |
| 322 | |
| 323 | int |
| 324 | PlaneStrainMaterial::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 | |
| 360 | int |
| 361 | PlaneStrainMaterial::setParameter(const char **argv, int argc, |
nothing calls this directly
no test coverage detected