CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

System of Equations

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2007, 05:14
Default System of Equations
  #1
Nora
Guest
 
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,

Nora

  Reply With Quote

Old   June 2, 2007, 17:51
Default Re: System of Equations
  #2
Ananda Himansu
Guest
 
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, 16:53
Default Re: System of Equations
  #3
Nora
Guest
 
Posts: n/a
Thanks for the advice. Do you know any links or resources that I can find such a robust routine?

Nora
  Reply With Quote

Old   June 4, 2007, 02:27
Default Re: System of Equations
  #4
rt
Guest
 
Posts: n/a
Nora,

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

Reply


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 Off
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 9 June 12, 2019 08:03
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
Treatment of ill-conditioned system of equations by CFD tools shreyash08 Main CFD Forum 0 August 4, 2010 11:13
Conjugated solver for momentum and energy equations system makaveli_lcf OpenFOAM Running, Solving & CFD 3 April 14, 2009 03:16
CONSERVATION EQUATIONS IN NONINERTIAL SYSTEM!!! zhang zhanwang Main CFD Forum 0 August 17, 1998 08:38


All times are GMT -4. The time now is 16:35.