OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
multiplerhs_example.m
Go to the documentation of this file.
1%Example of using MUMPS in matlab with multiple right hand side
2
3% initialization of a matlab MUMPS structure
4id = initmumps;
5id = dmumps(id);
6load lhr01;
7mat = Problem.A;
8% JOB = 6 means analysis+facto+solve
9id.JOB = 6;
10% we set the rigth hand side
11id.RHS = ones(size(mat,1),2);
12id.RHS(:,2) = 2*id.RHS(:,2);
13%call to mumps
14id = dmumps(id,mat);
15if(norm(mat*id.SOL - id.RHS,'inf') > sqrt(eps))
16 disp('WARNING : precision may not be OK');
17else
18 disp('SOLUTION OK');
19end
20norm(mat*id.SOL - id.RHS,'inf')
21% destroy mumps instance
22id.JOB = -2;
23id = dmumps(id)
!This file is part of MUMPS
Definition cmumps_root.h:2
end load lhr01
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]
Definition dmumps.m:40
id SOL
Definition dmumps.m:43
initmumps id
we set the rigth hand side id RHS
end norm(mat *id.SOL - id.RHS, 'inf') % destroy mumps instance id.JOB
if(norm(mat *id.SOL - id.RHS, 'inf') > sqrt(eps)) disp('WARNING els disp)('SOLUTION OK')
****************************************This help menu gives details about the use of dmumps
Definition mumps_help.m:2
#define JOB
Definition mumpsmex.c:33