MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / removeMP_Constraints

Method removeMP_Constraints

DEVELOPER/core/Domain.cpp:1172–1201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1170
1171
1172int
1173Domain::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
1204Parameter *

Callers

nothing calls this directly

Calls 4

domainChangeMethod · 0.95
getNodeConstrainedMethod · 0.45
getTagMethod · 0.45
removeComponentMethod · 0.45

Tested by

no test coverage detected