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

Function OPS_AllocateElement

SRC/api/elementAPI_TCL.cpp:913–940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911
912extern "C"
913int OPS_AllocateElement(eleObject * theEle, int* matTags, int* matType) {
914 if (theEle->nNode > 0)
915 theEle->node = new int[theEle->nNode];
916
917 if (theEle->nParam > 0)
918 theEle->param = new double[theEle->nParam];
919
920 if (theEle->nState > 0) {
921 theEle->cState = new double[theEle->nState];
922 theEle->tState = new double[theEle->nState];
923 }
924
925 int numMat = theEle->nMat;
926 if (numMat > 0)
927 theEle->mats = new matObject * [numMat];
928
929
930 for (int i = 0; i < numMat; i++) {
931 /* opserr << "AllocateElement - matTag " << matTags[i] << "\n"; */
932
933 matObject* theMat = OPS_GetMaterial(&(matTags[i]), matType);
934 // matObject *theMat = OPS_GetMaterial(&(matTags[i]));
935
936 theEle->mats[i] = theMat;
937 }
938
939 return 0;
940}
941
942extern "C"
943int OPS_GetNodeCrd(int* nodeTag, int* sizeCrd, double* data)

Callers

nothing calls this directly

Calls 1

OPS_GetMaterialFunction · 0.70

Tested by

no test coverage detected