VTK  9.2.6
vtkCONVERGECFDReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCONVERGECFDReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
48 #ifndef vtkCONVERGECFDReader_h
49 #define vtkCONVERGECFDReader_h
50 
51 #include "vtkIOCONVERGECFDModule.h" // For export macro
52 
53 #include "vtkNew.h" // for vtkNew
55 
56 #include <string> // for std::string
57 #include <vector> // for std::vector
58 
60 
61 class VTKIOCONVERGECFD_EXPORT vtkCONVERGECFDReader : public vtkPartitionedDataSetCollectionAlgorithm
62 {
63 public:
64  static vtkCONVERGECFDReader* New();
66  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
72  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
73 
79  vtkGetObjectMacro(ParcelDataArraySelection, vtkDataArraySelection);
80 
84  virtual int CanReadFile(VTK_FILEPATH const char* fname);
85 
87 
90  vtkSetFilePathMacro(FileName);
91  vtkGetFilePathMacro(FileName);
93 
94 protected:
96  ~vtkCONVERGECFDReader() override;
97 
99 
100  int RequestData(
101  vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector) override;
102 
103  // Look for series of files defining timesteps
104  void ReadTimeSteps(vtkInformation* outInfo);
105 
106  // Get the OUTPUT_TIME attribute from the file
107  bool ReadOutputTime(const std::string& filePath, double& time);
108 
109  // From the given information request, return the index of the file that supplies the timestep
110  size_t SelectTimeStepIndex(vtkInformation* info);
111 
112  // Name of file chosen in the file system
113  char* FileName;
114 
115  // List of files that match the chosen file name
116  std::vector<std::string> FileNames;
117 
120 
121  class vtkInternal;
122  vtkInternal* Internal;
123 
124 private:
126  void operator=(const vtkCONVERGECFDReader&) = delete;
127 };
128 
129 #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:39
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()