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

Method setID

SRC/analysis/fe_ele/FE_Element.cpp:252–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250// Method to set the corresponding index of the ID to value.
251
252int
253FE_Element::setID(void)
254{
255 int current = 0;
256
257 if (theModel == 0) {
258 opserr << "WARNING FE_Element::setID() - no AnalysisModel set\n";
259 return -1;
260 }
261
262 int numGrps = myDOF_Groups.Size();
263 for (int i=0; i<numGrps; i++) {
264 int tag = myDOF_Groups(i);
265
266 DOF_Group *dofPtr = theModel->getDOF_GroupPtr(tag);
267 if (dofPtr == 0) {
268 opserr << "WARNING FE_Element::setID: 0 DOF_Group Pointer\n";
269 return -2;
270 }
271
272 const ID &theDOFid = dofPtr->getID();
273
274 for (int j=0; j<theDOFid.Size(); j++)
275 if (current < numDOF)
276 myID(current++) = theDOFid(j);
277 else {
278 opserr << "WARNING FE_Element::setID() - numDOF and";
279 opserr << " number of dof at the DOF_Groups\n";
280 return -3;
281 }
282 }
283 return 0;
284}
285
286
287const Matrix &

Callers 10

numberDOFMethod · 0.45
numberDOFMethod · 0.45
numberDOFMethod · 0.45
handleMethod · 0.45
doneNumberingDOFMethod · 0.45
handleMethod · 0.45
handleMethod · 0.45
doneNumberingDOFMethod · 0.45
handleMethod · 0.45
handleMethod · 0.45

Calls 3

getIDMethod · 0.80
SizeMethod · 0.45
getDOF_GroupPtrMethod · 0.45

Tested by

no test coverage detected