| 359 | |
| 360 | extern "C" |
| 361 | int OPS_AllocateElement(eleObject *theEle, int *matTags, int *matType){ |
| 362 | if (theEle->nNode > 0) |
| 363 | theEle->node = new int[theEle->nNode]; |
| 364 | |
| 365 | if (theEle->nParam > 0) |
| 366 | theEle->param = new double[theEle->nParam]; |
| 367 | |
| 368 | if (theEle->nState > 0) { |
| 369 | theEle->cState = new double[theEle->nState]; |
| 370 | theEle->tState = new double[theEle->nState]; |
| 371 | } |
| 372 | |
| 373 | int numMat = theEle->nMat; |
| 374 | if (numMat > 0) |
| 375 | theEle->mats = new matObject *[numMat]; |
| 376 | |
| 377 | |
| 378 | for (int i=0; i< numMat; i++) { |
| 379 | /* opserr << "AllocateElement - matTag " << matTags[i] << "\n"; */ |
| 380 | |
| 381 | matObject *theMat = OPS_GetMaterial(&(matTags[i]), matType); |
| 382 | // matObject *theMat = OPS_GetMaterial(&(matTags[i])); |
| 383 | |
| 384 | theEle->mats[i] = theMat; |
| 385 | } |
| 386 | |
| 387 | return 0; |
| 388 | } |
| 389 | |
| 390 | |
| 391 |
nothing calls this directly
no test coverage detected