| 329 | } |
| 330 | |
| 331 | int |
| 332 | InitStressNDMaterial::sendSelf(int cTag, Channel &theChannel) |
| 333 | { |
| 334 | if (theMaterial == 0) { |
| 335 | opserr << "InitStressNDMaterial::sendSelf() - theMaterial is null, nothing to send" << endln; |
| 336 | return -1; |
| 337 | } |
| 338 | |
| 339 | int dbTag = this->getDbTag(); |
| 340 | |
| 341 | static ID dataID(5); |
| 342 | dataID(0) = this->getTag(); |
| 343 | dataID(1) = theMaterial->getClassTag(); |
| 344 | int matDbTag = theMaterial->getDbTag(); |
| 345 | if ( matDbTag == 0) { |
| 346 | matDbTag = theChannel.getDbTag(); |
| 347 | theMaterial->setDbTag(matDbTag); |
| 348 | } |
| 349 | dataID(2) = matDbTag; |
| 350 | if (theChannel.sendID(dbTag, cTag, dataID) < 0) { |
| 351 | opserr << "InitStressNDMaterial::sendSelf() - failed to send the ID\n"; |
| 352 | return -1; |
| 353 | } |
| 354 | dataID(3) = numDim; |
| 355 | int order = theMaterial->getOrder(); |
| 356 | dataID(4) = order; |
| 357 | |
| 358 | Vector dataVec(2*order); |
| 359 | for (int i = 0; i < order; i++) { |
| 360 | dataVec(i) = sigInit(i); |
| 361 | dataVec(i+order) = epsInit(i); |
| 362 | } |
| 363 | |
| 364 | if (theChannel.sendVector(dbTag, cTag, dataVec) < 0) { |
| 365 | opserr << "InitStressNDMaterial::sendSelf() - failed to send the Vector\n"; |
| 366 | return -2; |
| 367 | } |
| 368 | |
| 369 | if (theMaterial->sendSelf(cTag, theChannel) < 0) { |
| 370 | opserr << "InitStressNDMaterial::sendSelf() - failed to send the Material\n"; |
| 371 | return -3; |
| 372 | } |
| 373 | |
| 374 | return 0; |
| 375 | } |
| 376 | |
| 377 | int |
| 378 | InitStressNDMaterial::recvSelf(int cTag, Channel &theChannel, |
nothing calls this directly
no test coverage detected