VTK  9.4.20241118
vtkCONVERGECFDCGNSReader.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
3
25#ifndef vtkCONVERGECFDCGNSReader_h
26#define vtkCONVERGECFDCGNSReader_h
27
28#include "vtkIOCGNSReaderModule.h" // For export macro
29
30#include "vtkNew.h" // for vtkNew
32#include "vtkSmartPointer.h" // for vtkSmartPointer
33
34#include <string> // for std::string
35
36VTK_ABI_NAMESPACE_BEGIN
37class vtkCGNSReader;
39class vtkPolyData;
40
41class VTKIOCGNSREADER_EXPORT vtkCONVERGECFDCGNSReader
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53 vtkGetMacro(PointDataArraySelection, vtkDataArraySelection*);
54
59 vtkGetMacro(CellDataArraySelection, vtkDataArraySelection*);
60
66 vtkGetMacro(ParcelDataArraySelection, vtkDataArraySelection*);
67
72 virtual int CanReadFile(VTK_FILEPATH const std::string& filename);
73
75
78 vtkSetMacro(FileName, std::string);
79 vtkGetMacro(FileName, std::string);
81
82protected:
84 ~vtkCONVERGECFDCGNSReader() override = default;
85
88
89private:
91 void operator=(const vtkCONVERGECFDCGNSReader&) = delete;
92
97 void FindVectorNodeIds(int cgioId, const std::vector<double>& arrayIds, const std::string& prefix,
98 double& vectorXId, double& vectorYId, double& vectorZId) const;
99
103 bool CreateParcelPoints(
104 int cgioId, double parcelXId, double parcelYId, double parcelZId, vtkPolyData* parcel) const;
105
110 vtkSmartPointer<vtkDataArray> ReadParcelDataArray(int cgioId, double dataNodeId,
111 const std::string& name, const std::vector<double>& arrayIds, bool isVector) const;
112
113 std::string FileName;
114 bool DataArraysInitialized = false;
115 vtkNew<vtkDataArraySelection> PointDataArraySelection;
116 vtkNew<vtkDataArraySelection> CellDataArraySelection;
117 vtkNew<vtkDataArraySelection> ParcelDataArraySelection;
118 vtkNew<vtkCGNSReader> CGNSReader;
119};
120
121VTK_ABI_NAMESPACE_END
122#endif // vtkCONVERGECFDCGNSReader_h
vtkCGNSReader creates a multi-block dataset and reads unstructured grids and structured meshes from b...
Reader for CONVERGECFD CGNS post files.
static vtkCONVERGECFDCGNSReader * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Methods for subclasses to override to handle different pipeline requests.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Methods for subclasses to override to handle different pipeline requests.
virtual int CanReadFile(VTK_FILEPATH const std::string &filename)
Return whether the file can be read with this reader.
~vtkCONVERGECFDCGNSReader() override=default
Store on/off settings for data arrays, etc.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition vtkNew.h:167
Superclass for algorithms that produce vtkPartitionedDataSetCollectionAlgorithm.
concrete dataset represents vertices, lines, polygons, and triangle strips
Hold a reference to a vtkObjectBase instance.
#define VTK_FILEPATH