| 221 | } |
| 222 | |
| 223 | VTK_ABI_NAMESPACE_BEGIN |
| 224 | //---------------------------------------------------------------------------- |
| 225 | bool vtkCGNSFileSeriesReader::UpdateActiveFileSet(vtkInformation* outInfo) |
| 226 | { |
| 227 | // Pass ivars to vtkFileSeriesHelper. |
| 228 | this->FileSeriesHelper->SetIgnoreReaderTime(this->IgnoreReaderTime); |
| 229 | |
| 230 | // We pass a new instance of the reader to vtkFileSeriesHelper to avoid |
| 231 | // mucking with this->Reader to just gather the file's time meta-data. |
| 232 | vtkSmartPointer<vtkCGNSReader> reader = |
| 233 | vtkSmartPointer<vtkCGNSReader>::Take(this->Reader->NewInstance()); |
| 234 | reader->SetController(nullptr); |
| 235 | reader->SetDistributeBlocks(false); |
| 236 | |
| 237 | // Update vtkFileSeriesHelper. Make it process all the filenames provided and |
| 238 | // collect useful metadata from it. This is a no-op if the vtkFileSeriesHelper |
| 239 | // wasn't modified. |
| 240 | if (!this->FileSeriesHelper->UpdateInformation( |
| 241 | reader.Get(), vtkCGNSFileSeriesReaderNS::SetFileNameCallback)) |
| 242 | { |
| 243 | return false; |
| 244 | } |
| 245 | |
| 246 | // For current time/local partition, we need to determine which files to |
| 247 | // read. Let's determine that. |
| 248 | this->ActiveFiles = this->FileSeriesHelper->GetActiveFiles(outInfo); |
| 249 | |
| 250 | // For temporal file series, the active set should only have 1 file. If more than 1 |
| 251 | // file matches the timestep, it means that we may have invalid time information |
| 252 | // in the file series. Warn about it. |
| 253 | if (!this->FileSeriesHelper->GetPartitionedFiles() && this->ActiveFiles.size() > 1) |
| 254 | { |
| 255 | vtkWarningMacro( |
| 256 | "The CGNS file series may have incorrect (or duplicate) " |
| 257 | "time values for a temporal file series. You may want to turn on 'IgnoreReaderTime'."); |
| 258 | } |
| 259 | return true; |
| 260 | } |
| 261 | |
| 262 | //---------------------------------------------------------------------------- |
| 263 | void vtkCGNSFileSeriesReader::ChooseActiveFile(int index) |
no test coverage detected