VTK
|
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 "vtkSLACReader.h" 00041 00042 class vtkMultiProcessController; 00043 00044 class VTK_PARALLEL_EXPORT vtkPSLACReader : public vtkSLACReader 00045 { 00046 public: 00047 vtkTypeMacro(vtkPSLACReader, vtkSLACReader); 00048 static vtkPSLACReader *New(); 00049 virtual void PrintSelf(ostream &os, vtkIndent indent); 00050 00052 00056 vtkGetObjectMacro(Controller, vtkMultiProcessController); 00057 virtual void SetController(vtkMultiProcessController *); 00059 00060 protected: 00061 vtkPSLACReader(); 00062 ~vtkPSLACReader(); 00063 00064 vtkMultiProcessController *Controller; 00065 00066 virtual int RequestInformation(vtkInformation *request, 00067 vtkInformationVector **inputVector, 00068 vtkInformationVector *outputVector); 00069 00070 virtual int RequestData(vtkInformation *request, 00071 vtkInformationVector **inputVector, 00072 vtkInformationVector *outputVector); 00073 00074 virtual int CheckTetrahedraWinding(int meshFD); 00075 virtual int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput, 00076 vtkMultiBlockDataSet *volumeOutput); 00077 virtual int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output); 00078 virtual int ReadMidpointCoordinates(int meshFD, vtkMultiBlockDataSet *output, 00079 MidpointCoordinateMap &map); 00080 virtual int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output, 00081 MidpointIdMap &map); 00082 virtual int RestoreMeshCache(vtkMultiBlockDataSet *surfaceOutput, 00083 vtkMultiBlockDataSet *volumeOutput, 00084 vtkMultiBlockDataSet *compositeOutput); 00085 virtual int ReadFieldData(int modeFD, vtkMultiBlockDataSet *output); 00086 00087 virtual int ReadTetrahedronInteriorArray(int meshFD, 00088 vtkIdTypeArray *connectivity); 00089 virtual int ReadTetrahedronExteriorArray(int meshFD, 00090 vtkIdTypeArray *connectivity); 00091 00092 virtual int MeshUpToDate(); 00093 00094 //BTX 00097 virtual vtkSmartPointer<vtkDataArray> ReadPointDataArray(int ncFD, int varId); 00098 //ETX 00099 00100 //BTX 00101 class vtkInternal; 00102 vtkInternal *Internal; 00103 //ETX 00104 00106 00108 int NumberOfPieces; 00109 int RequestedPiece; 00111 00113 vtkIdType NumberOfGlobalPoints; 00114 00116 vtkIdType NumberOfGlobalMidpoints; 00117 00119 00120 vtkIdType StartPointRead(int process) { 00121 return process*(this->NumberOfGlobalPoints/this->NumberOfPieces + 1); 00122 } 00123 vtkIdType EndPointRead(int process) { 00124 vtkIdType result = this->StartPointRead(process+1); 00125 if (result > this->NumberOfGlobalPoints) result=this->NumberOfGlobalPoints; 00126 return result; 00127 } 00129 00131 00132 int NumberOfPiecesCache; 00133 int RequestedPieceCache; 00135 00136 private: 00137 vtkPSLACReader(const vtkPSLACReader &); // Not implemented 00138 void operator=(const vtkPSLACReader &); // Not implemented 00139 }; 00140 00141 #endif //__vtkPSLACReader_h