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

Method record

SRC/recorder/RemoveRecorder.cpp:701–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

699
700
701int
702// changed
703RemoveRecorder::record(int commitTag, double timeStamp)
704{
705 // currentTime = timeStamp; // store so that elimElem() and elimNode() can write to the
706#ifdef MMTDEBUG
707 opserr<<"entering record()"<<endln;
708#endif
709 int result = 0;
710 // where relDeltaTTol is the maximum reliable ratio between analysis time step and deltaT
711 // and provides tolerance for floating point precision (see floating-point-tolerance-for-recorder-time-step.md)
712 if (deltaT == 0.0 || timeStamp - nextTimeStampToRecord >= -deltaT * relDeltaTTol) {
713
714 if (deltaT != 0.0)
715 nextTimeStampToRecord = timeStamp + deltaT;
716
717 if (int(nodeTag) != 0) {
718
719 // check if node had already been removed
720 int remFlag = 0;
721 for (int m =0; m<RemoveRecorder::numRemNodes; m++) {
722 if (nodeTag == RemoveRecorder::remNodeList[m]) {
723 remFlag = 1;
724#ifdef MMTDEBUG
725 opserr<<" node "<<nodeTag<<" already removed "<<endln;
726#endif
727 }
728 }
729
730 if (remFlag == 0) {
731
732 // go over connected elements to check connectivity
733#ifdef MMTDEBUG
734 opserr<<" checking node "<<nodeTag<<endln;
735#endif
736 int numConEles = numEles;
737 for (int j=0; j<numEles; j++) {
738 for (int m =0; m<RemoveRecorder::numRemEles; m++) {
739 if (eleTags[j] == RemoveRecorder::remEleList[m]) {
740 numConEles --;
741#ifdef MMTDEBUG
742 opserr<<" element "<<eleTags[j]<<" already removed from node "<<nodeTag<<" "<<numConEles<<" elements left"<<endln;
743#endif
744 }
745 }
746 }
747
748
749 // if all surrounding elements have been removed, eliminate node
750 if (numConEles == 0) {
751 Node* theNode = theDomain->getNode(nodeTag);
752 if (theNode != 0)
753 elimNode(nodeTag, timeStamp);
754 // remNodeList[numRemNodes] = nodeTag;
755 // remNodes[numRemNodes] = theNode;
756 // numRemNodes ++;
757#ifdef MMTDEBUG
758 opserr<<"Node removal # "<<numRemNodes<<" of node # "<<remNodeList[numRemNodes-1]<<endln;

Callers

nothing calls this directly

Calls 7

checkEleRemovalMethod · 0.95
updateNodalMassesMethod · 0.95
elimElemMethod · 0.95
elimSecondariesMethod · 0.95
getNodeMethod · 0.45
getElementMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected