comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Need help combining LSODE with newton
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Need help combining LSODE with newton [message #42390] Wed, 26 January 2005 05:35
msp is currently offline  msp
Messages: 1
Registered: January 2005
Junior Member
Hi

My local guru can't help me with this, so I was hoping one of you
could.

I am trying to solve a set of differential equations using the
"newton" procedure to solve for the proper boundary conditions and
LSODE to advance the solution (shooting to a fitting point). To use
newton I have written the required function (called Vecfunc in the
reference guide) returning values for the equations newton is supposed
to solve. So far things are working fine, but whenever I try to call
LSODE in this function I get the error message below whether or not I
actually use the results from LSODE:

% NEWTON: File expression not allowed in this context: <No name>.

Can anyone explain why this happens and how to avoid it. Any help at
all will be much appreciated. I have included a simple version of what
I am trying to do below. Note that I am not actually using the result
of LSODE here, just calling it.

Thanks
Morten Stejner
Department of Physics and Astronomy, University of Aarhus

FUNCTION derivs,X,Y
RETURN, [1.,1.,1.,1.]
END

FUNCTION newtfunc, X
H=1
Y=[1.,2.,3.,4.]
test=LSODE(Y,0.0,H,'derivs')
print,Y,test
RETURN, [X[0] + X[1] - 3, X[0]^2 + X[1]^2 - 9]
END

PRO NEWTtest
X = [1.0, 5.0]
Y = NEWTON(X, 'newtfunc')
PRINT, 'For X=[1.0, 5.0], result = ', Y
END
[Message index]
 
Read Message
Previous Topic: IDL on SuSE
Next Topic: Announcement: IQM now for 16bit images too

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 18:46:15 PDT 2025

Total time taken to generate the page: 0.88189 seconds