void setID(int index, int value); Method to set the correSPonding index of the ID to value.
| 101 | // void setID(int index, int value); |
| 102 | // Method to set the correSPonding index of the ID to value. |
| 103 | int |
| 104 | LagrangeSP_FE::setID(void) |
| 105 | { |
| 106 | int result = 0; |
| 107 | |
| 108 | // first determine the IDs in myID for those DOFs marked |
| 109 | // as constrained DOFs, this is obtained from the DOF_Group |
| 110 | // associated with the constrained node |
| 111 | DOF_Group *theNodesDOFs = theNode->getDOF_GroupPtr(); |
| 112 | if (theNodesDOFs == 0) { |
| 113 | opserr << "WARNING LagrangeSP_FE::setID(void)"; |
| 114 | opserr << " - no DOF_Group with Constrained Node\n"; |
| 115 | return -1; |
| 116 | } |
| 117 | |
| 118 | int restrainedDOF = theSP->getDOF_Number(); |
| 119 | const ID &theNodesID = theNodesDOFs->getID(); |
| 120 | |
| 121 | if (restrainedDOF < 0 || restrainedDOF >= theNodesID.Size()) { |
| 122 | opserr << "WARNING LagrangeSP_FE::setID(void)"; |
| 123 | opserr << " - restrained DOF invalid\n"; |
| 124 | return -2; |
| 125 | } |
| 126 | |
| 127 | myID(0) = theNodesID(restrainedDOF); |
| 128 | myID(1) = (theDofGroup->getID())(0); |
| 129 | |
| 130 | return result; |
| 131 | } |
| 132 | |
| 133 | const Matrix & |
| 134 | LagrangeSP_FE::getTangent(Integrator *theIntegrator) |
nothing calls this directly
no test coverage detected