00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00028 #ifndef __vtkVPICReader_h
00029 #define __vtkVPICReader_h
00030
00031 #include "vtkImageAlgorithm.h"
00032
00033
00034 class vtkCallbackCommand;
00035 class vtkDataArraySelection;
00036 class vtkFloatArray;
00037 class vtkStdString;
00038 class vtkMultiProcessController;
00039 class vtkInformation;
00040
00041 class VPICDataSet;
00042 class GridExchange;
00043
00044 class VTK_PARALLEL_EXPORT vtkVPICReader : public vtkImageAlgorithm
00045 {
00046 public:
00047 static vtkVPICReader *New();
00048 vtkTypeMacro(vtkVPICReader,vtkImageAlgorithm);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00050
00052
00053 vtkSetStringMacro(FileName);
00054 vtkGetStringMacro(FileName);
00056
00058
00059 vtkSetVector3Macro(Stride, int);
00060 vtkGetVector3Macro(Stride, int);
00062
00064
00065 vtkSetVector2Macro(XExtent, int);
00066 vtkSetVector2Macro(YExtent, int);
00067 vtkSetVector2Macro(ZExtent, int);
00069
00070
00071 vtkGetVector2Macro(XLayout, int);
00072 vtkGetVector2Macro(YLayout, int);
00073 vtkGetVector2Macro(ZLayout, int);
00074
00076
00077 vtkImageData *GetOutput();
00078 vtkImageData *GetOutput(int index);
00080
00082
00085 int GetNumberOfPointArrays();
00086 const char* GetPointArrayName(int index);
00087 int GetPointArrayStatus(const char* name);
00088 void SetPointArrayStatus(const char* name, int status);
00089 void DisableAllPointArrays();
00090 void EnableAllPointArrays();
00092
00093 protected:
00094 vtkVPICReader();
00095 ~vtkVPICReader();
00096
00097 char *FileName;
00098
00099 int Rank;
00100 int TotalRank;
00101 int UsedRank;
00102
00103 VPICDataSet* vpicData;
00104 GridExchange* exchanger;
00105
00106 int NumberOfPieces;
00107 vtkIdType NumberOfNodes;
00108 vtkIdType NumberOfCells;
00109 vtkIdType NumberOfTuples;
00110
00111 int WholeExtent[6];
00112 int SubExtent[6];
00113 int Dimension[3];
00114 int SubDimension[3];
00115 int XLayout[2];
00116 int YLayout[2];
00117 int ZLayout[2];
00118
00119 int NumberOfVariables;
00120 vtkStdString* VariableName;
00121 int* VariableStruct;
00122
00123 int NumberOfTimeSteps;
00124 double* TimeSteps;
00125 int CurrentTimeStep;
00126
00127 int Stride[3];
00128 int XExtent[2];
00129 int YExtent[2];
00130 int ZExtent[2];
00131
00132 vtkFloatArray** data;
00133 int* dataLoaded;
00134
00135 int Start[3];
00136 int GhostDimension[3];
00137 int NumberOfGhostTuples;
00138 int ghostLevel0;
00139 int ghostLevel1;
00140
00141
00142 vtkMultiProcessController * MPIController;
00143
00144
00145 vtkDataArraySelection* PointDataArraySelection;
00146
00147
00148 vtkCallbackCommand* SelectionObserver;
00149
00150 int RequestData(vtkInformation *, vtkInformationVector **,
00151 vtkInformationVector *);
00152 int RequestInformation(vtkInformation *, vtkInformationVector **inVector,
00153 vtkInformationVector *);
00154
00155 void LoadVariableData(int var, int timeStep);
00156 void LoadComponent(
00157 float* varData,
00158 float* block,
00159 int comp,
00160 int numberOfComponents);
00161
00162 static void SelectionCallback(vtkObject* caller, unsigned long eid,
00163 void* clientdata, void* calldata);
00164 static void EventCallback(vtkObject* caller, unsigned long eid,
00165 void* clientdata, void* calldata);
00166
00167
00168 private:
00169 vtkVPICReader(const vtkVPICReader&);
00170 void operator=(const vtkVPICReader&);
00171 };
00172
00173 #endif
00174
00175