Information Technology Reference
In-Depth Information
@t
D
@
2
u
@
u
C
f.x;t/;
x
2
.0; 1/; t > 0 :
(7.86)
@x
2
Discrete Functions on a Grid
Look at the grid in Fig.
7.11
. We have drawn grid lines, x
D
x
i
and t
D
t
`
.Itis
convenient to operate with a subscript or index i to count the grid lines x
D
const.
Similarly, we introduce the subscript or index ` to count the grid lines t
D
const.
The spacing between the lines x
D
const is denoted by x. Not surprisingly, t is
the symbol representing the distance between two neighboring lines t
D
const. In
Fig.
7.11
you can see the lines x
D
x
0
D
0, x
D
x
1
D
x, x
D
x
2
D
2x, :::,
x
D
x
9
D
9x
D
1 and t
D
t
0
D
0, t
D
t
1
D
t , t
D
t
2
D
2t , t
D
t
3
D
3t .
In the general case, we can have n grid lines x
D
x
i
D
ix, i
D
0;:::;n.Of
course, x
0
D
0 and x
n
D
1. The corresponding grid spacing x between the n
intervals, made up by the grid lines, is then
x
D
1
n
:
We also assume that we want to compute the solution at m
C
1 time levels, i.e., for
t
D
t
`
D
`t . We count i from 0 and ` from 0; if you find this unnatural you can
introduce your own counting, the only requirement is that you be consistent (which
is hard in practice).
A general grid point is denoted by .x
i
;t
`
/. The value of an arbitrary function
Q.x; t/ at the grid point .x
i
;t
`
/ is written as Q
i
, i.e.,
Q.x
i
;t
`
/
D
Q
i
;
i
D
0;:::;n; `
D
0;:::;m:
t
3
Δ
t
2
1
Fig. 7.11
A computational
grid in the x
t plane. The
grid points are located at the
points of intersection of
the
dashed lines
0
0123456789
x
Δ
x