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 
38 #ifndef vtkPSLACReader_h
39 #define vtkPSLACReader_h
40 
41 #include "vtkIOParallelModule.h" // For export macro
42 #include "vtkSLACReader.h"
43 
45 
46 class VTKIOPARALLEL_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);
63 
64 protected:
66  ~vtkPSLACReader() override;
67 
69 
71  vtkInformationVector **inputVector,
72  vtkInformationVector *outputVector) override;
73 
75  vtkInformationVector **inputVector,
76  vtkInformationVector *outputVector) override;
77 
78  int CheckTetrahedraWinding(int meshFD) override;
79  int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput,
80  vtkMultiBlockDataSet *volumeOutput) override;
81  int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output) override;
83  MidpointCoordinateMap &map) override;
84  int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output,
85  MidpointIdMap &map) override;
87  vtkMultiBlockDataSet *volumeOutput,
88  vtkMultiBlockDataSet *compositeOutput) override;
89  int ReadFieldData(const int *modeFDArray,
90  int numModeFDs,
91  vtkMultiBlockDataSet *output) override;
92 
94  vtkIdTypeArray *connectivity) override;
96  vtkIdTypeArray *connectivity) override;
97 
98  int MeshUpToDate() override;
99 
103  vtkSmartPointer<vtkDataArray> ReadPointDataArray(int ncFD, int varId) override;
104 
105  class vtkInternal;
106  vtkInternal *PInternal;
107 
109 
116 
121 
126 
128 
131  vtkIdType StartPointRead(int process) {
132  return process*(this->NumberOfGlobalPoints/this->NumberOfPieces + 1);
133  }
134  vtkIdType EndPointRead(int process) {
135  vtkIdType result = this->StartPointRead(process+1);
136  if (result > this->NumberOfGlobalPoints) result=this->NumberOfGlobalPoints;
137  return result;
138  }
140 
142 
148 
149 private:
150  vtkPSLACReader(const vtkPSLACReader &) = delete;
151  void operator=(const vtkPSLACReader &) = delete;
152 };
153 
154 #endif //vtkPSLACReader_h
vtkPSLACReader::ReadMidpointCoordinates
int ReadMidpointCoordinates(int meshFD, vtkMultiBlockDataSet *output, MidpointCoordinateMap &map) override
Reads in the midpoint coordinate data from the mesh file and returns a map from edges to midpoints.
vtkSLACReader::MidpointCoordinateMap
Manages a map from edges to midpoint coordinates.
Definition: vtkSLACReader.h:317
vtkSLACReader.h
vtkSLACReader::MidpointIdMap
Manages a map from edges to the point id of the midpoint.
Definition: vtkSLACReader.h:350
vtkPSLACReader::ReadFieldData
int ReadFieldData(const int *modeFDArray, int numModeFDs, vtkMultiBlockDataSet *output) override
Read in the field data from the mode file.
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkPSLACReader::NumberOfGlobalMidpoints
vtkIdType NumberOfGlobalMidpoints
The number of midpoints defined in the mesh file.
Definition: vtkPSLACReader.h:125
vtkSmartPointer< vtkDataArray >
vtkSLACReader
A reader for a data format used by Omega3p, Tau3p, and several other tools used at the Standford Line...
Definition: vtkSLACReader.h:53
vtkPSLACReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:52
vtkPSLACReader::vtkPSLACReader
vtkPSLACReader()
vtkPSLACReader::StartPointRead
vtkIdType StartPointRead(int process)
The start/end points read by the given process.
Definition: vtkPSLACReader.h:131
vtkPSLACReader
Extends the vtkSLACReader to read in partitioned pieces.
Definition: vtkPSLACReader.h:47
vtkPSLACReader::ReadMidpointData
int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output, MidpointIdMap &map) override
Read in the midpoint data from the mesh file.
vtkPSLACReader::ReadTetrahedronInteriorArray
int ReadTetrahedronInteriorArray(int meshFD, vtkIdTypeArray *connectivity) override
Reads tetrahedron connectivity arrays.
vtkPSLACReader::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:83
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPSLACReader::NumberOfPieces
int NumberOfPieces
The number of pieces and the requested piece to load.
Definition: vtkPSLACReader.h:113
vtkPSLACReader::ReadConnectivity
int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput, vtkMultiBlockDataSet *volumeOutput) override
Read the connectivity information from the mesh file.
vtkPSLACReader::CheckTetrahedraWinding
int CheckTetrahedraWinding(int meshFD) override
Checks the winding of the tetrahedra in the mesh file.
vtkPSLACReader::ReadTetrahedronExteriorArray
int ReadTetrahedronExteriorArray(int meshFD, vtkIdTypeArray *connectivity) override
vtkPSLACReader::NumberOfGlobalPoints
vtkIdType NumberOfGlobalPoints
The number of points defined in the mesh file.
Definition: vtkPSLACReader.h:120
vtkPSLACReader::ReadPointDataArray
vtkSmartPointer< vtkDataArray > ReadPointDataArray(int ncFD, int varId) override
Reads point data arrays.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:42
vtkPSLACReader::PInternal
vtkInternal * PInternal
Definition: vtkPSLACReader.h:105
vtkPSLACReader::ReadCoordinates
int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output) override
Read in the point coordinate data from the mesh file.
vtkPSLACReader::~vtkPSLACReader
~vtkPSLACReader() override
vtkPSLACReader::EndPointRead
vtkIdType EndPointRead(int process)
Definition: vtkPSLACReader.h:134
vtkPSLACReader::RequestedPieceCache
int RequestedPieceCache
Definition: vtkPSLACReader.h:146
vtkPSLACReader::Controller
vtkMultiProcessController * Controller
Definition: vtkPSLACReader.h:68
vtkPSLACReader::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkPSLACReader::SetController
virtual void SetController(vtkMultiProcessController *)
vtkPSLACReader::NumberOfPiecesCache
int NumberOfPiecesCache
Piece information from the last call.
Definition: vtkPSLACReader.h:145
vtkPSLACReader::New
static vtkPSLACReader * New()
vtkPSLACReader::MeshUpToDate
int MeshUpToDate() override
Returns 1 if the mesh is up to date, 0 if the mesh needs to be read from disk.
vtkPSLACReader::RestoreMeshCache
int RestoreMeshCache(vtkMultiBlockDataSet *surfaceOutput, vtkMultiBlockDataSet *volumeOutput, vtkMultiBlockDataSet *compositeOutput) override
Instead of reading data from the mesh file, restore the data from the previous mesh file read.
vtkPSLACReader::RequestedPiece
int RequestedPiece
Definition: vtkPSLACReader.h:114