VTK
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=========================================================================*/
34#ifndef vtkPNetCDFPOPReader_h
35#define vtkPNetCDFPOPReader_h
36
37#include "vtkIOParallelNetCDFModule.h" // For export macro
39
43class vtkPNetCDFPOPReaderInternal;
44
45class VTKIOPARALLELNETCDF_EXPORT vtkPNetCDFPOPReader : public vtkRectilinearGridAlgorithm
46{
47public:
50 void PrintSelf(ostream& os, vtkIndent indent);
51
53
56 vtkSetStringMacro(FileName);
59
61
64 vtkSetVector3Macro(Stride, int);
65 vtkGetVector3Macro(Stride, int);
67
69
73 virtual const char *GetVariableArrayName(int idx);
74 virtual int GetVariableArrayStatus(const char *name);
75 virtual void SetVariableArrayStatus(const char *name, int status);
77
83
84 // Set/Get the vtkMultiProcessController which will handle communications
85 // for the parallel rendering.
86 vtkGetObjectMacro(Controller, vtkMPIController);
88
89protected:
92
95 virtual int RequestInformation(vtkInformation* request,
96 vtkInformationVector** inputVector,
97 vtkInformationVector* outputVector);
98
99 // Helper function for RequestData: Reads part of the netCDF
100 // file and sends sub-arrays to all ranks that need that data
101 int ReadAndSend( vtkInformation* outInfo, int varID);
102
103 // Returns the MPI rank of the process that should read the specified depth
104 int ReaderForDepth( unsigned depth);
105
108
109 static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid,
110 void *clientdata, void *calldata);
111
112 static void EventCallback(vtkObject* caller, unsigned long eid,
113 void* clientdata, void* calldata);
114
116
117 char *FileName;
119 vtkSetStringMacro(OpenedFileName);
120
121 int NCDFFD; //netcdf file descriptor
122
123 int Stride[3];
124
126
127private:
128 vtkPNetCDFPOPReader(const vtkPNetCDFPOPReader&) VTK_DELETE_FUNCTION;
129 void operator=(const vtkPNetCDFPOPReader&) VTK_DELETE_FUNCTION;
130
131 vtkPNetCDFPOPReaderInternal* Internals;
132};
133#endif
supports function callbacks
Store on/off settings for data arrays for a vtkSource.
list of point or cell ids
Definition: vtkIdList.h:37
a simple class to control print indentation
Definition: vtkIndent.h:40
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:60
read NetCDF files in parallel with MPI .Author Ross Miller 03.14.2011
virtual int GetNumberOfVariableArrays()
Variable array selection.
vtkCallbackCommand * SelectionObserver
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
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)
int ReaderForDepth(unsigned depth)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
void SetController(vtkMPIController *controller)
virtual void SetVariableArrayStatus(const char *name, int status)
static void EventCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual const char * GetVariableArrayName(int idx)
vtkMPIController * Controller
Superclass for algorithms that produce only rectilinear grid as output.
@ name
Definition: vtkX3D.h:219
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.