VTK  9.0.1
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 : public vtkStructuredNeighbor
33 {
34 public:
35  // An enum that defines the neighbor relationship between the 2 grids.
37  {
38  PARENT, // Neighbor fully contains this grid
39  PARTIALLY_OVERLAPPING_PARENT, // Neighbor partially contains this grid
40  CHILD, // This grid fully contains the neighbor
41  PARTIALLY_OVERLAPPING_CHILD, // This grid partially contains the neighbor
42  SAME_LEVEL_SIBLING, // Grids are adjacent at the same level
43  COARSE_TO_FINE_SIBLING, // Grid is adjacent with a finer neighbor
44  FINE_TO_COARSE_SIBLING, // Grid is adjacent with a coarser neighbor
45  UNDEFINED
46  };
47 
48  // NOTE: The OverlapExtent stores the overlap w.r.t. the neighboring grid
49  // Consequently, GridOverlapExtent stores the overlap extent w.r.t. this grid.
50  int GridOverlapExtent[6]; // The overlap extent w.r.t. this grid
51  int GridLevel; // The level of the grid that has this neighbor
52  int NeighborLevel; // The level of the neighboring grid
53  int RelationShip; // The relationship of the grid with this neighbor
54 
59 
66  vtkStructuredAMRNeighbor(const int gridLevel, const int neiID, const int neighborLevel,
67  int gridOverlap[6], int neiOverlap[6], int orient[3], const int relationShip);
68 
74  {
75  *this = N;
76  }
77 
82 
87 
92  void GetReceiveExtentOnGrid(const int ng, int gridExtent[6], int ext[6]);
93 
97  std::string GetRelationShipString();
98 
100 
106  void ComputeSendAndReceiveExtent(int gridRealExtent[6], int gridGhostedExtent[6],
107  int neiRealExtent[6], int WholeExtent[6], const int N) override;
109 };
110 
111 #endif /* vtkStructuredAMRNeighbor_h */
112 // VTK-HeaderTest-Exclude: vtkStructuredAMRNeighbor.h
vtkStructuredAMRNeighbor::PARTIALLY_OVERLAPPING_CHILD
@ PARTIALLY_OVERLAPPING_CHILD
Definition: vtkStructuredAMRNeighbor.h:41
vtkStructuredAMRNeighbor::CHILD
@ CHILD
Definition: vtkStructuredAMRNeighbor.h:40
vtkStructuredNeighbor::ComputeSendAndReceiveExtent
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.
vtkStructuredAMRNeighbor::RelationShip
int RelationShip
Definition: vtkStructuredAMRNeighbor.h:53
vtkStructuredAMRNeighbor::COARSE_TO_FINE_SIBLING
@ COARSE_TO_FINE_SIBLING
Definition: vtkStructuredAMRNeighbor.h:43
vtkStructuredAMRNeighbor::FINE_TO_COARSE_SIBLING
@ FINE_TO_COARSE_SIBLING
Definition: vtkStructuredAMRNeighbor.h:44
vtkStructuredNeighbor.h
vtkStructuredAMRNeighbor::PARENT
@ PARENT
Definition: vtkStructuredAMRNeighbor.h:38
vtkStructuredAMRNeighbor::~vtkStructuredAMRNeighbor
~vtkStructuredAMRNeighbor() override
Destructor.
Definition: vtkStructuredAMRNeighbor.h:81
vtkStructuredNeighbor::operator=
vtkStructuredNeighbor & operator=(const vtkStructuredNeighbor &N)
Overload assignment operator.
Definition: vtkStructuredNeighbor.h:98
vtkStructuredAMRNeighbor::NeighborRelationship
NeighborRelationship
Definition: vtkStructuredAMRNeighbor.h:36
vtkStructuredAMRNeighbor::SAME_LEVEL_SIBLING
@ SAME_LEVEL_SIBLING
Definition: vtkStructuredAMRNeighbor.h:42
vtkStructuredAMRNeighbor::vtkStructuredAMRNeighbor
vtkStructuredAMRNeighbor(const vtkStructuredAMRNeighbor &N)
Copy constructor.
Definition: vtkStructuredAMRNeighbor.h:72
vtkStructuredNeighbor
Definition: vtkStructuredNeighbor.h:28
vtkStructuredAMRNeighbor::PARTIALLY_OVERLAPPING_PARENT
@ PARTIALLY_OVERLAPPING_PARENT
Definition: vtkStructuredAMRNeighbor.h:39
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkStructuredAMRNeighbor
Definition: vtkStructuredAMRNeighbor.h:32
vtkStructuredAMRNeighbor::NeighborLevel
int NeighborLevel
Definition: vtkStructuredAMRNeighbor.h:52
vtkStructuredAMRNeighbor::GridLevel
int GridLevel
Definition: vtkStructuredAMRNeighbor.h:51