| 1170 | |
| 1171 | |
| 1172 | int |
| 1173 | Domain::removeMP_Constraints(int nodeTag) |
| 1174 | { |
| 1175 | ID tagsToRemove(0); int sizeTags = 0; |
| 1176 | MP_Constraint *theMP = 0; |
| 1177 | MP_ConstraintIter &theMPIter = this->getMPs(); |
| 1178 | while ((theMP = theMPIter()) != 0) { |
| 1179 | int cNode = theMP->getNodeConstrained(); |
| 1180 | if (cNode == nodeTag) { |
| 1181 | int mpTag = theMP->getTag(); |
| 1182 | tagsToRemove[sizeTags] = mpTag; |
| 1183 | sizeTags++; |
| 1184 | } |
| 1185 | } |
| 1186 | |
| 1187 | if (sizeTags == 0) |
| 1188 | return 0; |
| 1189 | |
| 1190 | for (int i=0; i<sizeTags; i++) { |
| 1191 | int tag = tagsToRemove(i); |
| 1192 | TaggedObject *mc = theMPs->removeComponent(tag); |
| 1193 | if (mc != 0) |
| 1194 | delete mc; |
| 1195 | } |
| 1196 | |
| 1197 | // mark the domain as having changed |
| 1198 | this->domainChange(); |
| 1199 | |
| 1200 | return sizeTags; |
| 1201 | } |
| 1202 | |
| 1203 | |
| 1204 | Parameter * |
nothing calls this directly
no test coverage detected