Biomedical Engineering Reference
In-Depth Information
start at the bottom computational surface and proceed on each
horizontal plane in the manner just described, and then go from
bottom to top). The variables are normally stored in computers in
one-dimensional arrays. The convention between the grid locations,
compass notation, and storage locations is indicated in Table 5.1.
Because the matrix A is sparse, it does not make sense to store
it as a two-dimensional array in computer memory (this is standard
practice for full matrices). Storing the elements of each non-zero
diagonal in a separate array of dimension 1 × N i N j , where N i and
N j are the numbers of grid points in the two coordinate directions,
requires only 5 N i 2 N 2 words of storage; full array storage would
require N i 2 N j 2 words of storage. In three dimensions, the numbers
are 7 N i N j N k and N i 2 N j 2 N k 2 , respectively. The difference is suficiently
large that the diagonal-storage scheme may allow the problem to be
kept in main memory when the full-array scheme does not.
If the nodal values are referenced using the grid indices, say G
ij in 2D, they look like matrix elements or components of a tensor.
Since they are actually components of a vector G , they should have
only single index indicated in Table 3.2. The linearized algebraic
equations in two dimensions can now be written in the following
form:
(5.62)
As noted above, it makes little sense to store the matrix as an
array. If, instead, the diagonals are kept in separate arrays, it is
better to give each diagonal a separate name. Since each diagonal
represents the connection to the variable at a node that lies in a
particular direction with respect to the central node, we shall call
them A , A s , A p , A , and A ; their locations in the matrix for a grid
with 5 × 5 internal nodes are shown in Fig. 5.18. With this ordering
of points, each node is identiied with an index l , which is also the
relative storage location. In this notation, Eq. (5.62) can be written
as follows:
G
G
G
G G
A
A
A
A
A
Q
ll N
, -
l N
-
ll
, -1
l
-1
ll l
,
ll
,
1
l
1
ll
,
N
l N
l
j
j
j
G w + A + A G s + A P G P + A G + A G = Q P (5.63)
where the index l , which indicated rows in Eq. (5.62) is understood,
and the index indicating column or location in the vector has been
replaced by the corresponding letter. We shall use this shorthand
notation from now on. When necessary for clarify, the index will be
inserted. A similar treatment applies to three-dimensional problems.
A
 
Search WWH ::




Custom Search