VTK
vtkParallelReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkParallelReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkParallelReader_h
27 #define vtkParallelReader_h
28 
29 #include "vtkCommonExecutionModelModule.h" // For export macro
30 #include "vtkReaderAlgorithm.h"
31 
32 #include <string> // needed for std::string in the interface
33 
34 struct vtkParallelReaderInternal;
35 
36 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkParallelReader : public vtkReaderAlgorithm
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
48  void AddFileName(const char* fname);
49 
53  void ClearFileNames();
54 
58  int GetNumberOfFileNames() const;
59 
63  const char* GetFileName(int i) const;
64 
69  const char* GetCurrentFileName() const;
70 
72 
77  int ReadMetaData(vtkInformation* metadata) override;
78  int ReadMesh(
79  int piece, int npieces, int nghosts, int timestep,
80  vtkDataObject* output) override;
81  int ReadPoints(
82  int piece, int npieces, int nghosts, int timestep,
83  vtkDataObject* output) override;
84  int ReadArrays(
85  int piece, int npieces, int nghosts, int timestep,
86  vtkDataObject* output) override;
88 
89 protected:
91  ~vtkParallelReader() override;
92 
99  virtual double GetTimeValue(const std::string& fname);
100 
107  virtual int ReadMesh(const std::string& fname,
108  int piece,
109  int npieces,
110  int nghosts,
111  vtkDataObject* output) = 0;
112 
119  virtual int ReadPoints(const std::string& fname,
120  int piece,
121  int npieces,
122  int nghosts,
123  vtkDataObject* output) = 0;
124 
131  virtual int ReadArrays(const std::string& fname,
132  int piece,
133  int npieces,
134  int nghosts,
135  vtkDataObject* output) = 0;
136 
138 
139 private:
140  vtkParallelReader(const vtkParallelReader&) = delete;
141  void operator=(const vtkParallelReader&) = delete;
142 
143  vtkParallelReaderInternal* Internal;
144 };
145 
146 #endif
vtkReaderAlgorithm.h
vtkReaderAlgorithm
Superclass for readers that implement a simplified API.
Definition: vtkReaderAlgorithm.h:37
vtkReaderAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkReaderAlgorithm::ReadPoints
virtual int ReadPoints(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output)=0
Read the points.
vtkReaderAlgorithm::ReadMesh
virtual int ReadMesh(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output)=0
Read the mesh (connectivity) for a given set of data partitioning, number of ghost levels and time st...
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkReaderAlgorithm::ReadMetaData
virtual int ReadMetaData(vtkInformation *metadata)=0
Provide meta-data for the pipeline.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkParallelReader
Superclass for algorithms that are parallel aware.
Definition: vtkParallelReader.h:36
vtkX3D::string
Definition: vtkX3D.h:490
vtkReaderAlgorithm::ReadArrays
virtual int ReadArrays(int piece, int npieces, int nghosts, int timestep, vtkDataObject *output)=0
Read all the arrays (point, cell, field etc.).
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkParallelReader::CurrentFileIndex
int CurrentFileIndex
Definition: vtkParallelReader.h:137