- Corrects the following problem:

Octave BiCGStab algorithm involves a 0 division in case of a preconditioner equal to the LU decomposition of the A matrix (in a linear system of the form A.x = b).
- The solution:
Checks if the linear system is solved simply using: x_new = x_old + U \ (L \ x_old)
Ticket #11
time-shift
Ferhat Mihoubi 2011-01-14 14:45:48 +01:00
parent 708a062338
commit 96b6f1bf05
1 changed files with 8 additions and 1 deletions

View File

@ -323,7 +323,14 @@ for it_=start:incr:finish
end
while(flag1>0)
[L1, U1]=luinc(g1,luinc_tol);
[dx,flag1] = bicgstab(g1,-r,1e-7,Blck_size,L1,U1);
phat = ya + U1 \ (L1 \ r);
res = g1 * phat;
if max(abs(res)) >= options_.solve_tolf
[dx,flag1] = bicgstab(g1,-r,1e-7,Blck_size,L1,U1);
else
flag1 = 0;
dx = phat - ya;
end;
if (flag1>0 | reduced)
if(flag1==1)
disp(['Error in simul: No convergence inside BICGSTAB after ' num2str(iter,'%6d') ' iterations, in block' num2str(Block_Num,'%3d')]);