VTK  9.3.1
vtkTemporalFractal.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Kitware, Inc.
3 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkTemporalFractal_h
22 #define vtkTemporalFractal_h
23 
24 #include "vtkAlgorithm.h"
25 #include "vtkFiltersHybridModule.h" // For export macro
26 #include "vtkSmartPointer.h" //for ivars
27 
28 VTK_ABI_NAMESPACE_BEGIN
30 class vtkDataSet;
32 class vtkIntArray;
33 class vtkRectilinearGrid;
34 class vtkUniformGrid;
35 class TemporalFractalOutputUtil;
36 
37 class VTKFILTERSHYBRID_EXPORT vtkTemporalFractal : public vtkAlgorithm
38 {
39 public:
41 
44  static vtkTemporalFractal* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
54  vtkSetMacro(FractalValue, float);
55  vtkGetMacro(FractalValue, float);
57 
59 
64  vtkSetMacro(MaximumLevel, int);
65  vtkGetMacro(MaximumLevel, int);
67 
69 
72  vtkSetMacro(Dimensions, int);
73  vtkGetMacro(Dimensions, int);
75 
77 
80  vtkSetMacro(GhostLevels, vtkTypeBool);
81  vtkGetMacro(GhostLevels, vtkTypeBool);
82  vtkBooleanMacro(GhostLevels, vtkTypeBool);
84 
86 
90  vtkSetMacro(GenerateRectilinearGrids, vtkTypeBool);
91  vtkGetMacro(GenerateRectilinearGrids, vtkTypeBool);
92  vtkBooleanMacro(GenerateRectilinearGrids, vtkTypeBool);
94 
96 
100  vtkSetMacro(DiscreteTimeSteps, vtkTypeBool);
101  vtkGetMacro(DiscreteTimeSteps, vtkTypeBool);
102  vtkBooleanMacro(DiscreteTimeSteps, vtkTypeBool);
104 
106 
109  vtkSetMacro(TwoDimensional, vtkTypeBool);
110  vtkGetMacro(TwoDimensional, vtkTypeBool);
111  vtkBooleanMacro(TwoDimensional, vtkTypeBool);
113 
115 
119  vtkSetMacro(Asymmetric, int);
120  vtkGetMacro(Asymmetric, int);
122 
124 
127  vtkSetMacro(AdaptiveSubdivision, vtkTypeBool);
128  vtkGetMacro(AdaptiveSubdivision, vtkTypeBool);
129  vtkBooleanMacro(AdaptiveSubdivision, vtkTypeBool);
131 
132 protected:
134  ~vtkTemporalFractal() override;
135 
136  int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) override;
137 
139  int EndBlock;
141 
146  vtkInformationVector* outputVector) override;
147 
152  virtual int RequestDataObject(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
153 
158  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
159  vtkInformationVector* outputVector);
160 
162 
166  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
167  vtkInformationVector* outputVector);
168  virtual int RequestOneTimeStep(vtkCompositeDataSet* output, vtkInformation* request,
169  vtkInformationVector** inputVector, vtkInformationVector* outputVector);
171 
172  void Traverse(int& blockId, int level, vtkDataObject* output, int x0, int x1, int y0, int y1,
173  int z0, int z1, int onFace[6]);
174 
175  int LineTest2(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6]);
176  int LineTest(float x0, float y0, float z0, float x1, float y1, float z1, double bds[6], int level,
177  int target);
178 
179  void SetBlockInfo(vtkUniformGrid* grid, int level, int* ext, int onFace[6]);
180  void SetRBlockInfo(vtkRectilinearGrid* grid, int level, int* ext, int onFace[6]);
181 
182  void AddVectorArray(vtkHierarchicalBoxDataSet* output);
183  void AddTestArray(vtkHierarchicalBoxDataSet* output);
184  void AddFractalArray(vtkCompositeDataSet* output);
185  void AddBlockIdArray(vtkHierarchicalBoxDataSet* output);
186  void AddDepthArray(vtkHierarchicalBoxDataSet* output);
187 
188  void AddGhostLevelArray(vtkDataSet* grid, int dim[3], int onFace[6]);
189 
190  int MandelbrotTest(double x, double y);
191  int TwoDTest(double bds[6], int level, int target);
192 
193  void CellExtentToBounds(int level, int ext[6], double bds[6]);
194 
195  void ExecuteRectilinearMandelbrot(vtkRectilinearGrid* grid, double* ptr);
196  double EvaluateSet(double p[4]);
197  void GetContinuousIncrements(int extent[6], vtkIdType& incX, vtkIdType& incY, vtkIdType& incZ);
198 
199  // Dimensions:
200  // Specify blocks relative to this top level block.
201  // For now this has to be set before the blocks are defined.
202  vtkSetVector3Macro(TopLevelSpacing, double);
203  vtkGetVector3Macro(TopLevelSpacing, double);
204  vtkSetVector3Macro(TopLevelOrigin, double);
205  vtkGetVector3Macro(TopLevelOrigin, double);
206 
207  void InternalImageDataCopy(vtkTemporalFractal* src);
208 
217 
218  // New method of specifying blocks.
219  double TopLevelSpacing[3];
220  double TopLevelOrigin[3];
221 
223 
224  double CurrentTime;
225 
228 
229 private:
230  vtkTemporalFractal(const vtkTemporalFractal&) = delete;
231  void operator=(const vtkTemporalFractal&) = delete;
232 };
233 
234 VTK_ABI_NAMESPACE_END
235 #endif
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
Backwards compatibility class.
int vtkIdType
Definition: vtkType.h:315
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:64
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:34
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:51
abstract superclass for composite (multi-block or AMR) datasets
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkTypeBool AdaptiveSubdivision
image data with blanking
vtkSmartPointer< TemporalFractalOutputUtil > OutputUtil
A source to test AMR data object.
vtkTypeBool DiscreteTimeSteps
vtkTypeBool GenerateRectilinearGrids
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:54