vtkAMRConnectivity.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkAMRConnectivity.h
5 
6  This software is distributed WITHOUT ANY WARRANTY; without even
7  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8  PURPOSE. See the above copyright notice for more information.
9 
10  Copyright 2013 Sandia Corporation.
11  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
12  the U.S. Government retains certain rights in this software.
13 
14 =========================================================================*/
24 #ifndef vtkAMRConnectivity_h
25 #define vtkAMRConnectivity_h
26 
28 #include "vtkPVVTKExtensionsAMRModule.h" //needed for exports
29 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
30 #include <string> // STL required.
31 #include <vector> // STL required.
32 
34 class vtkUniformGrid;
35 class vtkIdTypeArray;
36 class vtkIntArray;
39 class vtkAMRConnectivityEquivalence;
40 class vtkMPIController;
42 
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48  static vtkAMRConnectivity* New();
49 
51 
54  void AddInputVolumeArrayToProcess(const char* name);
55  void ClearInputVolumeArrayToProcess();
57 
59 
62  vtkGetMacro(VolumeFractionSurfaceValue, double);
63  vtkSetMacro(VolumeFractionSurfaceValue, double);
65 
67 
70  vtkGetMacro(ResolveBlocks, bool);
71  vtkSetMacro(ResolveBlocks, bool);
73 
75 
78  vtkGetMacro(PropagateGhosts, bool);
79  vtkSetMacro(PropagateGhosts, bool);
81 
82 protected:
84  ~vtkAMRConnectivity() override;
85 
88  vtkAMRConnectivityEquivalence* Equivalence;
89 
92 
93  std::string RegionName;
95 
96  std::vector<std::string> VolumeArrays;
97 
98  std::vector<std::vector<vtkSmartPointer<vtkIdTypeArray> > > BoundaryArrays;
99  std::vector<std::vector<int> > ReceiveList;
100 
101  std::vector<bool> ValidNeighbor;
102  std::vector<std::vector<std::vector<int> > > NeighborList;
103  std::vector<vtkSmartPointer<vtkIntArray> > EquivPairs;
104 
105  int FillInputPortInformation(int port, vtkInformation* info) override;
106  int FillOutputPortInformation(int port, vtkInformation* info) override;
107 
109 
110  int DoRequestData(vtkNonOverlappingAMR*, const char*);
111  int WavePropagation(vtkIdType cellIdStart, vtkUniformGrid* grid, vtkIdTypeArray* regionId,
112  vtkDataArray* volArray, vtkUnsignedCharArray* ghostArray);
113 
114  vtkAMRDualGridHelperBlock* GetBlockNeighbor(vtkAMRDualGridHelperBlock* block, int dir);
115  void ProcessBoundaryAtBlock(vtkNonOverlappingAMR* volume, vtkAMRDualGridHelperBlock* block,
116  vtkAMRDualGridHelperBlock* neighbor, int dir);
117  int ExchangeBoundaries(vtkMPIController* controller);
118  int ExchangeEquivPairs(vtkMPIController* controller);
119  void ProcessBoundaryAtNeighbor(vtkNonOverlappingAMR* volume, vtkIdTypeArray* array);
120 
121 private:
122  vtkAMRConnectivity(const vtkAMRConnectivity&) = delete;
123  void operator=(const vtkAMRConnectivity&) = delete;
124 };
125 
126 #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 &)