| 170 | } |
| 171 | |
| 172 | int |
| 173 | FilePlotter::record(int cTag, double timeStamp) |
| 174 | { |
| 175 | |
| 176 | // where relDeltaTTol is the maximum reliable ratio between analysis time step and deltaT |
| 177 | // and provides tolerance for floating point precision (see floating-point-tolerance-for-recorder-time-step.md) |
| 178 | if (deltaT == 0.0 || timeStamp - nextTimeStampToRecord >= -deltaT * relDeltaTTol) { |
| 179 | |
| 180 | if (deltaT != 0.0) |
| 181 | nextTimeStampToRecord = timeStamp + deltaT; |
| 182 | |
| 183 | if (fileName1 != 0 && fileName2 == 0) |
| 184 | return this->plotFile(); |
| 185 | else if (fileName1 != 0 && fileName2 != 0) |
| 186 | return this->plotFiles(); |
| 187 | else |
| 188 | return 0; |
| 189 | |
| 190 | } else |
| 191 | return 0; |
| 192 | } |
| 193 | |
| 194 | int |
| 195 | FilePlotter::playback(int cTag) |