vtkPMergeConnected.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
12 #ifndef vtkPMergeConnected_h
13 #define vtkPMergeConnected_h
14 
16 #include "vtkPVVTKExtensionsCosmoToolsModule.h" // For export macro
17 
20 class vtkIdList;
21 class vtkFloatArray;
22 class vtkIdTypeArray;
23 
24 class VTKPVVTKEXTENSIONSCOSMOTOOLS_EXPORT vtkPMergeConnected : public vtkMultiBlockDataSetAlgorithm
25 {
26 public:
27  static vtkPMergeConnected* New();
29  void PrintSelf(ostream& os, vtkIndent indent);
30 
31  struct FaceWithKey
32  {
33  int num_pts;
35  };
36  struct cmp_ids;
37 
38 protected:
41 
43  int FillOutputPortInformation(int port, vtkInformation* info);
44 
45 private:
46  vtkPMergeConnected(const vtkPMergeConnected&) = delete;
47  void operator=(const vtkPMergeConnected&) = delete;
48 
49  // parallelism
50  int NumProcesses;
51  int MyId;
52  vtkMultiProcessController* Controller;
53  void SetController(vtkMultiProcessController* c);
54 
55  // filter
56  void LocalToGlobalRegionId(vtkMultiProcessController* contr, vtkMultiBlockDataSet* data);
57  void MergeCellsOnRegionId(vtkUnstructuredGrid* ugrid, int target, vtkIdList* facestream);
58  float MergeCellDataOnRegionId(
59  vtkFloatArray* data_array, vtkIdTypeArray* rid_array, vtkIdType target);
60 
61  void delete_key(FaceWithKey* key);
62  FaceWithKey* IdsToKey(vtkIdList* ids);
63 };
64 
65 #endif
int vtkIdType
static vtkMultiBlockDataSetAlgorithm * New()
This filter merges connected voroni tessellation regions based on the global region ID...
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
key