VTK: Filters/Sources/vtkHyperTreeGridPreConfiguredSource.h Source File

| 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
15 #include "vtkHyperTreeGridAlgorithm.h"
16
17 #ifndef vtkHyperTreeGridPreConfiguredSource_h
18 #define vtkHyperTreeGridPreConfiguredSource_h
19
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkHyperTreeGrid;
22 class vtkHyperTreeGridNonOrientedCursor;
23 class vtkDoubleArray;
24
25 class VTKFILTERSSOURCES_EXPORT vtkHyperTreeGridPreConfiguredSource
26 : public vtkHyperTreeGridAlgorithm
27 {
28 public:
32 vtkTypeMacro(vtkHyperTreeGridPreConfiguredSource, vtkHyperTreeGridAlgorithm);
33 static vtkHyperTreeGridPreConfiguredSource* New();
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 {
54 UNBALANCED_3DEPTH_2BRANCH_2X3,
55 BALANCED_3DEPTH_2BRANCH_2X3,
56 UNBALANCED_2DEPTH_3BRANCH_3X3,
57 BALANCED_4DEPTH_3BRANCH_2X2,
58 UNBALANCED_3DEPTH_2BRANCH_3X2X3,
59 BALANCED_2DEPTH_3BRANCH_3X3X2,
60 CUSTOM
61 };
63
65
68 enum HTGArchitecture
69 {
70 UNBALANCED,
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:
142 vtkHyperTreeGridPreConfiguredSource();
143 ~vtkHyperTreeGridPreConfiguredSource() override = default;
144 vtkHyperTreeGridPreConfiguredSource(const vtkHyperTreeGridPreConfiguredSource&) = delete;
145
146 void operator=(const vtkHyperTreeGridPreConfiguredSource&) = delete;
147
148 int FillOutputPortInformation(int, vtkInformation*) override;
149
150 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
151 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
152
153 int ProcessTrees(vtkHyperTreeGrid*, vtkDataObject*) override;
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
173 HTGType HTGMode;
174
178 HTGArchitecture CustomArchitecture;
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
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:40
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:37
vtkHyperTreeGridNonOrientedCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedCursor.h:46
vtkHyperTreeGridPreConfiguredSource
Helper class for generating a curated set of HyperTree Grids (HTGs) for testing purposes.
Definition: vtkHyperTreeGridPreConfiguredSource.h:27
vtkHyperTreeGridPreConfiguredSource::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkHyperTreeGridPreConfiguredSource::operator=
void operator=(const vtkHyperTreeGridPreConfiguredSource &)=delete
vtkHyperTreeGridPreConfiguredSource::vtkSetEnumMacro
vtkSetEnumMacro(CustomArchitecture, HTGArchitecture)
Get/Set for custom architecture.
vtkHyperTreeGridPreConfiguredSource::HTGType
HTGType
An enum type for referencing preconfigured HTGs.
Definition: vtkHyperTreeGridPreConfiguredSource.h:53
vtkHyperTreeGridPreConfiguredSource::UNBALANCED_3DEPTH_2BRANCH_3X2X3
@ UNBALANCED_3DEPTH_2BRANCH_3X2X3
Definition: vtkHyperTreeGridPreConfiguredSource.h:58
vtkHyperTreeGridPreConfiguredSource::UNBALANCED_2DEPTH_3BRANCH_3X3
@ UNBALANCED_2DEPTH_3BRANCH_3X3
Definition: vtkHyperTreeGridPreConfiguredSource.h:56
vtkHyperTreeGridPreConfiguredSource::BALANCED_3DEPTH_2BRANCH_2X3
@ BALANCED_3DEPTH_2BRANCH_2X3
Definition: vtkHyperTreeGridPreConfiguredSource.h:55
vtkHyperTreeGridPreConfiguredSource::BALANCED_2DEPTH_3BRANCH_3X3X2
@ BALANCED_2DEPTH_3BRANCH_3X3X2
Definition: vtkHyperTreeGridPreConfiguredSource.h:59
vtkHyperTreeGridPreConfiguredSource::UNBALANCED_3DEPTH_2BRANCH_2X3
@ UNBALANCED_3DEPTH_2BRANCH_2X3
Definition: vtkHyperTreeGridPreConfiguredSource.h:54
vtkHyperTreeGridPreConfiguredSource::BALANCED_4DEPTH_3BRANCH_2X2
@ BALANCED_4DEPTH_3BRANCH_2X2
Definition: vtkHyperTreeGridPreConfiguredSource.h:57
vtkHyperTreeGridPreConfiguredSource::CustomFactor
unsigned int CustomFactor
The pre-configuration mode of the generator.
Definition: vtkHyperTreeGridPreConfiguredSource.h:180
vtkHyperTreeGridPreConfiguredSource::~vtkHyperTreeGridPreConfiguredSource
~vtkHyperTreeGridPreConfiguredSource() override=default
vtkHyperTreeGridPreConfiguredSource::HTGMode
HTGType HTGMode
The pre-configuration mode of the generator.
Definition: vtkHyperTreeGridPreConfiguredSource.h:173
vtkHyperTreeGridPreConfiguredSource::vtkSetEnumMacro
vtkSetEnumMacro(HTGMode, HTGType)
vtkHyperTreeGridPreConfiguredSource::vtkGetEnumMacro
vtkGetEnumMacro(CustomArchitecture, HTGArchitecture)
Get/Set for custom architecture.
vtkHyperTreeGridPreConfiguredSource::GenerateUnbalanced3DepthQuadTree2x3
void GenerateUnbalanced3DepthQuadTree2x3(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
vtkHyperTreeGridPreConfiguredSource::HTGArchitecture
HTGArchitecture
An enum type for configuring the type of generation for the CUSTOM HTG type.
Definition: vtkHyperTreeGridPreConfiguredSource.h:69
vtkHyperTreeGridPreConfiguredSource::UNBALANCED
@ UNBALANCED
Definition: vtkHyperTreeGridPreConfiguredSource.h:70
vtkHyperTreeGridPreConfiguredSource::GenerateBalanced2Depth3BranchTree3x3x2
void GenerateBalanced2Depth3BranchTree3x3x2(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
vtkHyperTreeGridPreConfiguredSource::GenerateBalanced3DepthQuadTree2x3
void GenerateBalanced3DepthQuadTree2x3(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
vtkHyperTreeGridPreConfiguredSource::ProcessTrees
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) override
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...
vtkHyperTreeGridPreConfiguredSource::New
static vtkHyperTreeGridPreConfiguredSource * New()
vtkHyperTreeGridPreConfiguredSource::Preprocess
void Preprocess(vtkHyperTreeGrid *HTG, unsigned int dim, unsigned int factor, const std::vector< double > &extent, const std::vector< unsigned int > &subdivisions)
Common preprocessing for setting up the HyperTreeGrid for all types.
vtkHyperTreeGridPreConfiguredSource::GenerateBalanced4Depth3BranchTree2x2
void GenerateBalanced4Depth3BranchTree2x2(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
vtkHyperTreeGridPreConfiguredSource::CustomArchitecture
HTGArchitecture CustomArchitecture
All members related to the CUSTOM HTGType.
Definition: vtkHyperTreeGridPreConfiguredSource.h:178
vtkHyperTreeGridPreConfiguredSource::GenerateUnbalanced3DepthOctTree3x2x3
void GenerateUnbalanced3DepthOctTree3x2x3(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
vtkHyperTreeGridPreConfiguredSource::GenerateCustom
int GenerateCustom(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
vtkHyperTreeGridPreConfiguredSource::GenerateUnbalanced2Depth3BranchTree3x3
void GenerateUnbalanced2Depth3BranchTree3x3(vtkHyperTreeGrid *HTG)
Helper functions for generating the different types of HTGs.
vtkHyperTreeGridPreConfiguredSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkHyperTreeGridPreConfiguredSource::vtkHyperTreeGridPreConfiguredSource
vtkHyperTreeGridPreConfiguredSource(const vtkHyperTreeGridPreConfiguredSource &)=delete
vtkHyperTreeGridPreConfiguredSource::vtkGetEnumMacro
vtkGetEnumMacro(HTGMode, HTGType)
Get/Set HyperTreeGrid mode.
vtkHyperTreeGridPreConfiguredSource::CustomDepth
unsigned int CustomDepth
The pre-configuration mode of the generator.
Definition: vtkHyperTreeGridPreConfiguredSource.h:181
vtkHyperTreeGridPreConfiguredSource::CustomDim
unsigned int CustomDim
The pre-configuration mode of the generator.
Definition: vtkHyperTreeGridPreConfiguredSource.h:179
vtkHyperTreeGridPreConfiguredSource::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
vtkHyperTreeGridPreConfiguredSource::vtkHyperTreeGridPreConfiguredSource
vtkHyperTreeGridPreConfiguredSource()
Constructor setup.
vtkHyperTreeGridPreConfiguredSource::GenerateUnbalanced
void GenerateUnbalanced(vtkHyperTreeGrid *HTG, unsigned int dim, unsigned int factor, unsigned int depth, const std::vector< double > &extent, const std::vector< unsigned int > &subdivisions)
Helper methods for generating HTGs.
vtkHyperTreeGridPreConfiguredSource::RecurseBalanced
void RecurseBalanced(vtkHyperTreeGridNonOrientedCursor *cursor, vtkDoubleArray *levels, int maxDepth)
Recursive helper for the BALANCED architecture.
vtkHyperTreeGridPreConfiguredSource::GenerateBalanced
void GenerateBalanced(vtkHyperTreeGrid *HTG, unsigned int dim, unsigned int factor, unsigned int depth, const std::vector< double > &extent, const std::vector< unsigned int > &subdivisions)
Helper methods for generating HTGs.
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:91
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkHyperTreeGridAlgorithm.h