OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
schur_example.m File Reference

Go to the source code of this file.

Functions

 disp (' ***check solution restricted to mat(1:n-10, 1:n-10)')
if(norm(mat(1:n-10, 1:n-10) *id.SOL(1:n-10) - ones(n-10, 1), 'inf') > sqrt(eps)) disp('WARNING else disp ('SCHUR SOLUTION CHECK1 OK')
end norm (mat(1:n-10, 1:n-10) *id.SOL(1:n-10) - ones(n-10, 1), 'inf') % we want to use Schur complement to solve % A *sol
id RHS (1:n-10)
 disp (' ***check complete solution')
if(norm(r, 'inf') > sqrt(eps)) disp('WARNING else disp ('SCHUR SOLUTION CHECK2 OK')
end norm (r, 'inf') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % NOW TRY REDUCED RHS FUNCTIONALITY %(easier to use than previous % computations) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% id.JOB
Do forward solution step to obtain a reduced RHS id ICNTL (26)
 disp (' ***check solution when REDRHS is used')
if(norm(r, 'inf') > sqrt(eps)) disp('WARNING else disp ('SCHUR SOLUTION CHECK3 OK')

Variables

 id = dmumps(id)
load lhr01
 mat = Problem.A
 themax = max(max(abs(mat)))
 n = size(mat,1)
initialization of Schur option id VAR_SCHUR = [n-9:n]
 JOB
id RHS = ones(size(mat,1),1)
 rhsy = ones(10,1)-mat(n-9:n,1:n-10)*sol1
TO CHANGE
 rhsx = mat(1:n-10,n-9:n)*y
 x = sol1-rhsx
 sol = [x
 y
 r = mat*sol - ones(n,1)
Solve the problem on the interface id REDRHS = id.SCHUR \ id.REDRHS

Function Documentation

◆ disp() [1/6]

disp ( ' ***check complete solution' )

◆ disp() [2/6]

disp ( ' ***check solution restricted to mat(1:n-10, 1:n-10)' )

◆ disp() [3/6]

disp ( ' ***check solution when REDRHS is used' )

◆ disp() [4/6]

if(norm(mat(1:n-10, 1:n-10) *id.SOL(1:n-10) - ones(n-10, 1), 'inf') > sqrt(eps)) disp( 'WARNING else disp ( 'SCHUR SOLUTION CHECK1 OK' )

◆ disp() [5/6]

if(norm(r, 'inf') > sqrt(eps)) disp( 'WARNING else disp ( 'SCHUR SOLUTION CHECK2 OK' )

◆ disp() [6/6]

if(norm(r, 'inf') > sqrt(eps)) disp( 'WARNING else disp ( 'SCHUR SOLUTION CHECK3 OK' )

◆ ICNTL()

Do forward solution step to obtain a reduced RHS id ICNTL ( 26 )

◆ norm() [1/2]

end norm ( mat(1:n-10, 1:n-10) *id.SOL(1:n-10) - ones(n-10, 1) ,
'inf'  )

◆ norm() [2/2]

end norm ( r ,
'inf'  )

◆ RHS()

id RHS ( 1:n- 10)

Variable Documentation

◆ CHANGE

TO CHANGE

Definition at line 43 of file schur_example.m.

◆ id

id = dmumps(id)

Definition at line 5 of file schur_example.m.

◆ JOB

id JOB
Initial value:
= 6 means analysis+facto+solve
id.JOB = 6
initmumps id
#define JOB
Definition mumpsmex.c:33

Definition at line 15 of file schur_example.m.

◆ lhr01

load lhr01

Definition at line 6 of file schur_example.m.

◆ mat

mat = Problem.A

Definition at line 7 of file schur_example.m.

◆ n

n = size(mat,1)

Definition at line 9 of file schur_example.m.

◆ r

r = mat*sol - ones(n,1)

Definition at line 55 of file schur_example.m.

◆ REDRHS

Solve the problem on the interface id REDRHS = id.SCHUR \ id.REDRHS

Definition at line 79 of file schur_example.m.

◆ RHS

id RHS = ones(size(mat,1),1)

Definition at line 17 of file schur_example.m.

◆ rhsx

rhsx = mat(1:n-10,n-9:n)*y

Definition at line 48 of file schur_example.m.

◆ rhsy

rhsy = ones(10,1)-mat(n-9:n,1:n-10)*sol1

Definition at line 40 of file schur_example.m.

◆ sol

sol = [x

Definition at line 54 of file schur_example.m.

◆ themax

themax = max(max(abs(mat)))

Definition at line 8 of file schur_example.m.

◆ VAR_SCHUR

initialization of Schur option id VAR_SCHUR = [n-9:n]

Definition at line 13 of file schur_example.m.

◆ x

x = sol1-rhsx

Definition at line 53 of file schur_example.m.

◆ y

y

Definition at line 54 of file schur_example.m.