VTK  9.4.20250102
vtkPNetCDFPOPReader.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
22#ifndef vtkPNetCDFPOPReader_h
23#define vtkPNetCDFPOPReader_h
24
25#include "vtkIOParallelNetCDFModule.h" // For export macro
27
28VTK_ABI_NAMESPACE_BEGIN
32class vtkPNetCDFPOPReaderInternal;
33
34class VTKIOPARALLELNETCDF_EXPORT vtkPNetCDFPOPReader : public vtkRectilinearGridAlgorithm
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
48
50
53 vtkSetVector3Macro(Stride, int);
54 vtkGetVector3Macro(Stride, int);
56
58
62 virtual const char* GetVariableArrayName(int idx);
63 virtual int GetVariableArrayStatus(const char* name);
64 virtual void SetVariableArrayStatus(const char* name, int status);
66
72
73 // Set/Get the vtkMultiProcessController which will handle communications
74 // for the parallel rendering.
75 vtkGetObjectMacro(Controller, vtkMPIController);
77
78protected:
81
84 vtkInformationVector* outputVector) override;
85
86 // Helper function for RequestData: Reads part of the netCDF
87 // file and sends sub-arrays to all ranks that need that data
88 int ReadAndSend(vtkInformation* outInfo, int varID);
89
90 // Returns the MPI rank of the process that should read the specified depth
91 int ReaderForDepth(unsigned depth);
92
95
97 vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
98
99 static void EventCallback(vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
100
102
103 char* FileName;
105 vtkSetFilePathMacro(OpenedFileName);
106
107 int NCDFFD; // netcdf file descriptor
108
109 int Stride[3];
110
112
113private:
115 void operator=(const vtkPNetCDFPOPReader&) = delete;
116
117 vtkPNetCDFPOPReaderInternal* Internals;
118};
119VTK_ABI_NAMESPACE_END
120#endif
supports function callbacks
Store on/off settings for data arrays, etc.
list of point or cell ids
Definition vtkIdList.h:133
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Process communication using MPI.
abstract base class for most VTK objects
Definition vtkObject.h:162
read NetCDF files in parallel with MPI .Author Ross Miller 03.14.2011
virtual int GetNumberOfVariableArrays()
Variable array selection.
vtkCallbackCommand * SelectionObserver
vtkSetFilePathMacro(FileName)
The file to open.
vtkGetFilePathMacro(FileName)
The file to open.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetReaderRanks(vtkIdList *)
Set ranks that will actually open and read the netCDF files.
static vtkPNetCDFPOPReader * New()
int ReadAndSend(vtkInformation *outInfo, int varID)
virtual int GetVariableArrayStatus(const char *name)
Variable array selection.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ReaderForDepth(unsigned depth)
static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
void SetController(vtkMPIController *controller)
~vtkPNetCDFPOPReader() override
virtual void SetVariableArrayStatus(const char *name, int status)
Variable array selection.
static void EventCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
virtual const char * GetVariableArrayName(int idx)
Variable array selection.
vtkSetFilePathMacro(OpenedFileName)
vtkMPIController * Controller
Superclass for algorithms that produce only rectilinear grid as output.