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

Function OPS_AllocateElement

SRC/api/elementAPI_Dummy.cpp:361–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359
360extern "C"
361int 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

Callers

nothing calls this directly

Calls 1

OPS_GetMaterialFunction · 0.70

Tested by

no test coverage detected