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 
40 class VTKPVVTKEXTENSIONSAMR_EXPORT vtkAMRDualClip : public vtkMultiBlockDataSetAlgorithm
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
vtkPoints
vtkAMRDualClip::BlockLocator
vtkAMRDualClipLocator * BlockLocator
Definition: vtkAMRDualClip.h:140
vtkAMRDualClip::Cells
vtkCellArray * Cells
Definition: vtkAMRDualClip.h:131
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkAMRDualGridHelper
Tools for processing AMR as a dual grid.
Definition: vtkAMRDualGridHelper.h:37
vtkIdType
int vtkIdType
vtkInformationVector
vtkAMRDualClip::EnableMergePoints
int EnableMergePoints
Definition: vtkAMRDualClip.h:90
vtkAMRDualClip::Controller
vtkMultiProcessController * Controller
Definition: vtkAMRDualClip.h:133
vtkUnsignedCharArray
vtkMultiBlockDataSetAlgorithm::New
static vtkMultiBlockDataSetAlgorithm * New()
vtkMultiBlockDataSetAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkDataArray
vtkAMRDualClip::Helper
vtkAMRDualGridHelper * Helper
Definition: vtkAMRDualClip.h:129
vtkMultiBlockDataSet
vtkAMRDualClip::BlockIdCellArray
vtkIntArray * BlockIdCellArray
Definition: vtkAMRDualClip.h:125
vtkMultiBlockDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkAMRDualGridHelperFace
Definition: vtkAMRDualGridHelper.h:310
vtkDataArraySelection
vtkAMRDualClip::MessageBuffer
int * MessageBuffer
Definition: vtkAMRDualClip.h:137
vtkAMRDualClip::Points
vtkPoints * Points
Definition: vtkAMRDualClip.h:130
vtkAMRDualClip::EnableDegenerateCells
int EnableDegenerateCells
Definition: vtkAMRDualClip.h:88
vtkMultiProcessController
vtkCellData
vtkImageData
vtkIndent
vtkCellArray
vtkIntArray
vtkAMRDualClip::EnableMultiProcessCommunication
int EnableMultiProcessCommunication
Definition: vtkAMRDualClip.h:89
vtkMultiBlockDataSetAlgorithm.h
vtkAMRDualClip::MessageBufferLength
int * MessageBufferLength
Definition: vtkAMRDualClip.h:138
vtkAMRDualClip
Clip (with scalars) an AMR volume to unstructured grid.
Definition: vtkAMRDualClip.h:40
vtkAMRDualClip::EnableInternalDecimation
int EnableInternalDecimation
Definition: vtkAMRDualClip.h:87
vtkDataSet
vtkInformation
vtkMultiBlockDataSetAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkAMRDualClip::IsoValue
double IsoValue
Definition: vtkAMRDualClip.h:84
vtkAMRDualClip::Mesh
vtkUnstructuredGrid * Mesh
Definition: vtkAMRDualClip.h:93
vtkCallbackCommand
vtkDoubleArray
vtkAMRDualClip::LevelMaskPointArray
vtkUnsignedCharArray * LevelMaskPointArray
Definition: vtkAMRDualClip.h:126
vtkAMRDualGridHelperBlock
Definition: vtkAMRDualGridHelper.h:226
vtkUnstructuredGrid
vtkMultiBlockDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkNonOverlappingAMR
vtkMultiBlockDataSetAlgorithm