VTK  9.7.1
vtkCellTypeSource.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
23 #ifndef vtkCellTypeSource_h
24 #define vtkCellTypeSource_h
25 
26 #include "vtkFiltersSourcesModule.h" // For export macro
28 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkMergePoints;
32 
33 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkCellTypeSource
35 {
36 public:
38 
41  static vtkCellTypeSource* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
50  void SetCellType(int cellType);
51  vtkGetMacro(CellType, int);
53 
55 
64  vtkSetMacro(CellOrder, int);
65  vtkGetMacro(CellOrder, int);
67 
69 
88  vtkSetMacro(CompleteQuadraticSimplicialElements, bool);
89  vtkGetMacro(CompleteQuadraticSimplicialElements, bool);
90  vtkBooleanMacro(CompleteQuadraticSimplicialElements, bool);
92 
94 
98  vtkSetClampMacro(PolynomialFieldOrder, int, 0, VTK_INT_MAX);
99  vtkGetMacro(PolynomialFieldOrder, int);
101 
103 
106  int GetCellDimension();
108 
110 
115  vtkSetClampMacro(OutputPrecision, int, 0, 1);
116  vtkGetMacro(OutputPrecision, int);
118 
120 
126  void SetBlocksDimensions(int*);
127  void SetBlocksDimensions(int, int, int);
128  vtkGetVector3Macro(BlocksDimensions, int);
130 
131 protected:
133  ~vtkCellTypeSource() override = default;
134 
137 
138  void GenerateTriangles(vtkUnstructuredGrid*, int extent[6]);
139  void GenerateQuads(vtkUnstructuredGrid*, int extent[6]);
140  void GeneratePolygons(vtkUnstructuredGrid*, int extent[6]);
141  void GeneratePixels(vtkUnstructuredGrid*, int extent[6]);
142  void GenerateQuadraticTriangles(vtkUnstructuredGrid*, int extent[6]);
143  void GenerateQuadraticQuads(vtkUnstructuredGrid*, int extent[6]);
144  void GenerateTetras(vtkUnstructuredGrid*, int extent[6]);
145  void GenerateHexahedron(vtkUnstructuredGrid*, int extent[6]);
146  void GeneratePolyhedron(vtkUnstructuredGrid*, int extent[6]);
147  void GenerateVoxels(vtkUnstructuredGrid*, int extent[6]);
148  void GenerateWedges(vtkUnstructuredGrid*, int extent[6]);
149  void GeneratePyramids(vtkUnstructuredGrid*, int extent[6]);
150  void GeneratePentagonalPrism(vtkUnstructuredGrid*, int extent[6]);
151  void GenerateHexagonalPrism(vtkUnstructuredGrid*, int extent[6]);
152  void GenerateQuadraticTetras(vtkUnstructuredGrid*, int extent[6]);
153  void GenerateQuadraticHexahedron(vtkUnstructuredGrid*, int extent[6]);
154  void GenerateQuadraticWedges(vtkUnstructuredGrid*, int extent[6]);
155  void GenerateQuadraticPyramids(vtkUnstructuredGrid*, int extent[6]);
156  void GenerateTriQuadraticPyramids(vtkUnstructuredGrid*, int extent[6]);
157 
158  void GenerateHighOrderQuads(
159  vtkUnstructuredGrid* output, int extent[6], int cellType, int cellOrder);
160  void GenerateHighOrderHexes(
161  vtkUnstructuredGrid* output, int extent[6], int cellType, int cellOrder);
162  void GenerateHighOrderCurves(vtkUnstructuredGrid*, int extent[6], int cellType, int cellOrder);
163  void GenerateHighOrderTris(
164  vtkUnstructuredGrid*, int extent[6], int cellType, int cellOrder, bool complete);
165  void GenerateHighOrderTets(
166  vtkUnstructuredGrid*, int extent[6], int cellType, int cellOrder, bool complete);
167  void GenerateHighOrderWedges(
168  vtkUnstructuredGrid*, int extent[6], int cellType, int cellOrder, bool complete);
169 
170  virtual void ComputeFields(vtkUnstructuredGrid*);
171  double GetValueOfOrder(int order, double coords[3]);
172 
173  int BlocksDimensions[3];
174  int CellType;
179  vtkMergePoints* Locator; // Only valid during RequestData.
180 
181 private:
182  vtkCellTypeSource(const vtkCellTypeSource&) = delete;
183  void operator=(const vtkCellTypeSource&) = delete;
184 };
185 
186 VTK_ABI_NAMESPACE_END
187 #endif
vtkMergePoints * Locator
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store vtkAlgorithm input/output information.
#define VTK_INT_MAX
Definition: vtkType.h:192
static vtkUnstructuredGridAlgorithm * New()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
bool CompleteQuadraticSimplicialElements
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
merge exactly coincident points
dataset represents arbitrary combinations of all possible cell types
Superclass for algorithms that produce only unstructured grid as output.
Create cells of a given type.
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO