VTK  9.1.0
vtkPNetCDFPOPReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtPkNetCDFPOPReader.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
31#ifndef vtkPNetCDFPOPReader_h
32#define vtkPNetCDFPOPReader_h
33
34#include "vtkIOParallelNetCDFModule.h" // For export macro
36
40class vtkPNetCDFPOPReaderInternal;
41
42class VTKIOPARALLELNETCDF_EXPORT vtkPNetCDFPOPReader : public vtkRectilinearGridAlgorithm
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
56
58
61 vtkSetVector3Macro(Stride, int);
62 vtkGetVector3Macro(Stride, int);
64
66
70 virtual const char* GetVariableArrayName(int idx);
71 virtual int GetVariableArrayStatus(const char* name);
72 virtual void SetVariableArrayStatus(const char* name, int status);
74
80
81 // Set/Get the vtkMultiProcessController which will handle communications
82 // for the parallel rendering.
83 vtkGetObjectMacro(Controller, vtkMPIController);
85
86protected:
89
91 virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
92 vtkInformationVector* outputVector) override;
93
94 // Helper function for RequestData: Reads part of the netCDF
95 // file and sends sub-arrays to all ranks that need that data
96 int ReadAndSend(vtkInformation* outInfo, int varID);
97
98 // Returns the MPI rank of the process that should read the specified depth
99 int ReaderForDepth(unsigned depth);
100
103
105 vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
106
107 static void EventCallback(vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
108
110
111 char* FileName;
113 vtkSetFilePathMacro(OpenedFileName);
114
115 int NCDFFD; // netcdf file descriptor
116
117 int Stride[3];
118
120
121private:
123 void operator=(const vtkPNetCDFPOPReader&) = delete;
124
125 vtkPNetCDFPOPReaderInternal* Internals;
126};
127#endif
supports function callbacks
Store on/off settings for data arrays for a vtkSource.
list of point or cell ids
Definition: vtkIdList.h:140
a simple class to control print indentation
Definition: vtkIndent.h:113
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:82
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.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
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.
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.