VTK  9.3.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 
17 #ifndef vtkHyperTreeGridPreConfiguredSource_h
18 #define vtkHyperTreeGridPreConfiguredSource_h
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkHyperTreeGrid;
23 class vtkDoubleArray;
24 
25 class VTKFILTERSSOURCES_EXPORT vtkHyperTreeGridPreConfiguredSource
27 {
28 public:
34 
36 
39  void GenerateUnbalanced(vtkHyperTreeGrid* HTG, unsigned int dim, unsigned int factor,
40  unsigned int depth, const std::vector<double>& extent,
41  const std::vector<unsigned int>& subdivisions);
42 
43  void GenerateBalanced(vtkHyperTreeGrid* HTG, unsigned int dim, unsigned int factor,
44  unsigned int depth, const std::vector<double>& extent,
45  const std::vector<unsigned int>& subdivisions);
47 
49 
52  enum HTGType
53  {
60  CUSTOM
61  };
63 
65 
69  {
71  BALANCED
72  };
74 
78  vtkGetEnumMacro(HTGMode, HTGType);
79  vtkSetEnumMacro(HTGMode, HTGType);
80 
82 
85  vtkGetEnumMacro(CustomArchitecture, HTGArchitecture);
86  vtkSetEnumMacro(CustomArchitecture, HTGArchitecture);
87 
91  vtkGetMacro(CustomDim, unsigned int);
92  vtkSetMacro(CustomDim, unsigned int);
93 
97  vtkGetMacro(CustomFactor, unsigned int);
98  vtkSetMacro(CustomFactor, unsigned int);
99 
103  vtkGetMacro(CustomDepth, unsigned int);
104  vtkSetMacro(CustomDepth, unsigned int);
105 
109  vtkGetVector6Macro(CustomExtent, double);
110  vtkSetVector6Macro(CustomExtent, double);
111 
115  vtkGetVector3Macro(CustomSubdivisions, unsigned int);
116  vtkSetVector3Macro(CustomSubdivisions, unsigned int);
118 
120 
123  void GenerateUnbalanced3DepthQuadTree2x3(vtkHyperTreeGrid* HTG);
124 
125  void GenerateBalanced3DepthQuadTree2x3(vtkHyperTreeGrid* HTG);
126 
127  void GenerateUnbalanced2Depth3BranchTree3x3(vtkHyperTreeGrid* HTG);
128 
129  void GenerateBalanced4Depth3BranchTree2x2(vtkHyperTreeGrid* HTG);
130 
131  void GenerateUnbalanced3DepthOctTree3x2x3(vtkHyperTreeGrid* HTG);
132 
133  void GenerateBalanced2Depth3BranchTree3x3x2(vtkHyperTreeGrid* HTG);
134 
135  int GenerateCustom(vtkHyperTreeGrid* HTG);
137 
138 protected:
143  ~vtkHyperTreeGridPreConfiguredSource() override = default;
145 
146  void operator=(const vtkHyperTreeGridPreConfiguredSource&) = delete;
147 
148  int FillOutputPortInformation(int, vtkInformation*) override;
149 
152 
154 
156 
159  void Preprocess(vtkHyperTreeGrid* HTG, unsigned int dim, unsigned int factor,
160  const std::vector<double>& extent, const std::vector<unsigned int>& subdivisions);
161 
165  void RecurseBalanced(
166  vtkHyperTreeGridNonOrientedCursor* cursor, vtkDoubleArray* levels, int maxDepth);
168 
170 
174 
179  unsigned int CustomDim;
180  unsigned int CustomFactor;
181  unsigned int CustomDepth;
182  double CustomExtent[6];
183  unsigned int CustomSubdivisions[3];
185 
186 }; // vtkHyperTreeGridPreConfiguredSource
187 VTK_ABI_NAMESPACE_END
188 
189 #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()
general representation of visualization data
Definition: vtkDataObject.h:54
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...