| 82 | // Method to set the corresponding index of the ID to value. |
| 83 | |
| 84 | int |
| 85 | PenaltySP_FE::setID(void) |
| 86 | { |
| 87 | DOF_Group *theNodesDOFs = theNode->getDOF_GroupPtr(); |
| 88 | if (theNodesDOFs == 0) { |
| 89 | opserr << "WARNING PenaltySP_FE::setID(void) - no DOF_Group with Node\n"; |
| 90 | return -2; |
| 91 | } |
| 92 | myDOF_Groups(0) = theNodesDOFs->getTag(); |
| 93 | |
| 94 | int restrainedDOF = theSP->getDOF_Number(); |
| 95 | if (restrainedDOF < 0 || restrainedDOF >= theNode->getNumberDOF()) { |
| 96 | opserr << "WARNING PenaltySP_FE::setID(void) - unknown DOF "; |
| 97 | opserr << restrainedDOF << " at Node\n"; |
| 98 | return -3; |
| 99 | } |
| 100 | const ID &theNodesID = theNodesDOFs->getID(); |
| 101 | if (restrainedDOF >= theNodesID.Size()) { |
| 102 | opserr << "WARNING PenaltySP_FE::setID(void) - "; |
| 103 | opserr << " Nodes DOF_Group too small\n"; |
| 104 | return -4; |
| 105 | } |
| 106 | |
| 107 | myID(0) = theNodesID(restrainedDOF); |
| 108 | |
| 109 | return 0; |
| 110 | } |
| 111 | |
| 112 | |
| 113 | const Matrix & |
nothing calls this directly
no test coverage detected