Test Matrices

I downloaded three FEA matrices (positive definate and probably symmetric) from Matrix Market.  I added stuff to the diagonals to make them diagonally dominant.

SetDirectory["/home/campus03/struther/Desktop/Link to Courses/5580/CodeFragments/LinearAlgebra/"];
names=FileNames["*mtx.gz"];
{A1,A2,A3}=Sort[Map[Import,names], Length[#1]<Length[#2]&];
Map[MatrixPlot,{A1,A2,A3}]
{n1,n2,n3}=Map[Length, {A1,A2,A3}];
{u1,u2,u3}=Map[ Sin[Range[0.0,1,(1/(#-1))]]&, {n1,n2,n3}];
{b1,b2,b3}={A1.u1,A2.u2,A3.u3};
{Norm[LinearSolve[A1,b1]-u1],Norm[LinearSolve[A2,b2]-u2],Norm[LinearSolve[A3,b3]-u3]}

CountNZ[A_SparseArray]:= Length[ArrayRules[A]]-1
Map[
Histogram[Map[CountNZ,#],
Frame->True,
PlotLabel->Length[#],
FrameLabel->{"nz/row", "count"}]&, {A1,A2,A3}]

Converting matrices to our Row storage format.
Array

SparseToCRS[A_SparseArray]:=Module[
{RulesTemp,i},
Transpose[
Table[
RulesTemp=Drop[ArrayRules[A[[i]]],-1];
{RulesTemp[[All,1,1]],RulesTemp[[All,2]]},
{i,1,Length[A]}]
]
]
A=A1;
{RowIndices,RowValues}=SparseToCRS[A];
SparseMV[{RowIndices_,RowValues_}, x_List]:= Module[
{i},
Table[
js=RowIndices[[i]];
vs=RowValues[[i]];
vs.x[[js]],
{i, Length[RowIndices]}
]
]
x=RandomReal[{-1,1},Length[A]];
Norm[SparseMV[{RowIndices,RowValues},x]-A.x]
Histogram[Map[Length,RowIndices]]

Apparently the condition number of some of the matrices is relatively large.