I need to solve Ax=b with preconditioner where A is large and sparse square (nxn) matrix. I have readily available 'bicgstab' routine (in fortran) with which I can solve Ax=b. I want to use preconditioner with bicgstab to improve the convergence speed.(adsbygoogle = window.adsbygoogle || []).push({});

My main project is in fortran but in matlab I have tested that if M (a certain matrix obtained from A) is the preconditoner for matlab function bicgstab it gives some improvement. Matlab documents say it implements: M^{inverse} A x = M^{inverse} b if M is passed as a preconditioner. So back to actual fortran implementation I have matrix M but (following matlab documentation) the precontioner would be M^{inverse}. Now I am having difficulty in getting and including this M^{inverse} part in the fortran solver. I understand it is not wise to do the actual inversion. What I have tried is

a) z = M^{inverse} b

Mz=b and solve for z

b) get y=Mz

c) solve Ax=y for x

Not sure if it is the (best) way to include the preconditioner. Or this way (a,b,c above) actually affects the solution as M^{inverse} A x = M^{inverse} b should do?

Am I correct in my above understanding? My background is not math - it is an engineering project. Can someone advise me how I will implement M^{inverse} in fortran solver. Thank you

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Preconditioner implementation

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Preconditioner implementation | Date |
---|---|

Implementation question about the svd | Mar 23, 2010 |

Reasons why infinity hasn't been implemented into modern math | Jul 5, 2008 |

**Physics Forums - The Fusion of Science and Community**