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

Method elimNode

SRC/recorder/RemoveRecorder.cpp:1040–1173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1038
1039
1040int
1041RemoveRecorder::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

Callers 1

elimSecondariesMethod · 0.95

Calls 6

removeNodeMethod · 0.45
getNodeTagMethod · 0.45
getTagMethod · 0.45
removeNodalLoadMethod · 0.45
removeSP_ConstraintMethod · 0.45
revertToStartMethod · 0.45

Tested by

no test coverage detected