VTK  9.7.1
vtkFDSReader.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 #ifndef vtkFDSReader_h
4 #define vtkFDSReader_h
5 
6 #include "vtkDataAssembly.h" // For vtkDataAssembly
7 #include "vtkIOFDSModule.h" // For export macro
8 #include "vtkNew.h" // For vtkNew
10 #include "vtkSmartPointer.h" // For vtkSmartPointer
11 
12 #include <memory> // For std::unique_ptr
13 #include <set> // For std::set
14 #include <string> // For std::string
15 #include <vector> // For std::vector
16 
17 VTK_ABI_NAMESPACE_BEGIN
18 
19 class vtkResourceStream;
36 {
37 public:
38  static vtkFDSReader* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
46  vtkSetMacro(FileName, std::string);
47  vtkGetMacro(FileName, std::string);
49 
51 
55  virtual void SetStream(vtkResourceStream* stream);
56  virtual vtkResourceStream* GetStream();
58 
62  vtkGetNewMacro(Assembly, vtkDataAssembly);
63 
71  vtkGetMacro(AssemblyTag, int);
72 
74 
84  bool AddSelector(const char* selector);
85  void ClearSelectors();
87 
89 
92  vtkGetMacro(TimeTolerance, double);
93  vtkSetMacro(TimeTolerance, double);
95 
96 protected:
97  vtkFDSReader();
98  ~vtkFDSReader() override;
99 
102 
103 private:
104  vtkFDSReader(const vtkFDSReader&) = delete;
105  void operator=(const vtkFDSReader&) = delete;
106 
107  bool ParseVIEWTIMES();
108  bool ParseGRID(const std::vector<int>& baseNodes);
109  bool ParseCSVF(const std::vector<int>& baseNodes);
110  bool ParseDEVICE(const std::vector<int>& baseNodes);
111 
115  bool ParseSLCFSLCC(const std::vector<int>& baseNodes, bool cellCentered);
116 
120  bool ParseBNDFBNDC(bool cellCentered);
121 
123 
124  int AssemblyTag = 0;
125  std::string FileName;
126  std::set<std::string> Selectors;
127 
128  vtkNew<vtkDataAssembly> Assembly;
129 
133  int GetNodeId(int parentNode, const std::string& givenNodeName);
134 
135  double TimeTolerance = 1e-5;
136 
137  struct vtkInternals;
138  std::shared_ptr<vtkInternals> Internals;
139 };
140 
141 VTK_ABI_NAMESPACE_END
142 
143 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Abstract class used for custom streams.
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
Superclass for algorithms that produce vtkPartitionedDataSetCollectionAlgorithm.
VTKIOHDF_EXPORT bool Open(const char *fileName, hid_t &fileID)
Open a VTK HDF file and checks if it is valid.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
hierarchical representation to use with vtkPartitionedDataSetCollection
A reader for the Fire Dynamics Simulator (FDS) output data.
Definition: vtkFDSReader.h:35