VTK
vtkStructuredAMRNeighbor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkStructuredAMRNeighbor.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 vtkStructuredAMRNeighbor_h
27 #define vtkStructuredAMRNeighbor_h
28 
29 #include "vtkFiltersGeometryModule.h" // For export macro
30 #include "vtkStructuredNeighbor.h"
31 
32 class VTKFILTERSGEOMETRY_EXPORT vtkStructuredAMRNeighbor :
34 {
35 public:
36 
37  // An enum that defines the neighbor relationship between the 2 grids.
39  {
40  PARENT, // Neighbor fully contains this grid
41  PARTIALLY_OVERLAPPING_PARENT, // Neighbor partially contains this grid
42  CHILD, // This grid fully contains the neighbor
43  PARTIALLY_OVERLAPPING_CHILD, // This grid partially contains the neighbor
44  SAME_LEVEL_SIBLING, // Grids are adjacent at the same level
45  COARSE_TO_FINE_SIBLING, // Grid is adjacent with a finer neighbor
46  FINE_TO_COARSE_SIBLING, // Grid is adjacent with a coarser neighbor
47  UNDEFINED
48  };
49 
50  // NOTE: The OverlapExtent stores the overlap w.r.t. the neighboring grid
51  // Consequently, GridOverlapExtent stores the overlap extent w.r.t. this grid.
52  int GridOverlapExtent[6]; // The overlap extent w.r.t. this grid
53  int GridLevel; // The level of the grid that has this neighbor
54  int NeighborLevel; // The level of the neighboring grid
55  int RelationShip; // The relationship of the grid with this neighbor
56 
61 
69  const int gridLevel,
70  const int neiID, const int neighborLevel,
71  int gridOverlap[6], int neiOverlap[6],
72  int orient[3],
73  const int relationShip);
74 
79  vtkStructuredNeighbor(N) { *this = N; }
80 
85 
90 
95  void GetReceiveExtentOnGrid(const int ng,int gridExtent[6],int ext[6]);
96 
100  std::string GetRelationShipString();
101 
103 
110  int gridRealExtent[6], int gridGhostedExtent[6], int neiRealExtent[6],
111  int WholeExtent[6], const int N) override;
112 };
114 
115 #endif /* vtkStructuredAMRNeighbor_h */
116 // VTK-HeaderTest-Exclude: vtkStructuredAMRNeighbor.h
vtkStructuredAMRNeighbor(const vtkStructuredAMRNeighbor &N)
Copy constructor.
vtkStructuredNeighbor & operator=(const vtkStructuredNeighbor &N)
Overload assignment operator.
An internal, light-weight class used to store neighbor information.
~vtkStructuredAMRNeighbor() override
Destructor.
An internal, light-weight object used to store neighbor information for AMR grids.
virtual void ComputeSendAndReceiveExtent(int gridRealExtent[6], int gridGhostedExtent[6], int neiRealExtent[6], int WholeExtent[6], const int N)
Computes the SendExtent and the RcvExtent for this neighbor.