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

Method removeSP_Constraint

DEVELOPER/core/Domain.cpp:1059–1105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1057
1058
1059int
1060Domain::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
1107SP_Constraint *
1108Domain::removeSP_Constraint(int tag)

Callers

nothing calls this directly

Calls 6

getLoadPatternMethod · 0.95
domainChangeMethod · 0.95
getNodeTagMethod · 0.45
getDOF_NumberMethod · 0.45
getTagMethod · 0.45
removeComponentMethod · 0.45

Tested by

no test coverage detected