| 250 | // Method to set the corresponding index of the ID to value. |
| 251 | |
| 252 | int |
| 253 | FE_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 | |
| 287 | const Matrix & |
nothing calls this directly
no test coverage detected