VTK  9.4.20251203
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
29VTK_ABI_NAMESPACE_BEGIN
30class vtkMergePoints;
31
32class VTKFILTERSSOURCES_EXPORT vtkCellTypeSource : public vtkUnstructuredGridAlgorithm
33{
34public:
36
41 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
48 void SetCellType(int cellType);
49 vtkGetMacro(CellType, int);
51
53
62 vtkSetMacro(CellOrder, int);
63 vtkGetMacro(CellOrder, int);
65
67
86 vtkSetMacro(CompleteQuadraticSimplicialElements, bool);
87 vtkGetMacro(CompleteQuadraticSimplicialElements, bool);
88 vtkBooleanMacro(CompleteQuadraticSimplicialElements, bool);
90
92
96 vtkSetClampMacro(PolynomialFieldOrder, int, 0, VTK_INT_MAX);
97 vtkGetMacro(PolynomialFieldOrder, int);
99
101
106
108
113 vtkSetClampMacro(OutputPrecision, int, 0, 1);
114 vtkGetMacro(OutputPrecision, int);
116
118
125 void SetBlocksDimensions(int, int, int);
126 vtkGetVector3Macro(BlocksDimensions, int);
128
129protected:
131 ~vtkCellTypeSource() override = default;
132
135
137 void GenerateQuads(vtkUnstructuredGrid*, int extent[6]);
139 void GeneratePixels(vtkUnstructuredGrid*, int extent[6]);
142 void GenerateTetras(vtkUnstructuredGrid*, int extent[6]);
145 void GenerateVoxels(vtkUnstructuredGrid*, int extent[6]);
146 void GenerateWedges(vtkUnstructuredGrid*, int extent[6]);
155
157 vtkUnstructuredGrid* output, int extent[6], int cellType, int cellOrder);
159 vtkUnstructuredGrid* output, int extent[6], int cellType, int cellOrder);
160 void GenerateHighOrderCurves(vtkUnstructuredGrid*, int extent[6], int cellType, int cellOrder);
162 vtkUnstructuredGrid*, int extent[6], int cellType, int cellOrder, bool complete);
164 vtkUnstructuredGrid*, int extent[6], int cellType, int cellOrder, bool complete);
166 vtkUnstructuredGrid*, int extent[6], int cellType, int cellOrder, bool complete);
167
168 VTK_DEPRECATED_IN_9_4_0("Use GenerateHighOrderCurve instead.")
169 void GenerateLagrangeCurves(vtkUnstructuredGrid*, int extent[6]);
170 VTK_DEPRECATED_IN_9_4_0("Use GenerateHighOrderTris instead.")
171 void GenerateLagrangeTris(vtkUnstructuredGrid*, int extent[6]);
172 VTK_DEPRECATED_IN_9_4_0("Use GenerateHighOrderTets instead.")
173 void GenerateLagrangeTets(vtkUnstructuredGrid*, int extent[6]);
174 VTK_DEPRECATED_IN_9_4_0("Use GenerateHighOrderWedges instead.")
175 void GenerateLagrangeWedges(vtkUnstructuredGrid*, int extent[6]);
176
177 VTK_DEPRECATED_IN_9_4_0("Use GenerateHighOrderCurve instead.")
178 void GenerateBezierCurves(vtkUnstructuredGrid*, int extent[6]);
179 VTK_DEPRECATED_IN_9_4_0("Use GenerateHighOrderTris instead.")
180 void GenerateBezierTris(vtkUnstructuredGrid*, int extent[6]);
181 VTK_DEPRECATED_IN_9_4_0("Use GenerateHighOrderTets instead.")
182 void GenerateBezierTets(vtkUnstructuredGrid*, int extent[6]);
183 VTK_DEPRECATED_IN_9_4_0("Use GenerateHighOrderWedges instead.")
184 void GenerateBezierWedges(vtkUnstructuredGrid*, int extent[6]);
185
186 virtual void ComputeFields(vtkUnstructuredGrid*);
187 double GetValueOfOrder(int order, double coords[3]);
188
189 int BlocksDimensions[3];
190 int CellType;
191 int CellOrder;
192 bool CompleteQuadraticSimplicialElements;
193 int OutputPrecision;
194 int PolynomialFieldOrder;
195 vtkMergePoints* Locator; // Only valid during RequestData.
196
197private:
198 vtkCellTypeSource(const vtkCellTypeSource&) = delete;
199 void operator=(const vtkCellTypeSource&) = delete;
200};
201
202VTK_ABI_NAMESPACE_END
203#endif
Create cells of a given type.
void GenerateQuadraticTriangles(vtkUnstructuredGrid *, int extent[6])
void GenerateHighOrderCurves(vtkUnstructuredGrid *, int extent[6], int cellType, int cellOrder)
void GenerateWedges(vtkUnstructuredGrid *, int extent[6])
void SetBlocksDimensions(int *)
Set the number of cells in each direction.
void GenerateHighOrderHexes(vtkUnstructuredGrid *output, int extent[6], int cellType, int cellOrder)
void GeneratePentagonalPrism(vtkUnstructuredGrid *, int extent[6])
void GenerateVoxels(vtkUnstructuredGrid *, int extent[6])
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetBlocksDimensions(int, int, int)
Set the number of cells in each direction.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
~vtkCellTypeSource() override=default
void GenerateQuadraticPyramids(vtkUnstructuredGrid *, int extent[6])
static vtkCellTypeSource * New()
Standard methods for instantiation, obtaining type and printing instance values.
void GeneratePolygons(vtkUnstructuredGrid *, int extent[6])
void GenerateHighOrderTets(vtkUnstructuredGrid *, int extent[6], int cellType, int cellOrder, bool complete)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type and printing instance values.
void GenerateHighOrderQuads(vtkUnstructuredGrid *output, int extent[6], int cellType, int cellOrder)
void GenerateQuadraticHexahedron(vtkUnstructuredGrid *, int extent[6])
void GenerateHighOrderWedges(vtkUnstructuredGrid *, int extent[6], int cellType, int cellOrder, bool complete)
void GenerateQuads(vtkUnstructuredGrid *, int extent[6])
int GetCellDimension()
Get the dimension of the cell blocks to be generated.
void GenerateTriangles(vtkUnstructuredGrid *, int extent[6])
void GeneratePixels(vtkUnstructuredGrid *, int extent[6])
void GenerateHexagonalPrism(vtkUnstructuredGrid *, int extent[6])
void GenerateQuadraticWedges(vtkUnstructuredGrid *, int extent[6])
void GenerateQuadraticQuads(vtkUnstructuredGrid *, int extent[6])
void SetCellType(int cellType)
Set/Get the type of cells to be generated.
void GenerateTetras(vtkUnstructuredGrid *, int extent[6])
void GenerateQuadraticTetras(vtkUnstructuredGrid *, int extent[6])
void GeneratePyramids(vtkUnstructuredGrid *, int extent[6])
void GeneratePolyhedron(vtkUnstructuredGrid *, int extent[6])
void GenerateHexahedron(vtkUnstructuredGrid *, int extent[6])
void GenerateTriQuadraticPyramids(vtkUnstructuredGrid *, int extent[6])
void GenerateHighOrderTris(vtkUnstructuredGrid *, int extent[6], int cellType, int cellOrder, bool complete)
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
merge exactly coincident points
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
#define VTK_DEPRECATED_IN_9_4_0(reason)
#define VTK_INT_MAX
Definition vtkType.h:144