VTK  9.3.1
vtkPSLACReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4 
20 #ifndef vtkPSLACReader_h
21 #define vtkPSLACReader_h
22 
23 #include "vtkIOParallelNetCDFModule.h" // For export macro
24 #include "vtkSLACReader.h"
25 
26 VTK_ABI_NAMESPACE_BEGIN
28 
29 class VTKIOPARALLELNETCDF_EXPORT vtkPSLACReader : public vtkSLACReader
30 {
31 public:
32  vtkTypeMacro(vtkPSLACReader, vtkSLACReader);
33  static vtkPSLACReader* New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
37 
43  vtkGetObjectMacro(Controller, vtkMultiProcessController);
44  virtual void SetController(vtkMultiProcessController*);
46 
47 protected:
49  ~vtkPSLACReader() override;
50 
52 
53  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
54  vtkInformationVector* outputVector) override;
55 
56  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
57  vtkInformationVector* outputVector) override;
58 
59  int CheckTetrahedraWinding(int meshFD) override;
60  int ReadConnectivity(
61  int meshFD, vtkMultiBlockDataSet* surfaceOutput, vtkMultiBlockDataSet* volumeOutput) override;
62  int ReadCoordinates(int meshFD, vtkMultiBlockDataSet* output) override;
64  int meshFD, vtkMultiBlockDataSet* output, MidpointCoordinateMap& map) override;
65  int ReadMidpointData(int meshFD, vtkMultiBlockDataSet* output, MidpointIdMap& map) override;
66  int RestoreMeshCache(vtkMultiBlockDataSet* surfaceOutput, vtkMultiBlockDataSet* volumeOutput,
67  vtkMultiBlockDataSet* compositeOutput) override;
68  int ReadFieldData(const int* modeFDArray, int numModeFDs, vtkMultiBlockDataSet* output) override;
69 
70  int ReadTetrahedronInteriorArray(int meshFD, vtkIdTypeArray* connectivity) override;
71  int ReadTetrahedronExteriorArray(int meshFD, vtkIdTypeArray* connectivity) override;
72 
73  int MeshUpToDate() override;
74 
78  vtkSmartPointer<vtkDataArray> ReadPointDataArray(int ncFD, int varId) override;
79 
80  class vtkInternal;
81  vtkInternal* PInternal;
82 
84 
91 
96 
101 
103 
107  {
108  return process * (this->NumberOfGlobalPoints / this->NumberOfPieces + 1);
109  }
110  vtkIdType EndPointRead(int process)
111  {
112  vtkIdType result = this->StartPointRead(process + 1);
113  if (result > this->NumberOfGlobalPoints)
114  result = this->NumberOfGlobalPoints;
115  return result;
116  }
118 
120 
126 
127 private:
128  vtkPSLACReader(const vtkPSLACReader&) = delete;
129  void operator=(const vtkPSLACReader&) = delete;
130 };
131 
132 VTK_ABI_NAMESPACE_END
133 #endif // vtkPSLACReader_h
vtkIdType NumberOfGlobalPoints
The number of points defined in the mesh file.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int ReadTetrahedronInteriorArray(int meshFD, vtkIdTypeArray *connectivity)
Reads tetrahedron connectivity arrays.
virtual vtkSmartPointer< vtkDataArray > ReadPointDataArray(int ncFD, int varId)
Reads point data arrays.
static vtkSLACReader * New()
virtual int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput, vtkMultiBlockDataSet *volumeOutput)
Read the connectivity information from the mesh file.
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:315
virtual int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output, MidpointIdMap &midpointIds)
Read in the midpoint data from the mesh file.
int NumberOfPieces
The number of pieces and the requested piece to load.
A reader for a data format used by Omega3p, Tau3p, and several other tools used at the Standford Line...
Definition: vtkSLACReader.h:35
int RequestedPiece
The number of pieces and the requested piece to load.
Manages a map from edges to midpoint coordinates.
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...
a simple class to control print indentation
Definition: vtkIndent.h:28
int RequestedPieceCache
Piece information from the last call.
virtual int ReadTetrahedronExteriorArray(int meshFD, vtkIdTypeArray *connectivity)
Reads tetrahedron connectivity arrays.
vtkInternal * PInternal
vtkMultiProcessController * Controller
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkIdType StartPointRead(int process)
The start/end points read by the given process.
virtual int MeshUpToDate()
Returns 1 if the mesh is up to date, 0 if the mesh needs to be read from disk.
virtual int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output)
Read in the point coordinate data from the mesh file.
vtkIdType EndPointRead(int process)
The start/end points read by the given process.
virtual int CheckTetrahedraWinding(int meshFD)
Checks the winding of the tetrahedra in the mesh file.
Composite dataset that organizes datasets into blocks.
Store zero or more vtkInformation instances.
int NumberOfPiecesCache
Piece information from the last call.
Extends the vtkSLACReader to read in partitioned pieces.
vtkIdType NumberOfGlobalMidpoints
The number of midpoints defined in the mesh file.
virtual int ReadFieldData(const int *modeFDArray, int numModeFDs, vtkMultiBlockDataSet *output)
Read in the field data from the mode file.
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...
Manages a map from edges to the point id of the midpoint.
Multiprocessing communication superclass.