VTK  9.7.1
vtkHyperTreeGridPreConfiguredSource.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 
14 #include "vtkFiltersSourcesModule.h" //for export macro
16 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
17 
18 #ifndef vtkHyperTreeGridPreConfiguredSource_h
19 #define vtkHyperTreeGridPreConfiguredSource_h
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkHyperTreeGrid;
24 class vtkDoubleArray;
25 
28 {
29 public:
35 
37 
40  void GenerateUnbalanced(vtkHyperTreeGrid* HTG, unsigned int dim, unsigned int factor,
41  unsigned int depth, const std::vector<double>& extent,
42  const std::vector<unsigned int>& subdivisions);
43 
44  void GenerateBalanced(vtkHyperTreeGrid* HTG, unsigned int dim, unsigned int factor,
45  unsigned int depth, const std::vector<double>& extent,
46  const std::vector<unsigned int>& subdivisions);
48 
50 
53  enum HTGType
54  {
61  CUSTOM
62  };
64 
66 
70  {
72  BALANCED
73  };
75 
79  vtkGetEnumMacro(HTGMode, HTGType);
80  vtkSetEnumMacro(HTGMode, HTGType);
81 
83 
86  vtkGetEnumMacro(CustomArchitecture, HTGArchitecture);
87  vtkSetEnumMacro(CustomArchitecture, HTGArchitecture);
88 
92  vtkGetMacro(CustomDim, unsigned int);
93  vtkSetMacro(CustomDim, unsigned int);
94 
98  vtkGetMacro(CustomFactor, unsigned int);
99  vtkSetMacro(CustomFactor, unsigned int);
100 
104  vtkGetMacro(CustomDepth, unsigned int);
105  vtkSetMacro(CustomDepth, unsigned int);
106 
110  vtkGetVector6Macro(CustomExtent, double);
111  vtkSetVector6Macro(CustomExtent, double);
112 
116  vtkGetVector3Macro(CustomSubdivisions, unsigned int);
117  vtkSetVector3Macro(CustomSubdivisions, unsigned int);
119 
121 
124  void GenerateUnbalanced3DepthQuadTree2x3(vtkHyperTreeGrid* HTG);
125 
126  void GenerateBalanced3DepthQuadTree2x3(vtkHyperTreeGrid* HTG);
127 
128  void GenerateUnbalanced2Depth3BranchTree3x3(vtkHyperTreeGrid* HTG);
129 
130  void GenerateBalanced4Depth3BranchTree2x2(vtkHyperTreeGrid* HTG);
131 
132  void GenerateUnbalanced3DepthOctTree3x2x3(vtkHyperTreeGrid* HTG);
133 
134  void GenerateBalanced2Depth3BranchTree3x3x2(vtkHyperTreeGrid* HTG);
135 
136  int GenerateCustom(vtkHyperTreeGrid* HTG);
138 
139 protected:
144  ~vtkHyperTreeGridPreConfiguredSource() override = default;
146 
147  void operator=(const vtkHyperTreeGridPreConfiguredSource&) = delete;
148 
149  int FillOutputPortInformation(int, vtkInformation*) override;
150 
153 
155 
157 
160  void Preprocess(vtkHyperTreeGrid* HTG, unsigned int dim, unsigned int factor,
161  const std::vector<double>& extent, const std::vector<unsigned int>& subdivisions);
162 
166  void RecurseBalanced(
167  vtkHyperTreeGridNonOrientedCursor* cursor, vtkDoubleArray* levels, int maxDepth);
169 
171 
175 
180  unsigned int CustomDim;
181  unsigned int CustomFactor;
182  unsigned int CustomDepth;
183  double CustomExtent[6];
184  unsigned int CustomSubdivisions[3];
186 
187 }; // vtkHyperTreeGridPreConfiguredSource
188 VTK_ABI_NAMESPACE_END
189 
190 #endif // vtkHyperTreeGridPreConfiguredSource_h
unsigned int CustomDim
The pre-configuration mode of the generator.
HTGArchitecture CustomArchitecture
All members related to the CUSTOM HTGType.
HTGType HTGMode
The pre-configuration mode of the generator.
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
Store vtkAlgorithm input/output information.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Helper class for generating a curated set of HyperTree Grids (HTGs) for testing purposes.
HTGType
An enum type for referencing preconfigured HTGs.
Objects for traversal a HyperTreeGrid.
dynamic, self-adjusting array of double
unsigned int CustomFactor
The pre-configuration mode of the generator.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Superclass for algorithms that produce a hyper tree grid as output.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_MARSHALAUTO
general representation of visualization data
Definition: vtkDataObject.h:55
HTGArchitecture
An enum type for configuring the type of generation for the CUSTOM HTG type.
unsigned int CustomDepth
The pre-configuration mode of the generator.
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...