VTK
dox/IO/Parallel/vtkPSLACReader.h
Go to the documentation of this file.
00001 // -*- c++ -*-
00002 /*=========================================================================
00003 
00004   Program:   Visualization Toolkit
00005   Module:    vtkPSLACReader.h
00006 
00007   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00016 
00017 /*-------------------------------------------------------------------------
00018   Copyright 2008 Sandia Corporation.
00019   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00020   the U.S. Government retains certain rights in this software.
00021 -------------------------------------------------------------------------*/
00022 
00037 #ifndef __vtkPSLACReader_h
00038 #define __vtkPSLACReader_h
00039 
00040 #include "vtkIOParallelModule.h" // For export macro
00041 #include "vtkSLACReader.h"
00042 
00043 class vtkMultiProcessController;
00044 
00045 class VTKIOPARALLEL_EXPORT vtkPSLACReader : public vtkSLACReader
00046 {
00047 public:
00048   vtkTypeMacro(vtkPSLACReader, vtkSLACReader);
00049   static vtkPSLACReader *New();
00050   virtual void PrintSelf(ostream &os, vtkIndent indent);
00051 
00053 
00057   vtkGetObjectMacro(Controller, vtkMultiProcessController);
00058   virtual void SetController(vtkMultiProcessController *);
00060 
00061 protected:
00062   vtkPSLACReader();
00063   ~vtkPSLACReader();
00064 
00065   vtkMultiProcessController *Controller;
00066 
00067   virtual int RequestInformation(vtkInformation *request,
00068                                  vtkInformationVector **inputVector,
00069                                  vtkInformationVector *outputVector);
00070 
00071   virtual int RequestData(vtkInformation *request,
00072                           vtkInformationVector **inputVector,
00073                           vtkInformationVector *outputVector);
00074 
00075   virtual int CheckTetrahedraWinding(int meshFD);
00076   virtual int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput,
00077                                vtkMultiBlockDataSet *volumeOutput);
00078   virtual int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output);
00079   virtual int ReadMidpointCoordinates(int meshFD, vtkMultiBlockDataSet *output,
00080                                       MidpointCoordinateMap &map);
00081   virtual int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output,
00082                                MidpointIdMap &map);
00083   virtual int RestoreMeshCache(vtkMultiBlockDataSet *surfaceOutput,
00084                                vtkMultiBlockDataSet *volumeOutput,
00085                                vtkMultiBlockDataSet *compositeOutput);
00086   virtual int ReadFieldData(const int *modeFDArray,
00087                             int numModeFDs,
00088                             vtkMultiBlockDataSet *output);
00089 
00090   virtual int ReadTetrahedronInteriorArray(int meshFD,
00091                                            vtkIdTypeArray *connectivity);
00092   virtual int ReadTetrahedronExteriorArray(int meshFD,
00093                                            vtkIdTypeArray *connectivity);
00094 
00095   virtual int MeshUpToDate();
00096 
00097 //BTX
00099 
00101   virtual vtkSmartPointer<vtkDataArray> ReadPointDataArray(int ncFD, int varId);
00102 //ETX
00104 
00105 //BTX
00106   class vtkInternal;
00107   vtkInternal *Internal;
00108 //ETX
00109 
00111 
00113   int NumberOfPieces;
00114   int RequestedPiece;
00116 
00118   vtkIdType NumberOfGlobalPoints;
00119 
00121   vtkIdType NumberOfGlobalMidpoints;
00122 
00124 
00125   vtkIdType StartPointRead(int process) {
00126     return process*(this->NumberOfGlobalPoints/this->NumberOfPieces + 1);
00127   }
00128   vtkIdType EndPointRead(int process) {
00129     vtkIdType result = this->StartPointRead(process+1);
00130     if (result > this->NumberOfGlobalPoints) result=this->NumberOfGlobalPoints;
00131     return result;
00132   }
00134 
00136 
00137   int NumberOfPiecesCache;
00138   int RequestedPieceCache;
00140 
00141 private:
00142   vtkPSLACReader(const vtkPSLACReader &);       // Not implemented
00143   void operator=(const vtkPSLACReader &);       // Not implemented
00144 };
00145 
00146 #endif //__vtkPSLACReader_h