Graphics Reference
In-Depth Information
the sample points with respect to the grid. However, an implementation
obviously should use integer indices. A standard convention is needed, for
example:
p(i,j,k)
=
p
i,j,k
,
(2.14)
u(i,j,k)
=
u
i−
1
/
2
,j,k
,
(2.15)
v(i,j,k)
=
v
i,j−
1
/
2
,k
,
(2.16)
w(i,j,k)
=
w
i,j,k−
1
/
2
.
(2.17)
Then for an
nx
×
×
nz
grid, the pressure is stored in an
nx
×
×
nz
array, the
u
component in a
(nx+1)
×
ny
×
nz
array, the
v
component in a
nx
×
(ny+1)
×
nz
array, and the
w
component in a
nx
×
ny
×
(nz+1)
array.
ny
ny