You can rewrite the solver iterate() function to modify the step if it goes outside of some "allowed" region. Because I run into this quite a bit, I've done this for O2scl (c.f. line 780 or so of http://o2scl.sourceforge.net/o2scl/html/gsl__mroot__hybrids_8h-source.html). Basically, if the function fails after a proposed step, I shorten the step by factors of two until it does not fail anymore. However, I should also warn you that doing this kind of thing can also make the routine converge less frequently.
HTH, Andrew - Andrew Steiner (c.f. O2scl at http://o2scl.sourceforge.net) On Thu, Jul 31, 2008 at 2:42 PM, Himanshu Chandola <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I've been using gsl to solve a set of polynomial equations which are non > linear. There are n equations and n variables. And from the final solution > i've to pick one which satisfies certain constraints. The multidimensional > solver that i use is : gsl_multiroot_fsolver. > > Now, the thing with multidimensional solver is that I can't give it search > bounds unlike the one dimensional solver. Besides this, since the > multidimensional solver only returns me one root that it finds (the one that > it would find first), there is no way of searching the other roots which > would satisfy the constraints. > > So, I was thinking whether someone has encountered similar problem before > and figured solving a set of simultaneous nonlinear equations (polynomials > for that matter) when you would want to get all of the solutions. Or at > least the solution satisfying certain constraints (which perhaps might be > achieved by giving search bounds to the solver, but isn't available in the > multidimensional solver). > > thanks in advance > > > Himanshu > > > _______________________________________________ > Help-gsl mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-gsl > _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
