VTK  9.2.6
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 
38 #ifndef vtkPSLACReader_h
39 #define vtkPSLACReader_h
40 
41 #include "vtkIOParallelNetCDFModule.h" // For export macro
42 #include "vtkSLACReader.h"
43 
45 
46 class VTKIOPARALLELNETCDF_EXPORT vtkPSLACReader : public vtkSLACReader
47 {
48 public:
49  vtkTypeMacro(vtkPSLACReader, vtkSLACReader);
50  static vtkPSLACReader* New();
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
54 
60  vtkGetObjectMacro(Controller, vtkMultiProcessController);
61  virtual void SetController(vtkMultiProcessController*);
63 
64 protected:
66  ~vtkPSLACReader() override;
67 
69 
70  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
71  vtkInformationVector* outputVector) override;
72 
73  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
74  vtkInformationVector* outputVector) override;
75 
76  int CheckTetrahedraWinding(int meshFD) override;
77  int ReadConnectivity(
78  int meshFD, vtkMultiBlockDataSet* surfaceOutput, vtkMultiBlockDataSet* volumeOutput) override;
79  int ReadCoordinates(int meshFD, vtkMultiBlockDataSet* output) override;
81  int meshFD, vtkMultiBlockDataSet* output, MidpointCoordinateMap& map) override;
82  int ReadMidpointData(int meshFD, vtkMultiBlockDataSet* output, MidpointIdMap& map) override;
83  int RestoreMeshCache(vtkMultiBlockDataSet* surfaceOutput, vtkMultiBlockDataSet* volumeOutput,
84  vtkMultiBlockDataSet* compositeOutput) override;
85  int ReadFieldData(const int* modeFDArray, int numModeFDs, vtkMultiBlockDataSet* output) override;
86 
87  int ReadTetrahedronInteriorArray(int meshFD, vtkIdTypeArray* connectivity) override;
88  int ReadTetrahedronExteriorArray(int meshFD, vtkIdTypeArray* connectivity) override;
89 
90  int MeshUpToDate() override;
91 
95  vtkSmartPointer<vtkDataArray> ReadPointDataArray(int ncFD, int varId) override;
96 
97  class vtkInternal;
98  vtkInternal* PInternal;
99 
101 
108 
113 
118 
120 
124  {
125  return process * (this->NumberOfGlobalPoints / this->NumberOfPieces + 1);
126  }
127  vtkIdType EndPointRead(int process)
128  {
129  vtkIdType result = this->StartPointRead(process + 1);
130  if (result > this->NumberOfGlobalPoints)
131  result = this->NumberOfGlobalPoints;
132  return result;
133  }
135 
137 
143 
144 private:
145  vtkPSLACReader(const vtkPSLACReader&) = delete;
146  void operator=(const vtkPSLACReader&) = delete;
147 };
148 
149 #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:332
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:52
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:39
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.