Matrix Generator MVMMCD | |
---|---|
Source: | unclear |
Discipline: | Computational fluid dynamics |
Language: | Fortran |
Output format: | matrix-vector multiply |
This test matrix is from the following constant-coefficient convection diffusion equation which is widely used for testing and analyzing numerical methods for the solution of linear system of equations,
where p1, p2 and p3 are positive constants. Discretization by the finite difference scheme with a 5-point stencil on a uniform m × m grid gives rise to a sparse linear system of equations
where A is of order m2 and u and b are now vectors of size m2. Centered differences are used for the first derivatives. If the grid points are numbered using the row-wise natural ordering, then A is a block tridiagonal matrix of the form
with
where .
The spectral decomposition of the convection diffusion matrix is known. For , if is a diagonal matrix with ((i-1)m+j)th diagonal entry
then is symmetric. For , let (k,l) denote (k-1)m-l. Then the (k,l)th unnormalized eigenvector of has (i,j)th entry
The reader may now verify that the (k,l)th eigenvalue of A is
Figure 1 shows the eigenvalue distribution of 961 by 961 convection diffusion matrix with p1 = 25, p2 = 50 and p3 = 250.
Since the normalized eigenvectors of a symmetric matrix are orthogonal, the eigenvectors of A are graded like the diagonal of and the condition number of the eigenvalue problem for A is
Parameters:
N | order of the matrix (must be the square of an integer) |
p1 | coefficient of 2ux in differential operator |
p2 | coefficient of 2uy in differential operator |
p3 | coefficient of -u in differential operator |
[ Home ] [ Search ] [ Browse ] [ Resources ]
Last change in this page: Wed Sep 22 13:37:31 US/Eastern 2004 [Comments: ]