help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Solving ODE with negative step size


From: Patrick Alken
Subject: Re: [Help-gsl] Solving ODE with negative step size
Date: Wed, 04 Apr 2012 22:55:59 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

You can simply specify a negative value for the step size (ie: hstart parameter of gsl_odeiv2_driver_alloc_y_new)

On 04/04/2012 07:56 AM, Capraro, MH, Mnr <address@hidden> wrote:
Hi all

I'm in the process of coding an adaptive step-size Runge-Kutta method in C to 
solve some equations related to my research, but I'm seriously considering 
switching to GSL to avoid reinventing the wheel (and because my code is far 
from optimal). My main issue at the moment, looking at the example at 
https://www.gnu.org/software/gsl/manual/html_node/ODE-Example-programs.html, is 
that I am not sure how to adapt this to integrate BACK from an initial value. 
I.e, for a 2 dim. 1st order system with initial values given at a point away 
from the origin (on the positive real axis), how do I get the solver to take 
negative steps BACK to the origin? I would appreciate some help with this, an 
illustration in
terms of the example would be perfect (or a nudge in the right direction).  As 
far as I can determine I need to modify the call to the evolution routine in 
some way, but I find the documentation difficult to follow.

Regards
Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]