VTK  9.1.0
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 "vtkIOParallelNetCDFModule.h" // For export macro
39#include "vtkSLACReader.h"
40
42
43class VTKIOPARALLELNETCDF_EXPORT vtkPSLACReader : public vtkSLACReader
44{
45public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51
57 vtkGetObjectMacro(Controller, vtkMultiProcessController);
60
61protected:
63 ~vtkPSLACReader() override;
64
66
68 vtkInformationVector* outputVector) override;
69
70 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
71 vtkInformationVector* outputVector) override;
72
73 int CheckTetrahedraWinding(int meshFD) override;
75 int meshFD, vtkMultiBlockDataSet* surfaceOutput, vtkMultiBlockDataSet* volumeOutput) override;
76 int ReadCoordinates(int meshFD, vtkMultiBlockDataSet* output) override;
78 int meshFD, vtkMultiBlockDataSet* output, MidpointCoordinateMap& map) override;
79 int ReadMidpointData(int meshFD, vtkMultiBlockDataSet* output, MidpointIdMap& map) override;
81 vtkMultiBlockDataSet* compositeOutput) override;
82 int ReadFieldData(const int* modeFDArray, int numModeFDs, vtkMultiBlockDataSet* output) override;
83
84 int ReadTetrahedronInteriorArray(int meshFD, vtkIdTypeArray* connectivity) override;
85 int ReadTetrahedronExteriorArray(int meshFD, vtkIdTypeArray* connectivity) override;
86
87 int MeshUpToDate() override;
88
93
94 class vtkInternal;
95 vtkInternal* PInternal;
96
98
105
110
115
117
121 {
122 return process * (this->NumberOfGlobalPoints / this->NumberOfPieces + 1);
123 }
125 {
126 vtkIdType result = this->StartPointRead(process + 1);
127 if (result > this->NumberOfGlobalPoints)
128 result = this->NumberOfGlobalPoints;
129 return result;
130 }
132
134
140
141private:
142 vtkPSLACReader(const vtkPSLACReader&) = delete;
143 void operator=(const vtkPSLACReader&) = delete;
144};
145
146#endif // vtkPSLACReader_h
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Composite dataset that organizes datasets into blocks.
Multiprocessing communication superclass.
Extends the vtkSLACReader to read in partitioned pieces.
int ReadTetrahedronInteriorArray(int meshFD, vtkIdTypeArray *connectivity) override
Reads tetrahedron connectivity arrays.
int ReadMidpointData(int meshFD, vtkMultiBlockDataSet *output, MidpointIdMap &map) override
Read in the midpoint data from the mesh file.
vtkIdType NumberOfGlobalPoints
The number of points defined in the mesh file.
virtual void SetController(vtkMultiProcessController *)
The controller used to communicate partition data.
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.
int NumberOfPiecesCache
Piece information from the last call.
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.
int MeshUpToDate() override
Returns 1 if the mesh is up to date, 0 if the mesh needs to be read from disk.
int NumberOfPieces
The number of pieces and the requested piece to load.
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.
vtkMultiProcessController * Controller
vtkInternal * PInternal
int CheckTetrahedraWinding(int meshFD) override
Checks the winding of the tetrahedra in the mesh file.
vtkSmartPointer< vtkDataArray > ReadPointDataArray(int ncFD, int varId) override
Reads point data arrays.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
int ReadTetrahedronExteriorArray(int meshFD, vtkIdTypeArray *connectivity) override
Reads tetrahedron connectivity arrays.
vtkIdType NumberOfGlobalMidpoints
The number of midpoints defined in the mesh file.
int ReadCoordinates(int meshFD, vtkMultiBlockDataSet *output) override
Read in the point coordinate data from the mesh file.
~vtkPSLACReader() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkPSLACReader * New()
int RequestedPieceCache
Piece information from the last call.
int RequestedPiece
The number of pieces and the requested piece to load.
int ReadConnectivity(int meshFD, vtkMultiBlockDataSet *surfaceOutput, vtkMultiBlockDataSet *volumeOutput) override
Read the connectivity information from the mesh file.
vtkIdType EndPointRead(int process)
The start/end points read by the given process.
int ReadFieldData(const int *modeFDArray, int numModeFDs, vtkMultiBlockDataSet *output) override
Read in the field data from the mode file.
Manages a map from edges to midpoint coordinates.
Manages a map from edges to the point id of the midpoint.
A reader for a data format used by Omega3p, Tau3p, and several other tools used at the Standford Line...
Definition: vtkSLACReader.h:50
int vtkIdType
Definition: vtkType.h:332