1%Example of
using MUMPS in matlab with sparse right hansd side
3% initialization of a matlab
MUMPS structure
8%
JOB = 6 means analysis+facto+solve
10% we
set the rigth hand side
11id.RHS = ones(size(
mat,1),2);
12id.RHS(:,2) = 2*
id.RHS(:,2);
13id.RHS = sparse(
id.
RHS);
17 disp(
'WARNING : precision may not be OK');
23% destroy mumps instance
!This file is part of MUMPS
end diagonal values have been computed in the(sparse) matrix id.SOL
end[inform, rinform, sol, inst, schur, redrhs, pivnul_list, sym_perm, uns_perm, icntl, cntl, colsca_out, rowsca_out, keep_out, dkeep_out]
we set the rigth hand side id RHS
****************************************This help menu gives details about the use of dmumps
end norm(mat *id.SOL - id.RHS, 'inf') % solution OK % destroy mumps instance id.JOB
if(norm(mat *id.SOL - id.RHS, 'inf') > sqrt(eps)) disp('WARNING els disp)('SOLUTION OK')