VTK  9.7.1
vtkFidesReader.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
25 #ifndef vtkFidesReader_h
26 #define vtkFidesReader_h
27 
28 #include "vtkAlgorithm.h"
29 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_6_0
30 #include "vtkIOFidesModule.h" // For export macro
31 #include <memory> // for std::unique_ptr
32 #include <string> // for std::string
33 
34 #ifdef __VTK_WRAP__
35 #define vtkPyObjectFwd PyObject
36 #else
37 struct _object;
38 #define vtkPyObjectFwd _object
39 #endif
40 
41 // Forward declare the Conduit C-API opaque pointer type exactly as
42 // Conduit does to avoid struct vs typedef collisions in C++.
43 struct conduit_node_impl;
44 typedef struct conduit_node_impl conduit_node;
45 
46 VTK_ABI_NAMESPACE_BEGIN
49 
50 class VTKIOFIDES_EXPORT vtkFidesReader : public vtkAlgorithm
51 {
52 public:
58  {
59  OK,
62  };
63 
64  vtkTypeMacro(vtkFidesReader, vtkAlgorithm);
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
70  static vtkFidesReader* New();
71 
76  int CanReadFile(VTK_FILEPATH const std::string& name);
77 
81  void SetFileName(VTK_FILEPATH const std::string& fname);
82 
84 
89  void ParseDataModel(VTK_FILEPATH const std::string& fname);
90  void ParseDataModel();
92 
98  void SetDataSourcePath(const std::string& name, VTK_FILEPATH const std::string& path);
99 
103  void SetDataSourceEngine(const std::string& name, const std::string& engine);
104 
111  void SetDataSourceIO(const std::string& name, const std::string& ioAddress);
112 
127  bool SetDataSourceNode(const std::string& name, conduit_node* node);
128 
145  bool SetDataSourceNode(const std::string& name, vtkPyObjectFwd* conduitNode);
146 
156  void RemoveDataSourceNode(const std::string& name);
157 
168  void RemoveAllDataSourceNodes();
169 
174 
182  void PrepareNextStep();
183 
190  int GetNextStepStatus();
191 
196  double GetTimeOfCurrentStep();
197 
199 
205  VTK_DEPRECATED_IN_9_6_0("ConvertToVTK is deprecated since vtkmDataSet was deprecated.")
206  virtual void SetConvertToVTK(bool) {};
207  VTK_DEPRECATED_IN_9_6_0("ConvertToVTK is deprecated since vtkmDataSet was deprecated.")
208  virtual bool GetConvertToVTK() { return true; };
209  VTK_DEPRECATED_IN_9_6_0("ConvertToVTK is deprecated since vtkmDataSet was deprecated.")
210  virtual void ConvertToVTKOn() {}
211  VTK_DEPRECATED_IN_9_6_0("ConvertToVTK is deprecated since vtkmDataSet was deprecated.")
212  virtual void ConvertToVTKOff() {}
214 
216 
219  vtkBooleanMacro(StreamSteps, bool);
220  vtkSetMacro(StreamSteps, bool);
221  vtkGetMacro(StreamSteps, bool);
223 
225 
229  vtkBooleanMacro(CreateSharedPoints, bool);
230  vtkSetMacro(CreateSharedPoints, bool);
231  vtkGetMacro(CreateSharedPoints, bool);
233 
237  vtkGetObjectMacro(PointDataArraySelection, vtkDataArraySelection);
238 
242  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
243 
247  vtkGetObjectMacro(FieldDataArraySelection, vtkDataArraySelection);
248 
250 
253  int GetNumberOfPointArrays();
254  int GetNumberOfCellArrays();
255  int GetNumberOfFieldArrays();
257 
259 
263  const char* GetPointArrayName(int index);
264  const char* GetCellArrayName(int index);
265  const char* GetFieldArrayName(int index);
267 
269 
273  int GetPointArrayStatus(const char* name);
274  int GetCellArrayStatus(const char* name);
275  int GetFieldArrayStatus(const char* name);
276  void SetPointArrayStatus(const char* name, int status);
277  void SetCellArrayStatus(const char* name, int status);
278  void SetFieldArrayStatus(const char* name, int status);
280 
284  vtkMTimeType GetMTime() override;
285 
287 
291  virtual void SetController(vtkMultiProcessController* controller);
292  vtkGetObjectMacro(Controller, vtkMultiProcessController);
294 
295 protected:
296  vtkFidesReader();
297  ~vtkFidesReader() override;
298 
299  struct vtkFidesReaderImpl;
300  std::unique_ptr<vtkFidesReaderImpl> Impl;
301 
306 
307  virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
308  vtkInformationVector* outputVector);
309  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
310  vtkInformationVector* outputVector);
311  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
312  vtkInformationVector* outputVector);
313 
315 
319 
321 
322  int ADIOSAttributeCheck(const std::string& name);
323 
324 private:
325  vtkFidesReader(const vtkFidesReader&) = delete;
326  void operator=(const vtkFidesReader&) = delete;
327 };
328 
329 VTK_ABI_NAMESPACE_END
330 #endif
StepStatus NextStepStatus
struct conduit_node_impl conduit_node
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
vtkDataArraySelection * CellDataArraySelection
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
StepStatus
When using streaming mode instead of random access, PrepareNextStep receives a step status from Fides...
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
#define VTK_DEPRECATED_IN_9_6_0(reason)
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
Store on/off settings for data arrays, etc.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
std::string FileName
std::unique_ptr< vtkFidesReaderImpl > Impl
#define VTK_FILEPATH
#define vtkPyObjectFwd
Store zero or more vtkInformation instances.
Read ADIOS2 streams using Fides data model.
static vtkAlgorithm * New()
vtkDataArraySelection * FieldDataArraySelection
vtkMultiProcessController * Controller
vtkDataArraySelection * PointDataArraySelection
Multiprocessing communication superclass.