MCPcopy Create free account
hub / github.com/Kitware/VTK / UpdateActiveFileSet

Method UpdateActiveFileSet

IO/CGNS/vtkCGNSFileSeriesReader.cxx:223–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223VTK_ABI_NAMESPACE_BEGIN
224//----------------------------------------------------------------------------
225bool 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//----------------------------------------------------------------------------
263void vtkCGNSFileSeriesReader::ChooseActiveFile(int index)

Callers 1

ProcessRequestMethod · 0.95

Calls 7

TakeFunction · 0.85
GetActiveFilesMethod · 0.80
NewInstanceMethod · 0.45
SetControllerMethod · 0.45
UpdateInformationMethod · 0.45
GetMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected