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

public domain f77 separable nonlinear least squares solver wanted

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 26, 2000, 06:00
Default public domain f77 separable nonlinear least squares solver wanted
  #1
Sergei Chernyshenko
Guest
 
Posts: n/a
Hi,

I need a public domain f77 subroutine for solving the following problem:

minimize f_1**2+...+f_m**2

where f_i(x_1,...,x_n,y_1,...,y_m) are linear in x_k and nonlinear in y_l.

n=32, m=8 or 16 or 34, f_i are simple, so, may be, pure nonlinear optimizer will do.

I tried lmdif1 from MINPACK but when n>8 it gives incorrect results. Any suggestions?

Sergei
  Reply With Quote

Old   January 26, 2000, 21:50
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #2
Zhong Lei
Guest
 
Posts: n/a
Try to use the book, Numerical Recipies in Fortran77 2nd ed. Are you talking about optimization?

Zhong
  Reply With Quote

Old   January 27, 2000, 06:01
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #3
Sergei Chernyshenko
Guest
 
Posts: n/a
Hi, Zhong,

Thank you.

Subroutines in Numerical Ricipes are not in public domain, you have to pay for them, 50$ per one cheepest-kind license per subroutine.

Well, my problem is a specific case of data fitting. But this is quite close to optimization, of course.

Rgds, Sergei.
  Reply With Quote

Old   January 27, 2000, 12:01
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #4
Joerg Weidenfeller
Guest
 
Posts: n/a
Hi Sergei!

Try the following ftp-server.

ftp://elib.zib.de/netlib/slatec

The file toc.gz contains all f77 subroutines (public domain). For minimizing RMS of a multidimensional polynom I used the subroutine called "SNLS1.F" resp. "DNLS1.F" for double precission. Both are modifications of the Levenberg-Marquardt algorithm. Mostly the source codes are explained well!

Joerg
  Reply With Quote

Old   January 27, 2000, 12:24
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #5
Sergei Chernyshenko
Guest
 
Posts: n/a
Hi, Joerg,

Thank you.

I tried them, or, more exactly, SNLS1E.f, which is a driver for SNLS1.f. I also tried LMDIF1.f which is an earlier version. Note that I do not want to calculate the derivatives. Well, both perform badly, the older version just giving erroneous results while the newer one gives spurious error messages and stops, or just gives erroneuos results, too. And this is with comparatively simple functions with good Jacobean. I do not think I use them incorrectly since for other functions they work all right. Just their criteria for stopping iterations are far from perfect.

So, I wrote my own code, after all. Not state of the art, but it works in the specific case I have, allthough I would like to have something better.

Thanks again, Sergei
  Reply With Quote

Old   January 28, 2000, 08:44
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #6
Joerg Weidenfeller
Guest
 
Posts: n/a
Hi Sergei!

That seems really strange to me. I used SNLS1.f for fitting a 4 dimensional polynom (each dimension has a order from 4 to 7) with approx 700 quadrupels. And I got really good results. I run the subroutine with IOPT=1 (means do not calculate jacobian matrix, because I don't need this). The criteria for stopping the iterations were 1E-5 for single precission. Perhaps the suggested criteria (R1MACH(4)-sqrt of machine precission) is a possibility for your problem?

Good luck

Joerg
  Reply With Quote

Old   January 28, 2000, 12:19
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #7
Sergei Chernyshenko
Guest
 
Posts: n/a
Hi, Joerg,

Well, I made one more attempt. I downloaded slatec from the site you indicated, and run the checks supplied there. And it does not pass the checks! This can something to do with machine constants. I'll try to find a program which will determine all those constants for my specific computer.

Thanks,

Sergei
  Reply With Quote

Old   January 28, 2000, 14:32
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #8
Adrin Gharakhani
Guest
 
Posts: n/a
If you have a F90 compiler on your machine you can print out these values using F90 functions. That's how I found & used my machine numbers with netlib functions.

Adrin Gharakhani
  Reply With Quote

Old   January 28, 2000, 14:37
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #9
Sergei Chernyshenko
Guest
 
Posts: n/a
Hi, Adrin,

Thanks, I did not know that f90 had such functions. I'll investigate.

Rgds, Sergei
  Reply With Quote

Old   January 28, 2000, 14:54
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #10
Adrin Gharakhani
Guest
 
Posts: n/a
Look for the explanation for the following functions:

bit_size() digits() epsilon() exponent() fraction() huge() maxexponent() minexponent() precision() radix() range() rrspacing() spacing() tiny()

You will not need all of these, but they are nice functions to know

Adrin Gharakhani
  Reply With Quote

Old   January 28, 2000, 14:56
Default Re: public domain f77 separable nonlinear least squares solver wanted
  #11
Sergei Chernyshenko
Guest
 
Posts: n/a
Thanks
  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
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 15:08
Case for nonlinear elastodynamic solver florian_krause OpenFOAM Running, Solving & CFD 1 April 10, 2008 18:49
CFX Solver Memory Error mike CFX 1 March 19, 2008 08:22
Solver error message!!! IoSa CFX 1 September 14, 2006 05:48


All times are GMT -4. The time now is 18:11.