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 "vtkSLACReader.h"
41 
43 
45 {
46 public:
47  vtkTypeMacro(vtkPSLACReader, vtkSLACReader);
48  static vtkPSLACReader *New();
49  virtual void PrintSelf(ostream &os, vtkIndent indent);
50 
52 
56  vtkGetObjectMacro(Controller, vtkMultiProcessController);
57  virtual void SetController(vtkMultiProcessController *);
59 
60 protected:
62  ~vtkPSLACReader();
63 
65 
66  virtual int RequestInformation(vtkInformation *request,
67  vtkInformationVector **inputVector,
68  vtkInformationVector *outputVector);
69 
70  virtual int RequestData(vtkInformation *request,
71  vtkInformationVector **inputVector,
72  vtkInformationVector *outputVector);
73 
74  virtual int CheckTetrahedraWinding(int meshFD);
75  virtual int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput,
76  vtkMultiBlockDataSet *volumeOutput);
77  virtual int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output);
78  virtual int ReadMidpointCoordinates(int meshFD, vtkMultiBlockDataSet *output,
80  virtual int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output,
81  MidpointIdMap &map);
82  virtual int RestoreMeshCache(vtkMultiBlockDataSet *surfaceOutput,
83  vtkMultiBlockDataSet *volumeOutput,
84  vtkMultiBlockDataSet *compositeOutput);
85  virtual int ReadFieldData(int modeFD, vtkMultiBlockDataSet *output);
86 
87  virtual int ReadTetrahedronInteriorArray(int meshFD,
88  vtkIdTypeArray *connectivity);
89  virtual int ReadTetrahedronExteriorArray(int meshFD,
90  vtkIdTypeArray *connectivity);
91 
92  virtual int MeshUpToDate();
93 
94 //BTX
96 
98  virtual vtkSmartPointer<vtkDataArray> ReadPointDataArray(int ncFD, int varId);
99 //ETX
101 
102 //BTX
103  class vtkInternal;
104  vtkInternal *Internal;
105 //ETX
106 
108 
113 
116 
119 
121 
122  vtkIdType StartPointRead(int process) {
123  return process*(this->NumberOfGlobalPoints/this->NumberOfPieces + 1);
124  }
125  vtkIdType EndPointRead(int process) {
126  vtkIdType result = this->StartPointRead(process+1);
127  if (result > this->NumberOfGlobalPoints) result=this->NumberOfGlobalPoints;
128  return result;
129  }
131 
133 
137 
138 private:
139  vtkPSLACReader(const vtkPSLACReader &); // Not implemented
140  void operator=(const vtkPSLACReader &); // Not implemented
141 };
142 
143 #endif //__vtkPSLACReader_h