VTK
vtkPSLACReader.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkPSLACReader.h
6 
7  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
16 
17 /*-------------------------------------------------------------------------
18  Copyright 2008 Sandia Corporation.
19  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
20  the U.S. Government retains certain rights in this software.
21 -------------------------------------------------------------------------*/
22 
37 #ifndef __vtkPSLACReader_h
38 #define __vtkPSLACReader_h
39 
40 #include "vtkIOParallelModule.h" // For export macro
41 #include "vtkSLACReader.h"
42 
44 
45 class VTKIOPARALLEL_EXPORT vtkPSLACReader : public vtkSLACReader
46 {
47 public:
48  vtkTypeMacro(vtkPSLACReader, vtkSLACReader);
49  static vtkPSLACReader *New();
50  virtual void PrintSelf(ostream &os, vtkIndent indent);
51 
53 
57  vtkGetObjectMacro(Controller, vtkMultiProcessController);
58  virtual void SetController(vtkMultiProcessController *);
60 
61 protected:
63  ~vtkPSLACReader();
64 
66 
67  virtual int RequestInformation(vtkInformation *request,
68  vtkInformationVector **inputVector,
69  vtkInformationVector *outputVector);
70 
71  virtual int RequestData(vtkInformation *request,
72  vtkInformationVector **inputVector,
73  vtkInformationVector *outputVector);
74 
75  virtual int CheckTetrahedraWinding(int meshFD);
76  virtual int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput,
77  vtkMultiBlockDataSet *volumeOutput);
78  virtual int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output);
79  virtual int ReadMidpointCoordinates(int meshFD, vtkMultiBlockDataSet *output,
81  virtual int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output,
82  MidpointIdMap &map);
83  virtual int RestoreMeshCache(vtkMultiBlockDataSet *surfaceOutput,
84  vtkMultiBlockDataSet *volumeOutput,
85  vtkMultiBlockDataSet *compositeOutput);
86  virtual int ReadFieldData(int modeFD, vtkMultiBlockDataSet *output);
87 
88  virtual int ReadTetrahedronInteriorArray(int meshFD,
89  vtkIdTypeArray *connectivity);
90  virtual int ReadTetrahedronExteriorArray(int meshFD,
91  vtkIdTypeArray *connectivity);
92 
93  virtual int MeshUpToDate();
94 
95 //BTX
97 
99  virtual vtkSmartPointer<vtkDataArray> ReadPointDataArray(int ncFD, int varId);
100 //ETX
102 
103 //BTX
104  class vtkInternal;
105  vtkInternal *Internal;
106 //ETX
107 
109 
114 
117 
120 
122 
123  vtkIdType StartPointRead(int process) {
124  return process*(this->NumberOfGlobalPoints/this->NumberOfPieces + 1);
125  }
126  vtkIdType EndPointRead(int process) {
127  vtkIdType result = this->StartPointRead(process+1);
128  if (result > this->NumberOfGlobalPoints) result=this->NumberOfGlobalPoints;
129  return result;
130  }
132 
134 
138 
139 private:
140  vtkPSLACReader(const vtkPSLACReader &); // Not implemented
141  void operator=(const vtkPSLACReader &); // Not implemented
142 };
143 
144 #endif //__vtkPSLACReader_h