vtkAMRConnectivity.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright 2013 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
13 #ifndef vtkAMRConnectivity_h
14 #define vtkAMRConnectivity_h
15 
17 #include "vtkPVVTKExtensionsAMRModule.h" //needed for exports
18 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
19 #include <string> // STL required.
20 #include <vector> // STL required.
21 
23 class vtkUniformGrid;
24 class vtkIdTypeArray;
25 class vtkIntArray;
28 class vtkAMRConnectivityEquivalence;
29 class vtkMPIController;
31 
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37  static vtkAMRConnectivity* New();
38 
40 
43  void AddInputVolumeArrayToProcess(const char* name);
44  void ClearInputVolumeArrayToProcess();
46 
48 
51  vtkGetMacro(VolumeFractionSurfaceValue, double);
52  vtkSetMacro(VolumeFractionSurfaceValue, double);
54 
56 
59  vtkGetMacro(ResolveBlocks, bool);
60  vtkSetMacro(ResolveBlocks, bool);
62 
64 
67  vtkGetMacro(PropagateGhosts, bool);
68  vtkSetMacro(PropagateGhosts, bool);
70 
71 protected:
73  ~vtkAMRConnectivity() override;
74 
77  vtkAMRConnectivityEquivalence* Equivalence;
78 
81 
82  std::string RegionName;
84 
85  std::vector<std::string> VolumeArrays;
86 
87  std::vector<std::vector<vtkSmartPointer<vtkIdTypeArray>>> BoundaryArrays;
88  std::vector<std::vector<int>> ReceiveList;
89 
90  std::vector<bool> ValidNeighbor;
91  std::vector<std::vector<std::vector<int>>> NeighborList;
92  std::vector<vtkSmartPointer<vtkIntArray>> EquivPairs;
93 
94  int FillInputPortInformation(int port, vtkInformation* info) override;
95  int FillOutputPortInformation(int port, vtkInformation* info) override;
96 
98 
99  int DoRequestData(vtkNonOverlappingAMR*, const char*);
100  int WavePropagation(vtkIdType cellIdStart, vtkUniformGrid* grid, vtkIdTypeArray* regionId,
101  vtkDataArray* volArray, vtkUnsignedCharArray* ghostArray);
102 
103  vtkAMRDualGridHelperBlock* GetBlockNeighbor(vtkAMRDualGridHelperBlock* block, int dir);
104  void ProcessBoundaryAtBlock(vtkNonOverlappingAMR* volume, vtkAMRDualGridHelperBlock* block,
105  vtkAMRDualGridHelperBlock* neighbor, int dir);
106  int ExchangeBoundaries(vtkMPIController* controller);
107  int ExchangeEquivPairs(vtkMPIController* controller);
108  void ProcessBoundaryAtNeighbor(vtkNonOverlappingAMR* volume, vtkIdTypeArray* array);
109 
110 private:
111  vtkAMRConnectivity(const vtkAMRConnectivity&) = delete;
112  void operator=(const vtkAMRConnectivity&) = delete;
113 };
114 
115 #endif /* vtkAMRConnectivity_h */
std::vector< std::string > VolumeArrays
std::vector< std::vector< int > > ReceiveList
std::vector< std::vector< vtkSmartPointer< vtkIdTypeArray > > > BoundaryArrays
int vtkIdType
std::vector< std::vector< std::vector< int > > > NeighborList
std::vector< vtkSmartPointer< vtkIntArray > > EquivPairs
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
static vtkMultiBlockDataSetAlgorithm * New()
virtual int FillOutputPortInformation(int port, vtkInformation *info)
std::vector< bool > ValidNeighbor
vtkAMRDualGridHelper * Helper
#define VTKPVVTKEXTENSIONSAMR_EXPORT
Tools for processing AMR as a dual grid.
Identify fragments in the grid.
virtual int FillInputPortInformation(int port, vtkInformation *info)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkAMRConnectivityEquivalence * Equivalence
void operator=(const vtkObjectBase &)