VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/Parallel/vtkPChacoReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPChacoReader.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*----------------------------------------------------------------------------
00016  Copyright (c) Sandia Corporation
00017  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00018 ----------------------------------------------------------------------------*/
00019 
00029 #ifndef vtkPChacoReader_h
00030 #define vtkPChacoReader_h
00031 
00032 #include "vtkIOParallelModule.h" // For export macro
00033 #include "vtkChacoReader.h"
00034 
00035 class vtkTimerLog;
00036 class vtkMultiProcessController;
00037 
00038 class VTKIOPARALLEL_EXPORT vtkPChacoReader : public vtkChacoReader
00039 {
00040 public:
00041   static vtkPChacoReader *New();
00042   vtkTypeMacro(vtkPChacoReader,vtkChacoReader);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00048   void SetController(vtkMultiProcessController *c);
00049   vtkGetObjectMacro(Controller, vtkMultiProcessController);
00050 
00051 protected:
00052   vtkPChacoReader();
00053   ~vtkPChacoReader();
00054 
00055   int RequestInformation(
00056     vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00057   int RequestData(
00058     vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00059 
00060 private:
00061   vtkPChacoReader(const vtkPChacoReader&); // Not implemented
00062   void operator=(const vtkPChacoReader&); // Not implemented
00063 
00064   void SetUpEmptyGrid(vtkUnstructuredGrid *output);
00065   int DivideCells(vtkMultiProcessController *contr, vtkUnstructuredGrid *output,
00066                   int source);
00067   int SendGrid(vtkMultiProcessController *c, int to, vtkUnstructuredGrid *grid);
00068   vtkUnstructuredGrid *GetGrid(vtkMultiProcessController *c, int from);
00069   vtkUnstructuredGrid *SubGrid(vtkUnstructuredGrid *ug, vtkIdType from, vtkIdType to);
00070   char *MarshallDataSet(vtkUnstructuredGrid *extractedGrid, int &len);
00071   vtkUnstructuredGrid *UnMarshallDataSet(char *buf, int size);
00072 
00073   int NumProcesses;
00074   int MyId;
00075 
00076   vtkMultiProcessController *Controller;
00077 };
00078 
00079 #endif