vtkCGNSWriter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
3 // SPDX-FileCopyrightText: Copyright (c) Maritime Research Institute Netherlands (MARIN)
4 // SPDX-License-Identifier: BSD-3-Clause
5 
19 #ifndef vtkCGNSWriter_h
20 #define vtkCGNSWriter_h
21 
22 #include "vtkPVVTKExtensionsIOCGNSWriterModule.h" // for export macro
23 #include "vtkWriter.h"
24 
25 class vtkDoubleArray;
26 
28 {
29 public:
30  static vtkCGNSWriter* New();
31  vtkTypeMacro(vtkCGNSWriter, vtkWriter);
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35 
38  vtkSetStringMacro(FileName);
39  vtkGetStringMacro(FileName);
41 
43 
50  void SetUseHDF5(bool);
51  vtkGetMacro(UseHDF5, bool);
52  vtkBooleanMacro(UseHDF5, bool);
54 
56 
62  vtkSetMacro(WriteAllTimeSteps, bool);
63  vtkGetMacro(WriteAllTimeSteps, bool);
64  vtkBooleanMacro(WriteAllTimeSteps, bool);
66 
68 
75  vtkSetMacro(GhostLevel, int);
76  vtkGetMacro(GhostLevel, int);
78 
80 
87  vtkGetStringMacro(FileNameSuffix);
88  vtkSetStringMacro(FileNameSuffix);
90 
91 protected:
92  vtkCGNSWriter();
93  ~vtkCGNSWriter() override;
94 
95  int ProcessRequest(vtkInformation* request, vtkInformationVector** inputVector,
96  vtkInformationVector* outputVector) override;
97 
98  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
99  vtkInformationVector* outputVector);
100 
101  virtual int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
102  vtkInformationVector* outputVector);
103 
104  int FillInputPortInformation(int port, vtkInformation* info) override;
105 
106  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
107  vtkInformationVector* outputVector) override;
108 
109  void WriteData() override; // pure virtual override from vtkWriter
110 
111  char* FileName = nullptr;
112  bool UseHDF5 = true;
113  bool WriteAllTimeSteps = false;
114  char* FileNameSuffix = nullptr;
115 
116  int GhostLevel = 0;
117  int NumberOfTimeSteps = 0;
118  int CurrentTimeIndex = 0;
119  vtkDoubleArray* TimeValues = nullptr;
120 
121  vtkDataObject* OriginalInput = nullptr;
122  bool WasWritingSuccessful = false;
123 
124 private:
125  vtkCGNSWriter(const vtkCGNSWriter&) = delete;
126  void operator=(const vtkCGNSWriter&) = delete;
127 
128  class vtkPrivate;
129  friend class vtkPrivate;
130 };
131 
132 #endif // vtkCGNSWriter_h
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Writes CGNS files.
Definition: vtkCGNSWriter.h:27
#define VTKPVVTKEXTENSIONSIOCGNSWRITER_EXPORT
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int FillInputPortInformation(int port, vtkInformation *info)
static vtkAlgorithm * New()
virtual void WriteData()=0
void operator=(const vtkObjectBase &)
void PrintSelf(ostream &os, vtkIndent indent)