help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] Re: gsl ode solver - const a problem?


From: Heiko Bauke
Subject: [Help-gsl] Re: gsl ode solver - const a problem?
Date: Fri, 18 Sep 2009 10:42:13 +0200

Hi,

On Fri, 18 Sep 2009 12:19:23 +0530
"Sumesh P.T." <address@hidden> wrote:

> I use gsl ode solver in my program for integration as given in :
> http://www.gnu.org/software/gsl/manual/html_node/ODE-Example-programs.html
> Look at the definition of func
> 
> func (double t, const double y[], double f[], void *params)
> 
> y is a const. I am facing an issue because of this.

I also think, this interface has an unfortunate design. In fact, I would
prefer 

func (double t, const double y[], double f[], const void *params)

There is no (obvious) reason why func should change the parameters. The
current design forces me regularly to apply a const_cast (in C++) when
solving ODEs with GSL routines.


        Heiko

-- 
-- Willst du den Wert des Geldes kennenlernen, geh und versuche 
-- dir welches zu borgen. (Benjamin Franklin, 1706-1790)
-- Cluster Computing @ http://www.clustercomputing.de
--       Heiko Bauke @ http://www.mpi-hd.mpg.de/personalhomes/bauke





reply via email to

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