VTK  9.7.1
vtkFidesWriter.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 
53 #ifndef vtkFidesWriter_h
54 #define vtkFidesWriter_h
55 
56 #include "vtkIOFidesModule.h" // For export macro
57 #include "vtkNew.h" // For vtkNew
58 #include "vtkWriter.h"
59 
60 #include <memory> // for std::unique_ptr
61 
62 VTK_ABI_NAMESPACE_BEGIN
66 
67 class VTKIOFIDES_EXPORT vtkFidesWriter : public vtkWriter
68 {
69 public:
71  {
73  SST
74  };
75 
76  static vtkFidesWriter* New();
77  vtkTypeMacro(vtkFidesWriter, vtkWriter);
78  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
81 
84  vtkSetFilePathMacro(FileName);
85  vtkGetFilePathMacro(FileName);
87 
89 
95  vtkSetFilePathMacro(AdiosConfigFile);
96  vtkGetFilePathMacro(AdiosConfigFile);
98 
100 
107  vtkSetMacro(ChooseFieldsToWrite, bool);
108  vtkGetMacro(ChooseFieldsToWrite, bool);
109  vtkBooleanMacro(ChooseFieldsToWrite, bool);
111 
113 
116  vtkDataArraySelection* GetArraySelection(int association);
117  vtkDataArraySelection* GetPointDataArraySelection();
118  vtkDataArraySelection* GetCellDataArraySelection();
119  vtkDataArraySelection* GetFieldDataArraySelection();
121 
123 
131  vtkSetVector2Macro(TimeStepRange, int);
132  vtkGetVector2Macro(TimeStepRange, int);
133  vtkSetClampMacro(TimeStepStride, int, 1, VTK_INT_MAX);
134  vtkGetMacro(TimeStepStride, int);
136 
138 
142  vtkSetMacro(Engine, int);
143  vtkGetMacro(Engine, int);
145 
147 
152  void SetController(vtkMultiProcessController*);
153  vtkGetObjectMacro(Controller, vtkMultiProcessController);
155 
156 protected:
157  vtkFidesWriter();
158  ~vtkFidesWriter() override;
159 
160  int FillInputPortInformation(int port, vtkInformation* info) override;
162  int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
163  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
164  vtkInformationVector* outputVector);
165  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
166  vtkInformationVector* outputVector) override;
167 
168  bool WriteDataAndReturn() override;
169 
170 private:
171  vtkFidesWriter(const vtkFidesWriter&) = delete;
172  void operator=(const vtkFidesWriter&) = delete;
173 
174  struct FidesWriterImpl;
175  std::unique_ptr<FidesWriterImpl> Impl;
176 
177  vtkMultiProcessController* Controller;
178  char* FileName;
179  char* AdiosConfigFile;
180  bool ChooseFieldsToWrite;
181  int TimeStepRange[2];
182  int TimeStepStride;
183  int Engine;
184 
185  vtkNew<vtkDataArraySelection> ArraySelection[3];
186 };
187 
188 VTK_ABI_NAMESPACE_END
189 #endif
Write ADIOS2 streams using Fides data model.
Store vtkAlgorithm input/output information.
#define VTK_INT_MAX
Definition: vtkType.h:192
abstract class to write data to file(s)
Definition: vtkWriter.h:35
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
Key for integer values in vtkInformation.
Store on/off settings for data arrays, etc.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
virtual bool WriteDataAndReturn()
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
Multiprocessing communication superclass.