| 1038 | |
| 1039 | |
| 1040 | int |
| 1041 | RemoveRecorder::elimNode(int theNodeTag, double timeStamp) |
| 1042 | { |
| 1043 | // remove from domain but do not delete yet! |
| 1044 | Node *theNode = theDomain->removeNode(theNodeTag); |
| 1045 | |
| 1046 | // go through all load patterns and remove associated loads and constraints |
| 1047 | LoadPatternIter &theLoadPatterns = theDomain->getLoadPatterns(); |
| 1048 | LoadPattern *thePattern; |
| 1049 | |
| 1050 | while ((thePattern = theLoadPatterns()) != 0) { |
| 1051 | |
| 1052 | // start with nodal loads |
| 1053 | NodalLoadIter theLoads = thePattern->getNodalLoads(); |
| 1054 | NodalLoad *theLoad; |
| 1055 | |
| 1056 | // ID theLoadTags(0,12); |
| 1057 | // int cnt=0; |
| 1058 | while ((theLoad = theLoads()) != 0) { |
| 1059 | |
| 1060 | int theNode = theLoad->getNodeTag(); |
| 1061 | if (theNode == theNodeTag) { |
| 1062 | // theLoadTags[cnt] = theLoad->getTag(); |
| 1063 | // cnt++; |
| 1064 | #ifdef MMTDEBUG |
| 1065 | opserr<<"identified load pattern "<<theLoad->getTag()<<" acting on node "<<theNode<<endln; |
| 1066 | #endif |
| 1067 | NodalLoad *theNodalLoad = thePattern->removeNodalLoad(theLoad->getTag()); |
| 1068 | if (theNodalLoad != 0) { |
| 1069 | #ifdef MMTDEBUG |
| 1070 | opserr<<"deleting nodal load pattern "<<theLoad->getTag()<<endln; |
| 1071 | #endif |
| 1072 | delete theNodalLoad; |
| 1073 | } |
| 1074 | } |
| 1075 | } |
| 1076 | |
| 1077 | // for (int i=0; i<cnt; i++) { |
| 1078 | // NodalLoad *theNodalLoad = thePattern->removeNodalLoad(theLoadTags[i]); |
| 1079 | // if (theNodalLoad != 0) { |
| 1080 | // delete theNodalLoad; |
| 1081 | // #ifdef MMTDEBUG |
| 1082 | // opserr<<"deleting nodal load pattern "<<theLoadTags(i)<<endln; |
| 1083 | // #endif |
| 1084 | // } |
| 1085 | // } |
| 1086 | |
| 1087 | // follow with sp constraints |
| 1088 | SP_ConstraintIter &theSPs = thePattern->getSPs(); |
| 1089 | SP_Constraint *theSP; |
| 1090 | |
| 1091 | while ((theSP = theSPs()) != 0) { |
| 1092 | |
| 1093 | int spNode = theSP->getNodeTag(); |
| 1094 | if (spNode == theNodeTag) { |
| 1095 | // theSPTags[cnt] = theSP->getTag(); |
| 1096 | // cnt++; |
| 1097 | #ifdef MMTDEBUG |
no test coverage detected