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 
35 #ifndef vtkPSLACReader_h
36 #define vtkPSLACReader_h
37 
38 #include "vtkIOParallelModule.h" // For export macro
39 #include "vtkSLACReader.h"
40 
42 
43 class VTKIOPARALLEL_EXPORT vtkPSLACReader : public vtkSLACReader
44 {
45 public:
46  vtkTypeMacro(vtkPSLACReader, vtkSLACReader);
47  static vtkPSLACReader *New();
48  void PrintSelf(ostream &os, vtkIndent indent) override;
49 
51 
57  vtkGetObjectMacro(Controller, vtkMultiProcessController);
58  virtual void SetController(vtkMultiProcessController *);
60 
61 protected:
63  ~vtkPSLACReader() override;
64 
66 
68  vtkInformationVector **inputVector,
69  vtkInformationVector *outputVector) override;
70 
71  int RequestData(vtkInformation *request,
72  vtkInformationVector **inputVector,
73  vtkInformationVector *outputVector) override;
74 
75  int CheckTetrahedraWinding(int meshFD) override;
76  int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput,
77  vtkMultiBlockDataSet *volumeOutput) override;
78  int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output) override;
79  int ReadMidpointCoordinates(int meshFD, vtkMultiBlockDataSet *output,
80  MidpointCoordinateMap &map) override;
81  int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output,
82  MidpointIdMap &map) override;
83  int RestoreMeshCache(vtkMultiBlockDataSet *surfaceOutput,
84  vtkMultiBlockDataSet *volumeOutput,
85  vtkMultiBlockDataSet *compositeOutput) override;
86  int ReadFieldData(const int *modeFDArray,
87  int numModeFDs,
88  vtkMultiBlockDataSet *output) override;
89 
90  int ReadTetrahedronInteriorArray(int meshFD,
91  vtkIdTypeArray *connectivity) override;
92  int ReadTetrahedronExteriorArray(int meshFD,
93  vtkIdTypeArray *connectivity) override;
94 
95  int MeshUpToDate() override;
96 
100  vtkSmartPointer<vtkDataArray> ReadPointDataArray(int ncFD, int varId) override;
101 
102  class vtkInternal;
103  vtkInternal *PInternal;
104 
106 
113 
118 
123 
125 
128  vtkIdType StartPointRead(int process) {
129  return process*(this->NumberOfGlobalPoints/this->NumberOfPieces + 1);
130  }
131  vtkIdType EndPointRead(int process) {
132  vtkIdType result = this->StartPointRead(process+1);
133  if (result > this->NumberOfGlobalPoints) result=this->NumberOfGlobalPoints;
134  return result;
135  }
137 
139 
145 
146 private:
147  vtkPSLACReader(const vtkPSLACReader &) = delete;
148  void operator=(const vtkPSLACReader &) = delete;
149 };
150 
151 #endif //vtkPSLACReader_h
vtkSLACReader::MidpointCoordinateMap
Manages a map from edges to midpoint coordinates.
Definition: vtkSLACReader.h:313
vtkSLACReader.h
vtkSLACReader::MidpointIdMap
Manages a map from edges to the point id of the midpoint.
Definition: vtkSLACReader.h:346
vtkSLACReader::ReadFieldData
virtual int ReadFieldData(const int *modeFDArray, int numModeFDs, vtkMultiBlockDataSet *output)
Read in the field data from the mode file.
vtkSLACReader::New
static vtkSLACReader * New()
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkSLACReader::ReadMidpointCoordinates
virtual int ReadMidpointCoordinates(int meshFD, vtkMultiBlockDataSet *output, MidpointCoordinateMap &map)
Reads in the midpoint coordinate data from the mesh file and returns a map from edges to midpoints.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPSLACReader::NumberOfGlobalMidpoints
vtkIdType NumberOfGlobalMidpoints
The number of midpoints defined in the mesh file.
Definition: vtkPSLACReader.h:122
vtkSLACReader::MeshUpToDate
virtual int MeshUpToDate()
Returns 1 if the mesh is up to date, 0 if the mesh needs to be read from disk.
vtkSmartPointer< vtkDataArray >
vtkSLACReader
Definition: vtkSLACReader.h:49
vtkSLACReader::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:45
vtkPSLACReader::StartPointRead
vtkIdType StartPointRead(int process)
The start/end points read by the given process.
Definition: vtkPSLACReader.h:128
vtkSLACReader::CheckTetrahedraWinding
virtual int CheckTetrahedraWinding(int meshFD)
Checks the winding of the tetrahedra in the mesh file.
vtkPSLACReader
Definition: vtkPSLACReader.h:43
vtkSLACReader::RestoreMeshCache
virtual int RestoreMeshCache(vtkMultiBlockDataSet *surfaceOutput, vtkMultiBlockDataSet *volumeOutput, vtkMultiBlockDataSet *compositeOutput)
Instead of reading data from the mesh file, restore the data from the previous mesh file read.
vtkSLACReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:76
vtkSLACReader::ReadMidpointData
virtual int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output, MidpointIdMap &map)
Read in the midpoint data from the mesh file.
vtkSLACReader::ReadPointDataArray
virtual vtkSmartPointer< vtkDataArray > ReadPointDataArray(int ncFD, int varId)
Reads point data arrays.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPSLACReader::NumberOfPieces
int NumberOfPieces
The number of pieces and the requested piece to load.
Definition: vtkPSLACReader.h:110
vtkPSLACReader::NumberOfGlobalPoints
vtkIdType NumberOfGlobalPoints
The number of points defined in the mesh file.
Definition: vtkPSLACReader.h:117
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkSLACReader::ReadTetrahedronInteriorArray
virtual int ReadTetrahedronInteriorArray(int meshFD, vtkIdTypeArray *connectivity)
Reads tetrahedron connectivity arrays.
vtkSLACReader::ReadTetrahedronExteriorArray
virtual int ReadTetrahedronExteriorArray(int meshFD, vtkIdTypeArray *connectivity)
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:35
vtkPSLACReader::PInternal
vtkInternal * PInternal
Definition: vtkPSLACReader.h:102
vtkPSLACReader::EndPointRead
vtkIdType EndPointRead(int process)
Definition: vtkPSLACReader.h:131
vtkPSLACReader::RequestedPieceCache
int RequestedPieceCache
Definition: vtkPSLACReader.h:143
vtkPSLACReader::Controller
vtkMultiProcessController * Controller
Definition: vtkPSLACReader.h:65
vtkPSLACReader::NumberOfPiecesCache
int NumberOfPiecesCache
Piece information from the last call.
Definition: vtkPSLACReader.h:142
vtkSLACReader::ReadConnectivity
virtual int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput, vtkMultiBlockDataSet *volumeOutput)
Read the connectivity information from the mesh file.
vtkSLACReader::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkSLACReader::ReadCoordinates
virtual int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output)
Read in the point coordinate data from the mesh file.
vtkPSLACReader::RequestedPiece
int RequestedPiece
Definition: vtkPSLACReader.h:111