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

Method record

SRC/recorder/PatternRecorder.cpp:86–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86int
87PatternRecorder::record(int commitTag, double timeStamp)
88{
89 double value = 0.0;
90
91 // where relDeltaTTol is the maximum reliable ratio between analysis time step and deltaT
92 // and provides tolerance for floating point precision (see floating-point-tolerance-for-recorder-time-step.md)
93 if (deltaT == 0.0 || timeStamp - nextTimeStampToRecord >= -deltaT * relDeltaTTol) {
94
95 if (deltaT != 0.0)
96 nextTimeStampToRecord = timeStamp + deltaT;
97
98 LoadPattern *pattern = theDomain->getLoadPattern(thePattern);
99 if (pattern != 0) {
100 value = pattern->getLoadFactor();
101 }
102 }
103
104 // write them to the file
105 if (flag == 1)
106 theFile << timeStamp << " ";
107 else if (flag == 2)
108 theFile << timeStamp << " ";
109
110 theFile << value << " ";
111
112 theFile << endln;
113 theFile.flush();
114
115 return 0;
116}
117
118int
119PatternRecorder::playback(int commitTag)

Callers

nothing calls this directly

Calls 3

getLoadPatternMethod · 0.45
getLoadFactorMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected