------------------------------------------------------------------------------
| 319 | |
| 320 | //------------------------------------------------------------------------------ |
| 321 | void EnSightFile::CheckForBeginTimeStepLine() |
| 322 | { |
| 323 | // When file sets are used, multiple time steps are in a single file. |
| 324 | // each time step is between lines saying BEGIN TIME STEP and END TIME STEP |
| 325 | if (this->FileSet == -1) |
| 326 | { |
| 327 | return; |
| 328 | } |
| 329 | |
| 330 | auto result = this->ReadNextLine(); |
| 331 | if (result.second.find("BEGIN TIME STEP") == std::string::npos) |
| 332 | { |
| 333 | // This isn't an error situation. We track positions of time steps starting just |
| 334 | // after BEGIN TIME STEP. So if the line doesn't end up containing that, reset back |
| 335 | // to the previous line so we don't mess up processing. |
| 336 | this->GoBackOneLine(); |
| 337 | return; |
| 338 | } |
| 339 | |
| 340 | // Adding positions to TimeStepBeginPositions should always happen in SetTimeStepToRead, |
| 341 | // but just in case it doesn't, we can add it here. |
| 342 | auto& beginPositions = this->TimeStepBeginPositions[this->CurrentFileIndex]; |
| 343 | if (std::find(beginPositions.begin(), beginPositions.end(), this->GetCurrentPosition()) == |
| 344 | beginPositions.end()) |
| 345 | { |
| 346 | beginPositions.push_back(this->GetCurrentPosition()); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | //------------------------------------------------------------------------------ |
| 351 | bool EnSightFile::CheckForEndTimeStepLine() |
no test coverage detected