VTK  9.1.0
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 =========================================================================*/
24#ifndef vtkStructuredAMRNeighbor_h
25#define vtkStructuredAMRNeighbor_h
26
27#include "vtkFiltersGeometryModule.h" // For export macro
29
30class VTKFILTERSGEOMETRY_EXPORT vtkStructuredAMRNeighbor : public vtkStructuredNeighbor
31{
32public:
33 // An enum that defines the neighbor relationship between the 2 grids.
35 {
36 PARENT, // Neighbor fully contains this grid
37 PARTIALLY_OVERLAPPING_PARENT, // Neighbor partially contains this grid
38 CHILD, // This grid fully contains the neighbor
39 PARTIALLY_OVERLAPPING_CHILD, // This grid partially contains the neighbor
40 SAME_LEVEL_SIBLING, // Grids are adjacent at the same level
41 COARSE_TO_FINE_SIBLING, // Grid is adjacent with a finer neighbor
42 FINE_TO_COARSE_SIBLING, // Grid is adjacent with a coarser neighbor
43 UNDEFINED
44 };
45
46 // NOTE: The OverlapExtent stores the overlap w.r.t. the neighboring grid
47 // Consequently, GridOverlapExtent stores the overlap extent w.r.t. this grid.
48 int GridOverlapExtent[6]; // The overlap extent w.r.t. this grid
49 int GridLevel; // The level of the grid that has this neighbor
50 int NeighborLevel; // The level of the neighboring grid
51 int RelationShip; // The relationship of the grid with this neighbor
52
57
64 vtkStructuredAMRNeighbor(const int gridLevel, const int neiID, const int neighborLevel,
65 int gridOverlap[6], int neiOverlap[6], int orient[3], const int relationShip);
66
72 {
73 *this = N;
74 }
75
79 ~vtkStructuredAMRNeighbor() override = default;
80
85
90 void GetReceiveExtentOnGrid(const int ng, int gridExtent[6], int ext[6]);
91
96
98
104 void ComputeSendAndReceiveExtent(int gridRealExtent[6], int gridGhostedExtent[6],
105 int neiRealExtent[6], int WholeExtent[6], const int N) override;
107};
108
109#endif /* vtkStructuredAMRNeighbor_h */
110// VTK-HeaderTest-Exclude: vtkStructuredAMRNeighbor.h
An internal, light-weight object used to store neighbor information for AMR grids.
vtkStructuredAMRNeighbor & operator=(const vtkStructuredAMRNeighbor &N)
Overload assignment operator.
~vtkStructuredAMRNeighbor() override=default
Destructor.
std::string GetRelationShipString()
Returns the neighbor relationship as a string (useful for debugging).
void ComputeSendAndReceiveExtent(int gridRealExtent[6], int gridGhostedExtent[6], int neiRealExtent[6], int WholeExtent[6], const int N) override
Computes the SendExtent and RcvExtent for this neighbor.
vtkStructuredAMRNeighbor(const vtkStructuredAMRNeighbor &N)
Copy constructor.
vtkStructuredAMRNeighbor(const int gridLevel, const int neiID, const int neighborLevel, int gridOverlap[6], int neiOverlap[6], int orient[3], const int relationShip)
Custom constructor.
void GetReceiveExtentOnGrid(const int ng, int gridExtent[6], int ext[6])
Returns the receive extent w.r.t.
vtkStructuredAMRNeighbor()
Default constructor.
An internal, light-weight class used to store neighbor information.
@ string
Definition: vtkX3D.h:496