VTK
9.0.1
Filters
Geometry
vtkStructuredNeighbor.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkStructuredNeighbor.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
=========================================================================*/
22
#ifndef vtkStructuredNeighbor_h
23
#define vtkStructuredNeighbor_h
24
25
#include "vtkFiltersGeometryModule.h"
// For export macro
26
#include "
vtkObject.h
"
27
28
class
VTKFILTERSGEOMETRY_EXPORT
vtkStructuredNeighbor
29
{
30
public
:
31
// An enum that defines the neighboring orientation which is stored in a
32
// 3-tuple vtkStructuredNeighbor::Orientation. In each dimension, there
33
// is a high and low end, the orientation tuple defines how to grow ghost
34
// layers along each dimension.
35
enum
NeighborOrientation
36
{
37
SUBSET_LO = -2,
// The grid is a subset of the neighboring grid and the
38
// ghost layers are pointing away from the low end
39
LO = -1,
// The grid partially overlap with its neighbor on the
40
// low end, thus, ghost layers are pointing away from
41
// the low end
42
ONE_TO_ONE = 0,
// grids abut 1-to-1 in both HI and LO, the
43
// cardinality of both grids is the same in the
44
// corresponding dimension.
45
HI = 1,
// The grid partially overlaps with its neighbor on the
46
// high end, thus, ghost layers are pointing away from
47
// the high end
48
SUBSET_HI = 2,
// The grid is a subset of the neighboring grid and the
49
// ghost layers are pointing away from the high end
50
SUBSET_BOTH = 3,
// The grid is a subset of the neighboring grid and the
51
// ghost layers grow from both low and high ends.
52
SUPERSET = 4,
// grid is a superset of the neighboring grid in the
53
// given direction.
54
UNDEFINED = 5
// the neighboring relationship is undefined, e.g., if
55
// we are checking 2D data, the neighbor orientation
56
// in the 3rd dimension is undefined.
57
};
58
59
// Class Member Variables made public for easier access
60
int
NeighborID
;
// The registered ID of the neighboring grid
61
int
OverlapExtent[6];
// The extent at which the grids overlap
62
int
SendExtent[6];
// The extent that we send to this neighbor
63
int
RcvExtent[6];
// The extent that we receive from this neighbor
64
int
Orientation[3];
// Defines how we are neighboring with this grid, see
65
// NeighborOrientation enum above.
66
70
vtkStructuredNeighbor
();
71
76
vtkStructuredNeighbor
(
const
int
NeiID,
int
overlap[6]);
77
82
vtkStructuredNeighbor
(
const
int
NeiID,
int
overlap[6],
int
orient[3]);
83
87
vtkStructuredNeighbor
(
const
vtkStructuredNeighbor
& N) { *
this
= N; }
88
92
virtual
~vtkStructuredNeighbor
();
93
95
98
vtkStructuredNeighbor
&
operator=
(
const
vtkStructuredNeighbor
& N)
99
{
100
if
(
this
!= &N)
101
{
102
this->Orientation[0] = N.
Orientation
[0];
103
this->Orientation[1] = N.
Orientation
[1];
104
this->Orientation[2] = N.
Orientation
[2];
105
this->NeighborID = N.
NeighborID
;
106
for
(
int
i = 0; i < 6; ++i)
107
{
108
this->SendExtent[i] = N.
SendExtent
[i];
109
this->RcvExtent[i] = N.
RcvExtent
[i];
110
this->OverlapExtent[i] = N.
OverlapExtent
[i];
111
}
// END for
112
}
// END if
113
return
*
this
;
114
}
116
118
124
virtual
void
ComputeSendAndReceiveExtent
(
int
gridRealExtent[6],
int
gridGhostedExtent[6],
125
int
neiRealExtent[6],
int
WholeExtent[6],
const
int
N);
127
};
128
129
#endif
/* vtkStructuredNeighbor_h */
130
// VTK-HeaderTest-Exclude: vtkStructuredNeighbor.h
vtkStructuredNeighbor::vtkStructuredNeighbor
vtkStructuredNeighbor()
Default Constructor.
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.
vtkStructuredNeighbor::NeighborID
int NeighborID
Definition:
vtkStructuredNeighbor.h:60
vtkStructuredNeighbor::OverlapExtent
int OverlapExtent[6]
Definition:
vtkStructuredNeighbor.h:61
vtkStructuredNeighbor::NeighborOrientation
NeighborOrientation
Definition:
vtkStructuredNeighbor.h:36
vtkStructuredNeighbor::vtkStructuredNeighbor
vtkStructuredNeighbor(const vtkStructuredNeighbor &N)
Copy constructor.
Definition:
vtkStructuredNeighbor.h:87
vtkStructuredNeighbor::RcvExtent
int RcvExtent[6]
Definition:
vtkStructuredNeighbor.h:63
vtkStructuredNeighbor::operator=
vtkStructuredNeighbor & operator=(const vtkStructuredNeighbor &N)
Overload assignment operator.
Definition:
vtkStructuredNeighbor.h:98
vtkStructuredNeighbor::vtkStructuredNeighbor
vtkStructuredNeighbor(const int NeiID, int overlap[6], int orient[3])
Custom constructor.
vtkStructuredNeighbor
An internal, light-weight class used to store neighbor information.
Definition:
vtkStructuredNeighbor.h:29
vtkObject.h
vtkStructuredNeighbor::~vtkStructuredNeighbor
virtual ~vtkStructuredNeighbor()
Default destructor.
vtkStructuredNeighbor::vtkStructuredNeighbor
vtkStructuredNeighbor(const int NeiID, int overlap[6])
Custom constructor.
vtkStructuredNeighbor::SendExtent
int SendExtent[6]
Definition:
vtkStructuredNeighbor.h:62
vtkStructuredNeighbor::Orientation
int Orientation[3]
Definition:
vtkStructuredNeighbor.h:64
Generated on Mon Jan 4 2021 21:12:05 for VTK by
1.8.20