VTK  9.4.20250130
vtkNetCDFCAMReader.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
19#ifndef vtkNetCDFCAMReader_h
20#define vtkNetCDFCAMReader_h
21
22#include "vtkIONetCDFModule.h" // For export macro
24
25VTK_ABI_NAMESPACE_BEGIN
28
29class VTKIONETCDF_EXPORT vtkNetCDFCAMReader : public vtkUnstructuredGridAlgorithm
30{
31public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
42 static int CanReadFile(VTK_FILEPATH const char* fileName);
43
44 void SetFileName(VTK_FILEPATH const char* fileName);
46
47 void SetConnectivityFileName(VTK_FILEPATH const char* fileName);
48 vtkGetFilePathMacro(ConnectivityFileName);
49
51
64 {
68 VERTICAL_DIMENSION_COUNT
69 };
70 vtkSetClampMacro(VerticalDimension, int, 0, 2);
71 vtkGetMacro(VerticalDimension, int);
73
75
81 vtkBooleanMacro(SingleMidpointLayer, vtkTypeBool);
82 vtkSetMacro(SingleMidpointLayer, vtkTypeBool);
83 vtkGetMacro(SingleMidpointLayer, vtkTypeBool);
84 vtkSetMacro(MidpointLayerIndex, int);
85 vtkGetMacro(MidpointLayerIndex, int);
86 vtkGetVector2Macro(MidpointLayersRange, int);
87
88 vtkBooleanMacro(SingleInterfaceLayer, vtkTypeBool);
89 vtkSetMacro(SingleInterfaceLayer, vtkTypeBool);
90 vtkGetMacro(SingleInterfaceLayer, vtkTypeBool);
91 vtkSetMacro(InterfaceLayerIndex, int);
92 vtkGetMacro(InterfaceLayerIndex, int);
93 vtkGetVector2Macro(InterfaceLayersRange, int);
95
97
102 const char* GetPointArrayName(int index);
103 int GetPointArrayStatus(const char* name);
104 void SetPointArrayStatus(const char* name, int status);
108
109protected:
112
114
116
118
124 bool GetPartitioning(size_t piece, size_t numPieces, size_t numCellLevels,
125 size_t numCellsPerLevel, size_t& beginCellLevel, size_t& endCellLevel, size_t& beginCell,
126 size_t& endCell);
127
129 static void SelectionCallback(
130 vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
131
132private:
133 vtkNetCDFCAMReader(const vtkNetCDFCAMReader&) = delete;
134 void operator=(const vtkNetCDFCAMReader&) = delete;
135
137
141 char* FileName;
142 char* CurrentFileName;
143 vtkSetStringMacro(CurrentFileName);
145
147
150 char* ConnectivityFileName;
151 char* CurrentConnectivityFileName;
152 vtkSetStringMacro(CurrentConnectivityFileName);
154
156 double* TimeSteps;
157 size_t NumberOfTimeSteps;
158 vtkDataArraySelection* PointDataArraySelection;
159 vtkCallbackCommand* SelectionObserver;
160
161 vtkTypeBool SingleMidpointLayer;
162 int MidpointLayerIndex;
163 int MidpointLayersRange[2];
164
165 vtkTypeBool SingleInterfaceLayer;
166 int InterfaceLayerIndex;
167 int InterfaceLayersRange[2];
168
169 class Internal;
170 Internal* Internals;
171};
172
173VTK_ABI_NAMESPACE_END
174#endif
supports function callbacks
Store on/off settings for data arrays, etc.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Read unstructured NetCDF CAM files.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void SetFileName(VTK_FILEPATH const char *fileName)
static void SelectionCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkNetCDFCAMReader * New()
int GetPointArrayStatus(const char *name)
The following methods allow selective reading of variables.
void SetConnectivityFileName(VTK_FILEPATH const char *fileName)
VerticalDimension
Set whether to read a single layer, midpoint layers or interface layers.
const char * GetPointArrayName(int index)
The following methods allow selective reading of variables.
bool GetPartitioning(size_t piece, size_t numPieces, size_t numCellLevels, size_t numCellsPerLevel, size_t &beginCellLevel, size_t &endCellLevel, size_t &beginCell, size_t &endCell)
Returns true for success.
vtkGetFilePathMacro(FileName)
void DisableAllPointArrays()
The following methods allow selective reading of variables.
int GetNumberOfPointArrays()
The following methods allow selective reading of variables.
void SetPointArrayStatus(const char *name, int status)
The following methods allow selective reading of variables.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static int CanReadFile(VTK_FILEPATH const char *fileName)
Returns 1 if this file can be read and 0 if the file cannot be read.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkNetCDFCAMReader() override
vtkGetFilePathMacro(ConnectivityFileName)
void EnableAllPointArrays()
The following methods allow selective reading of variables.
abstract base class for most VTK objects
Definition vtkObject.h:162
Superclass for algorithms that produce only unstructured grid as output.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_FILEPATH