VTK
9.2.6
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
=========================================================================*/
19
20
#ifndef vtkStructuredNeighbor_h
21
#define vtkStructuredNeighbor_h
22
23
#include "vtkFiltersGeometryModule.h"
// For export macro
24
#include "
vtkObject.h
"
25
26
class
VTKFILTERSGEOMETRY_EXPORT
vtkStructuredNeighbor
27
{
28
public
:
29
// An enum that defines the neighboring orientation which is stored in a
30
// 3-tuple vtkStructuredNeighbor::Orientation. In each dimension, there
31
// is a high and low end, the orientation tuple defines how to grow ghost
32
// layers along each dimension.
33
enum
NeighborOrientation
34
{
35
SUBSET_LO
= -2,
// The grid is a subset of the neighboring grid and the
36
// ghost layers are pointing away from the low end
37
LO
= -1,
// The grid partially overlap with its neighbor on the
38
// low end, thus, ghost layers are pointing away from
39
// the low end
40
ONE_TO_ONE
= 0,
// grids abut 1-to-1 in both HI and LO, the
41
// cardinality of both grids is the same in the
42
// corresponding dimension.
43
HI
= 1,
// The grid partially overlaps with its neighbor on the
44
// high end, thus, ghost layers are pointing away from
45
// the high end
46
SUBSET_HI
= 2,
// The grid is a subset of the neighboring grid and the
47
// ghost layers are pointing away from the high end
48
SUBSET_BOTH
= 3,
// The grid is a subset of the neighboring grid and the
49
// ghost layers grow from both low and high ends.
50
SUPERSET
= 4,
// grid is a superset of the neighboring grid in the
51
// given direction.
52
UNDEFINED
= 5
// the neighboring relationship is undefined, e.g., if
53
// we are checking 2D data, the neighbor orientation
54
// in the 3rd dimension is undefined.
55
};
56
57
// Class Member Variables made public for easier access
58
int
NeighborID
;
// The registered ID of the neighboring grid
59
int
OverlapExtent
[6];
// The extent at which the grids overlap
60
int
SendExtent
[6];
// The extent that we send to this neighbor
61
int
RcvExtent
[6];
// The extent that we receive from this neighbor
62
int
Orientation
[3];
// Defines how we are neighboring with this grid, see
63
// NeighborOrientation enum above.
64
68
vtkStructuredNeighbor
();
69
74
vtkStructuredNeighbor
(
const
int
NeiID,
int
overlap[6]);
75
80
vtkStructuredNeighbor
(
const
int
NeiID,
int
overlap[6],
int
orient[3]);
81
85
vtkStructuredNeighbor
(
const
vtkStructuredNeighbor
& N) { *
this
= N; }
86
90
virtual
~vtkStructuredNeighbor
();
91
93
96
vtkStructuredNeighbor
&
operator=
(
const
vtkStructuredNeighbor
& N)
97
{
98
if
(
this
!= &N)
99
{
100
this->Orientation[0] = N.
Orientation
[0];
101
this->Orientation[1] = N.
Orientation
[1];
102
this->Orientation[2] = N.
Orientation
[2];
103
this->NeighborID = N.
NeighborID
;
104
for
(
int
i = 0; i < 6; ++i)
105
{
106
this->SendExtent[i] = N.
SendExtent
[i];
107
this->RcvExtent[i] = N.
RcvExtent
[i];
108
this->OverlapExtent[i] = N.
OverlapExtent
[i];
109
}
// END for
110
}
// END if
111
return
*
this
;
112
}
113
114
116
122
virtual
void
ComputeSendAndReceiveExtent
(
int
gridRealExtent[6],
int
gridGhostedExtent[6],
123
int
neiRealExtent[6],
int
WholeExtent[6],
const
int
N);
125
};
126
127
#endif
/* vtkStructuredNeighbor_h */
128
// VTK-HeaderTest-Exclude: vtkStructuredNeighbor.h
vtkStructuredNeighbor::OverlapExtent
int OverlapExtent[6]
Definition
vtkStructuredNeighbor.h:59
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::vtkStructuredNeighbor
vtkStructuredNeighbor(const int NeiID, int overlap[6], int orient[3])
Custom constructor.
vtkStructuredNeighbor::operator=
vtkStructuredNeighbor & operator=(const vtkStructuredNeighbor &N)
Overload assignment operator.
Definition
vtkStructuredNeighbor.h:96
vtkStructuredNeighbor::NeighborOrientation
NeighborOrientation
Definition
vtkStructuredNeighbor.h:34
vtkStructuredNeighbor::SUBSET_HI
@ SUBSET_HI
Definition
vtkStructuredNeighbor.h:46
vtkStructuredNeighbor::UNDEFINED
@ UNDEFINED
Definition
vtkStructuredNeighbor.h:52
vtkStructuredNeighbor::SUBSET_BOTH
@ SUBSET_BOTH
Definition
vtkStructuredNeighbor.h:48
vtkStructuredNeighbor::HI
@ HI
Definition
vtkStructuredNeighbor.h:43
vtkStructuredNeighbor::ONE_TO_ONE
@ ONE_TO_ONE
Definition
vtkStructuredNeighbor.h:40
vtkStructuredNeighbor::SUPERSET
@ SUPERSET
Definition
vtkStructuredNeighbor.h:50
vtkStructuredNeighbor::SUBSET_LO
@ SUBSET_LO
Definition
vtkStructuredNeighbor.h:35
vtkStructuredNeighbor::LO
@ LO
Definition
vtkStructuredNeighbor.h:37
vtkStructuredNeighbor::Orientation
int Orientation[3]
Definition
vtkStructuredNeighbor.h:62
vtkStructuredNeighbor::SendExtent
int SendExtent[6]
Definition
vtkStructuredNeighbor.h:60
vtkStructuredNeighbor::NeighborID
int NeighborID
Definition
vtkStructuredNeighbor.h:58
vtkStructuredNeighbor::RcvExtent
int RcvExtent[6]
Definition
vtkStructuredNeighbor.h:61
vtkStructuredNeighbor::~vtkStructuredNeighbor
virtual ~vtkStructuredNeighbor()
Default destructor.
vtkStructuredNeighbor::vtkStructuredNeighbor
vtkStructuredNeighbor(const vtkStructuredNeighbor &N)
Copy constructor.
Definition
vtkStructuredNeighbor.h:85
vtkStructuredNeighbor::vtkStructuredNeighbor
vtkStructuredNeighbor(const int NeiID, int overlap[6])
Custom constructor.
vtkObject.h
Generated on Sun Mar 2 2025 00:00:00 for VTK by
1.13.2