VTK  9.0.1
vtkCellTypeSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCellTypeSource.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 =========================================================================*/
29 #ifndef vtkCellTypeSource_h
30 #define vtkCellTypeSource_h
31 
32 #include "vtkFiltersSourcesModule.h" // For export macro
34 
35 class vtkMergePoints;
36 
37 class VTKFILTERSSOURCES_EXPORT vtkCellTypeSource : public vtkUnstructuredGridAlgorithm
38 {
39 public:
41 
44  static vtkCellTypeSource* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
53  void SetCellType(int cellType);
54  vtkGetMacro(CellType, int);
56 
58 
67  vtkSetMacro(CellOrder, int);
68  vtkGetMacro(CellOrder, int);
70 
72 
91  vtkSetMacro(CompleteQuadraticSimplicialElements, bool);
92  vtkGetMacro(CompleteQuadraticSimplicialElements, bool);
93  vtkBooleanMacro(CompleteQuadraticSimplicialElements, bool);
95 
97 
101  vtkSetClampMacro(PolynomialFieldOrder, int, 0, VTK_INT_MAX);
102  vtkGetMacro(PolynomialFieldOrder, int);
104 
106 
109  int GetCellDimension();
111 
113 
118  vtkSetClampMacro(OutputPrecision, int, 0, 1);
119  vtkGetMacro(OutputPrecision, int);
121 
123 
129  void SetBlocksDimensions(int*);
130  void SetBlocksDimensions(int, int, int);
131  vtkGetVector3Macro(BlocksDimensions, int);
133 
134 protected:
136  ~vtkCellTypeSource() override {}
137 
140 
141  void GenerateTriangles(vtkUnstructuredGrid*, int extent[6]);
142  void GenerateQuads(vtkUnstructuredGrid*, int extent[6]);
143  void GenerateQuadraticTriangles(vtkUnstructuredGrid*, int extent[6]);
144  void GenerateQuadraticQuads(vtkUnstructuredGrid*, int extent[6]);
145  void GenerateTetras(vtkUnstructuredGrid*, int extent[6]);
146  void GenerateHexahedron(vtkUnstructuredGrid*, int extent[6]);
147  void GenerateWedges(vtkUnstructuredGrid*, int extent[6]);
148  void GeneratePyramids(vtkUnstructuredGrid*, int extent[6]);
149  void GeneratePentagonalPrism(vtkUnstructuredGrid*, int extent[6]);
150  void GenerateHexagonalPrism(vtkUnstructuredGrid*, int extent[6]);
151  void GenerateQuadraticTetras(vtkUnstructuredGrid*, int extent[6]);
152  void GenerateQuadraticHexahedron(vtkUnstructuredGrid*, int extent[6]);
153  void GenerateQuadraticWedges(vtkUnstructuredGrid*, int extent[6]);
154  void GenerateQuadraticPyramids(vtkUnstructuredGrid*, int extent[6]);
155 
156  void GenerateLagrangeCurves(vtkUnstructuredGrid*, int extent[6]);
157  void GenerateLagrangeTris(vtkUnstructuredGrid*, int extent[6]);
158  void GenerateLagrangeQuads(vtkUnstructuredGrid*, int extent[6]);
159  void GenerateLagrangeTets(vtkUnstructuredGrid*, int extent[6]);
160  void GenerateLagrangeHexes(vtkUnstructuredGrid*, int extent[6]);
161  void GenerateLagrangeWedges(vtkUnstructuredGrid*, int extent[6]);
162 
163  void GenerateBezierCurves(vtkUnstructuredGrid*, int extent[6]);
164  void GenerateBezierTris(vtkUnstructuredGrid*, int extent[6]);
165  void GenerateBezierQuads(vtkUnstructuredGrid*, int extent[6]);
166  void GenerateBezierTets(vtkUnstructuredGrid*, int extent[6]);
167  void GenerateBezierHexes(vtkUnstructuredGrid*, int extent[6]);
168  void GenerateBezierWedges(vtkUnstructuredGrid*, int extent[6]);
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 #endif
vtkCellTypeSource::Locator
vtkMergePoints * Locator
Definition: vtkCellTypeSource.h:179
vtkCellTypeSource::CellOrder
int CellOrder
Definition: vtkCellTypeSource.h:175
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkCellTypeSource
Create cells of a given type.
Definition: vtkCellTypeSource.h:37
vtkCellTypeSource::~vtkCellTypeSource
~vtkCellTypeSource() override
Definition: vtkCellTypeSource.h:136
vtkCellTypeSource::PolynomialFieldOrder
int PolynomialFieldOrder
Definition: vtkCellTypeSource.h:178
vtkUnstructuredGridAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkCellTypeSource::CompleteQuadraticSimplicialElements
bool CompleteQuadraticSimplicialElements
Definition: vtkCellTypeSource.h:176
vtkUnstructuredGridAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkX3D::order
@ order
Definition: vtkX3D.h:446
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkUnstructuredGridAlgorithm::New
static vtkUnstructuredGridAlgorithm * New()
vtkUnstructuredGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGridAlgorithm.h
vtkCellTypeSource::OutputPrecision
int OutputPrecision
Definition: vtkCellTypeSource.h:177
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:40
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:92
vtkMergePoints
merge exactly coincident points
Definition: vtkMergePoints.h:33
vtkCellTypeSource::CellType
int CellType
Definition: vtkCellTypeSource.h:174