[Top][All Lists]

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

Re: [Help-gsl] tell multiroot to cut step size?

From: Andrew W. Steiner
Subject: Re: [Help-gsl] tell multiroot to cut step size?
Date: Sun, 23 Sep 2012 21:09:48 +0200

Hello James,

     I had this problem as well, and modified the GSL iterate function
for this purpose. My code is in c++, but the structure is very similar
to the original GSL and so may be helpful for you. See line 713 of

shrink_step==false is the usual GSL behavior, but when it's true
it automatically halves the step (up to 20 times) in order to avoid
venturing into regions where the function is undefined.

Take care,

On Sun, Sep 23, 2012 at 8:38 PM, James Strother <address@hidden> wrote:
> Hello,
> I am trying to use the multiroot solver for a small scientific
> program, but I having a little trouble.  The function I would like to
> solve is only well-defined for positive inputs, but the solver is
> taking sufficiently large steps that it is producing negative inputs.
> It seems like I should be able to return an error code to indicate to
> the solver that the step was too large, and that it should cut the
> step length and re-try.  I couldn't find something like this
> documented, did I just miss it or is there another way to go about
> this?
> Thanks,
>   James

reply via email to

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