VTK  9.7.1
vtkPOpenFOAMReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkPOpenFOAMReader_h
22 #define vtkPOpenFOAMReader_h
23 
24 #include "vtkIOParallelModule.h" // For export macro
25 #include "vtkOpenFOAMReader.h"
26 
27 VTK_ABI_NAMESPACE_BEGIN
30 
31 class VTKIOPARALLEL_EXPORT vtkPOpenFOAMReader : public vtkOpenFOAMReader
32 {
33 public:
34  enum caseType
35  {
36  DECOMPOSED_CASE = 0,
37  RECONSTRUCTED_CASE = 1
38  };
39 
40  static vtkPOpenFOAMReader* New();
42 
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  void SetCaseType(int t);
50  vtkGetMacro(CaseType, caseType);
52 
54 
62  void SetReadAllFilesToDetermineStructure(bool);
63  vtkGetMacro(ReadAllFilesToDetermineStructure, bool);
64  vtkBooleanMacro(ReadAllFilesToDetermineStructure, bool);
66 
68 
71  virtual void SetController(vtkMultiProcessController*);
72  vtkGetObjectMacro(Controller, vtkMultiProcessController);
74 
78  double ComputeProgress() override;
79 
80 #if VTK_OPENFOAM_TIME_PROFILING
81  void InitializeRequestInformation() override;
82  void InitializeRequestData() override;
83  void PrintRequestInformation() override;
84  void PrintRequestData() override;
85 #endif
86 
87 protected:
89  ~vtkPOpenFOAMReader() override;
90 
93 
94 private:
95  vtkMultiProcessController* Controller;
96  caseType CaseType;
97  bool ReadAllFilesToDetermineStructure;
98  vtkMTimeType MTimeOld;
99  int NumProcesses;
100  int ProcessId;
101 
102  vtkPOpenFOAMReader(const vtkPOpenFOAMReader&) = delete;
103  void operator=(const vtkPOpenFOAMReader&) = delete;
104 
105  void BroadcastMetaData();
106  void GatherMetaData();
107  void Broadcast(vtkStringArray*);
108  void Broadcast(vtkDataArraySelection*);
109  void AllGather(vtkStringArray*);
110  void AllGather(vtkDataArraySelection*);
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 #endif
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
a vtkAbstractArray subclass for strings
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkOpenFOAMReader * New()
virtual double ComputeProgress()
Compute the progress of the reader.
a simple class to control print indentation
Definition: vtkIndent.h:28
Store on/off settings for data arrays, etc.
reads a dataset in OpenFOAM format
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
reads a decomposed dataset in OpenFOAM format
Store zero or more vtkInformation instances.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
Multiprocessing communication superclass.