CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

System of Equations

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   June 1, 2007, 04:14
Default System of Equations
Posts: n/a
I am looking for a FORTRAN routine that can solve a linear system of equations. I don't care if the algorithm is fast or slow, as long as it is "robust", I am happy.

I have tried some of the methods given in Recipes and NetLib including Gaussian ellimination, but I keep getting singularity error, but when I solve the same system of equations in MATLAB using the simple operaor \ (ie, X = A \ B) it solves it and gives the correct answer.

I have spent enough time on this, so I reaaly need to find a nice code so that I can use it and carry on my work.

Thanks very much,


  Reply With Quote

Old   June 2, 2007, 16:51
Default Re: System of Equations
Ananda Himansu
Posts: n/a
Check the condition number of the coefficient matrix with MATLAB; also look at the determinant. It could be that the matrix is so poorly conditioned that the Fortran routines classify it as singular, while MATLAB or Mathematica may switch to carrying extra precision or to using a special method to handle ill-conditioned matrices (a "robust" method). Use Fortran routines that use full-pivoting or other reordering technique to minimize the round-off build-up, since you do not mind sacrificing efficiency. Also, be sure that you are supplying the coefficient matrix and the right hand side vector in the correct format, for each routine.
  Reply With Quote

Old   June 3, 2007, 15:53
Default Re: System of Equations
Posts: n/a
Thanks for the advice. Do you know any links or resources that I can find such a robust routine?

  Reply With Quote

Old   June 4, 2007, 01:27
Default Re: System of Equations
Posts: n/a

singulary is probably due to having small numbers or zeros on diagonal entries of system, so you have to use pivoting or using methods that handles indefinite systems,

BILUM package of Y. Saad has tihs capability but simpler solution is usnig (i recommend this for u) MA27 routine of HSL (fortran 77, freely availible) for solution of summetric indefinite systems (is sparce direct), or MA47 for non-symmertic indefinite system.

Generally for ill-posed systems sparse direct solvers are recommended, other famous codes are umfpack and PARDISO (for parallel run)

  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
USER_FORTRAN solve iteratively a linear equations system fipellac CFX 8 May 20, 2011 10:37
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
Treatment of ill-conditioned system of equations by CFD tools shreyash08 Main CFD Forum 0 August 4, 2010 10:13
Conjugated solver for momentum and energy equations system makaveli_lcf OpenFOAM Running, Solving & CFD 3 April 14, 2009 02:16
CONSERVATION EQUATIONS IN NONINERTIAL SYSTEM!!! zhang zhanwang Main CFD Forum 0 August 17, 1998 07:38

All times are GMT -4. The time now is 23:12.