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
4
id
= initmumps;
5
id
=
dmumps
(
id
);
6
load
lhr01
;
7
mat
= Problem.A;
8
%
JOB
= 6 means analysis+facto+solve
9
id
.
JOB
= 6;
10
% we
set
the
rigth hand side
11
id
.RHS = ones(size(
mat
,1),2);
12
id
.RHS(:,2) = 2*
id
.RHS(:,2);
13
%call to mumps
14
id
=
dmumps
(
id
,
mat
);
15
if
(
norm
(
mat
*
id
.
SOL
-
id
.
RHS
,
'inf'
) > sqrt(eps))
16
disp
(
'WARNING : precision may not be OK'
);
17
else
18
disp
(
'SOLUTION OK'
);
19
end
20
norm
(
mat
*
id
.
SOL
-
id
.
RHS
,
'inf'
)
21
% destroy mumps instance
22
id
.JOB = -2;
23
id
=
dmumps
(
id
)
MUMPS
!This file is part of MUMPS
Definition
cmumps_root.h:2
lhr01
end load lhr01
Definition
diagainv_example.m:13
mat
mat
Definition
diagainv_example.m:14
the
end diagonal values have been computed in the(sparse) matrix id.SOL
end
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
SOL
id SOL
Definition
dmumps.m:43
id
initmumps id
Definition
multiplerhs_example.m:4
RHS
we set the rigth hand side id RHS
Definition
multiplerhs_example.m:11
norm
end norm(mat *id.SOL - id.RHS, 'inf') % destroy mumps instance id.JOB
disp
if(norm(mat *id.SOL - id.RHS, 'inf') > sqrt(eps)) disp('WARNING els disp)('SOLUTION OK')
Definition
multiplerhs_example.m:18
dmumps
****************************************This help menu gives details about the use of dmumps
Definition
mumps_help.m:2
JOB
#define JOB
Definition
mumpsmex.c:33
engine
extlib
MUMPS_5.5.1
MATLAB
multiplerhs_example.m
Generated by
1.15.0