vtkAMRDualClip.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMRDualClip.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkAMRDualClip_h
27 #define vtkAMRDualClip_h
28 
30 #include "vtkPVVTKExtensionsAMRModule.h" //needed for exports
31 
32 class vtkDataSet;
33 class vtkImageData;
36 class vtkPoints;
38 class vtkDoubleArray;
39 class vtkCellArray;
40 class vtkCellData;
41 class vtkIntArray;
44 class vtkCallbackCommand;
45 
49 class vtkAMRDualClipLocator;
50 
52 {
53 public:
54  static vtkAMRDualClip* New();
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
58  vtkSetMacro(IsoValue, double);
59  vtkGetMacro(IsoValue, double);
60 
62 
67  vtkSetMacro(EnableInternalDecimation, int);
68  vtkGetMacro(EnableInternalDecimation, int);
69  vtkSetMacro(EnableDegenerateCells, int);
70  vtkGetMacro(EnableDegenerateCells, int);
71  vtkBooleanMacro(EnableDegenerateCells, int);
72  vtkSetMacro(EnableMultiProcessCommunication, int);
73  vtkGetMacro(EnableMultiProcessCommunication, int);
74  vtkBooleanMacro(EnableMultiProcessCommunication, int);
76 
78 
83  vtkSetMacro(EnableMergePoints, int);
84  vtkGetMacro(EnableMergePoints, int);
85  vtkBooleanMacro(EnableMergePoints, int);
87 
88  vtkGetObjectMacro(Controller, vtkMultiProcessController);
89  virtual void SetController(vtkMultiProcessController*);
90 
91 protected:
93  ~vtkAMRDualClip() override;
94 
95  double IsoValue;
96 
97  // Algorithm options that may improve performance.
102 
103  // Needed for copying cell data to point data.
105 
107 
108  void InitializeCopyAttributes(vtkNonOverlappingAMR* hbdsInput, vtkDataSet* mesh);
109 
114  vtkMultiBlockDataSet* DoRequestData(vtkNonOverlappingAMR* input, const char* arrayNameToProcess);
115 
116  int FillInputPortInformation(int port, vtkInformation* info) override;
117  int FillOutputPortInformation(int port, vtkInformation* info) override;
118 
119  void ShareBlockLocatorWithNeighbors(vtkAMRDualGridHelperBlock* block);
120 
121  void ProcessBlock(vtkAMRDualGridHelperBlock* block, int blockId, const char* arrayName);
122 
123  void ProcessDualCell(vtkAMRDualGridHelperBlock* block, int blockId, int x, int y, int z,
124  vtkIdType cornerOffsets[8], vtkDataArray* volumeFractionArray);
125 
126  void InitializeLevelMask(vtkAMRDualGridHelperBlock* block);
127  void ShareLevelMask(vtkAMRDualGridHelperBlock* block);
128  void DistributeLevelMasks();
129 
130  // void DebugCases();
131  // void PermuteCases();
132  // void MirrorCases();
133  // void AddGlyph(double x, double y, double z);
134 
135  // Stuff exclusively for debugging.
138 
139  // Ivars used to reduce method parrameters.
143 
145 
146  // I made these ivars to avoid allocating multiple times.
147  // The buffer is not used too many times, but .....
150 
151  vtkAMRDualClipLocator* BlockLocator;
152 
153 private:
154  vtkAMRDualClip(const vtkAMRDualClip&) = delete;
155  void operator=(const vtkAMRDualClip&) = delete;
156 };
157 
158 #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 &)