00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00029 #ifndef __vtkPChacoReader_h
00030 #define __vtkPChacoReader_h
00031
00032 #include "vtkChacoReader.h"
00033
00034 class vtkTimerLog;
00035 class vtkMultiProcessController;
00036
00037 class VTK_PARALLEL_EXPORT vtkPChacoReader : public vtkChacoReader
00038 {
00039 public:
00040 static vtkPChacoReader *New();
00041 vtkTypeRevisionMacro(vtkPChacoReader,vtkChacoReader);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00047 void SetController(vtkMultiProcessController *c);
00048 vtkGetObjectMacro(Controller, vtkMultiProcessController);
00049
00050 protected:
00051 vtkPChacoReader();
00052 ~vtkPChacoReader();
00053
00054 int RequestInformation(
00055 vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00056 int RequestData(
00057 vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00058
00059 private:
00060 vtkPChacoReader(const vtkPChacoReader&);
00061 void operator=(const vtkPChacoReader&);
00062
00063 void SetUpEmptyGrid(vtkUnstructuredGrid *output);
00064 int DivideCells(vtkMultiProcessController *contr, vtkUnstructuredGrid *output,
00065 int source);
00066 int SendGrid(vtkMultiProcessController *c, int to, vtkUnstructuredGrid *grid);
00067 vtkUnstructuredGrid *GetGrid(vtkMultiProcessController *c, int from);
00068 vtkUnstructuredGrid *SubGrid(vtkUnstructuredGrid *ug, vtkIdType from, vtkIdType to);
00069 char *MarshallDataSet(vtkUnstructuredGrid *extractedGrid, int &len);
00070 vtkUnstructuredGrid *UnMarshallDataSet(char *buf, int size);
00071
00072 int NumProcesses;
00073 int MyId;
00074
00075 vtkMultiProcessController *Controller;
00076 };
00077
00078 #endif