VTK  9.3.1
vtkCONVERGECFDReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
36 #ifndef vtkCONVERGECFDReader_h
37 #define vtkCONVERGECFDReader_h
38 
39 #include "vtkIOCONVERGECFDModule.h" // For export macro
40 
41 #include "vtkNew.h" // for vtkNew
43 
44 #include <string> // for std::string
45 #include <vector> // for std::vector
46 
47 VTK_ABI_NAMESPACE_BEGIN
49 
50 class VTKIOCONVERGECFD_EXPORT vtkCONVERGECFDReader : public vtkPartitionedDataSetCollectionAlgorithm
51 {
52 public:
53  static vtkCONVERGECFDReader* New();
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
61  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
62 
68  vtkGetObjectMacro(ParcelDataArraySelection, vtkDataArraySelection);
69 
73  virtual int CanReadFile(VTK_FILEPATH const char* fname);
74 
76 
79  vtkSetFilePathMacro(FileName);
80  vtkGetFilePathMacro(FileName);
82 
83 protected:
85  ~vtkCONVERGECFDReader() override;
86 
88 
89  int RequestData(
90  vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector) override;
91 
92  // Look for series of files defining timesteps
93  void ReadTimeSteps(vtkInformation* outInfo);
94 
95  // Get the OUTPUT_TIME attribute from the file
96  bool ReadOutputTime(const std::string& filePath, double& time);
97 
98  // From the given information request, return the index of the file that supplies the timestep
99  size_t SelectTimeStepIndex(vtkInformation* info);
100 
101  // Name of file chosen in the file system
102  char* FileName;
103 
104  // List of files that match the chosen file name
105  std::vector<std::string> FileNames;
106 
109 
110  class vtkInternal;
111  vtkInternal* Internal;
112 
113 private:
115  void operator=(const vtkCONVERGECFDReader&) = delete;
116 };
117 
118 VTK_ABI_NAMESPACE_END
119 #endif // vtkCONVERGECFDReader_h
Reader for CONVERGE CFD post files.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Methods for subclasses to override to handle different pipeline requests.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Methods for subclasses to override to handle different pipeline requests.
a simple class to control print indentation
Definition: vtkIndent.h:28
Store on/off settings for data arrays, etc.
Superclass for algorithms that produce vtkPartitionedDataSetCollectionAlgorithm.
vtkNew< vtkDataArraySelection > ParcelDataArraySelection
#define VTK_FILEPATH
std::vector< std::string > FileNames
vtkNew< vtkDataArraySelection > CellDataArraySelection
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()