vtkAMRDualClip.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
3 // SPDX-License-Identifier: BSD-3-Clause
15 #ifndef vtkAMRDualClip_h
16 #define vtkAMRDualClip_h
17 
19 #include "vtkPVVTKExtensionsAMRModule.h" //needed for exports
20 
21 class vtkDataSet;
22 class vtkImageData;
25 class vtkPoints;
27 class vtkDoubleArray;
28 class vtkCellArray;
29 class vtkCellData;
30 class vtkIntArray;
33 class vtkCallbackCommand;
34 
38 class vtkAMRDualClipLocator;
39 
41 {
42 public:
43  static vtkAMRDualClip* New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
47  vtkSetMacro(IsoValue, double);
48  vtkGetMacro(IsoValue, double);
49 
51 
56  vtkSetMacro(EnableInternalDecimation, int);
57  vtkGetMacro(EnableInternalDecimation, int);
58  vtkSetMacro(EnableDegenerateCells, int);
59  vtkGetMacro(EnableDegenerateCells, int);
60  vtkBooleanMacro(EnableDegenerateCells, int);
61  vtkSetMacro(EnableMultiProcessCommunication, int);
62  vtkGetMacro(EnableMultiProcessCommunication, int);
63  vtkBooleanMacro(EnableMultiProcessCommunication, int);
65 
67 
72  vtkSetMacro(EnableMergePoints, int);
73  vtkGetMacro(EnableMergePoints, int);
74  vtkBooleanMacro(EnableMergePoints, int);
76 
77  vtkGetObjectMacro(Controller, vtkMultiProcessController);
78  virtual void SetController(vtkMultiProcessController*);
79 
80 protected:
82  ~vtkAMRDualClip() override;
83 
84  double IsoValue;
85 
86  // Algorithm options that may improve performance.
91 
92  // Needed for copying cell data to point data.
94 
96 
97  void InitializeCopyAttributes(vtkNonOverlappingAMR* hbdsInput, vtkDataSet* mesh);
98 
103  vtkMultiBlockDataSet* DoRequestData(vtkNonOverlappingAMR* input, const char* arrayNameToProcess);
104 
105  int FillInputPortInformation(int port, vtkInformation* info) override;
106  int FillOutputPortInformation(int port, vtkInformation* info) override;
107 
108  void ShareBlockLocatorWithNeighbors(vtkAMRDualGridHelperBlock* block);
109 
110  void ProcessBlock(vtkAMRDualGridHelperBlock* block, int blockId, const char* arrayName);
111 
112  void ProcessDualCell(vtkAMRDualGridHelperBlock* block, int blockId, int x, int y, int z,
113  vtkIdType cornerOffsets[8], vtkDataArray* volumeFractionArray);
114 
115  void InitializeLevelMask(vtkAMRDualGridHelperBlock* block);
116  void ShareLevelMask(vtkAMRDualGridHelperBlock* block);
117  void DistributeLevelMasks();
118 
119  // void DebugCases();
120  // void PermuteCases();
121  // void MirrorCases();
122  // void AddGlyph(double x, double y, double z);
123 
124  // Stuff exclusively for debugging.
127 
128  // Ivars used to reduce method parrameters.
132 
134 
135  // I made these ivars to avoid allocating multiple times.
136  // The buffer is not used too many times, but .....
139 
140  vtkAMRDualClipLocator* BlockLocator;
141 
142 private:
143  vtkAMRDualClip(const vtkAMRDualClip&) = delete;
144  void operator=(const vtkAMRDualClip&) = delete;
145 };
146 
147 #endif
vtkMultiProcessController * Controller
Clip (with scalars) an AMR volume to unstructured grid.
vtkCellArray * Cells
vtkAMRDualGridHelper * Helper
int vtkIdType
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
static vtkMultiBlockDataSetAlgorithm * New()
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkPoints * Points
vtkIntArray * BlockIdCellArray
int EnableMultiProcessCommunication
vtkUnstructuredGrid * Mesh
#define VTKPVVTKEXTENSIONSAMR_EXPORT
Tools for processing AMR as a dual grid.
int * MessageBufferLength
vtkUnsignedCharArray * LevelMaskPointArray
virtual int FillInputPortInformation(int port, vtkInformation *info)
int EnableInternalDecimation
vtkAMRDualClipLocator * BlockLocator
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void operator=(const vtkObjectBase &)