| 1057 | |
| 1058 | |
| 1059 | int |
| 1060 | Domain::removeSP_Constraint(int theNode, int theDOF, int loadPatternTag) |
| 1061 | { |
| 1062 | SP_Constraint *theSP =0; |
| 1063 | bool found = false; |
| 1064 | int spTag = 0; |
| 1065 | |
| 1066 | if (loadPatternTag == -1) { |
| 1067 | SP_ConstraintIter &theSPs = this->getSPs(); |
| 1068 | while ((found == false) && ((theSP = theSPs()) != 0)) { |
| 1069 | int nodeTag = theSP->getNodeTag(); |
| 1070 | int dof = theSP->getDOF_Number(); |
| 1071 | if (nodeTag == theNode && dof == theDOF) { |
| 1072 | spTag = theSP->getTag(); |
| 1073 | found = true; |
| 1074 | } |
| 1075 | } |
| 1076 | |
| 1077 | } else { |
| 1078 | |
| 1079 | LoadPattern *thePattern = this->getLoadPattern(loadPatternTag); |
| 1080 | if (thePattern != 0) { |
| 1081 | SP_ConstraintIter &theSPs = thePattern->getSPs(); |
| 1082 | while ((found == false) && ((theSP = theSPs()) != 0)) { |
| 1083 | int nodeTag = theSP->getNodeTag(); |
| 1084 | int dof = theSP->getDOF_Number(); |
| 1085 | if (nodeTag == theNode && dof == theDOF) { |
| 1086 | spTag = theSP->getTag(); |
| 1087 | found = true; |
| 1088 | } |
| 1089 | } |
| 1090 | } |
| 1091 | } |
| 1092 | |
| 1093 | if (found == true) |
| 1094 | theSP = this->removeSP_Constraint(spTag); |
| 1095 | |
| 1096 | // mark the domain has having changed regardless if SP constrain was there or not |
| 1097 | this->domainChange(); |
| 1098 | |
| 1099 | if (theSP != 0) { |
| 1100 | delete theSP; |
| 1101 | return 1; |
| 1102 | } |
| 1103 | |
| 1104 | return 0; |
| 1105 | } |
| 1106 | |
| 1107 | SP_Constraint * |
| 1108 | Domain::removeSP_Constraint(int tag) |
nothing calls this directly
no test coverage detected