help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] gsl interpolation problem


From: Ronald Haynes
Subject: [Help-gsl] gsl interpolation problem
Date: Mon, 17 Apr 2006 16:17:34 -0300
User-agent: Opera M2/8.54 (Linux, build 1745)

Hi everyone,

I have a program in which I would like to compute the interpolation coefficients (cubic splines say...) and then I would like to have these coefficients available globally to other functions.

So now I have done the following:

gsl_interp_accel *acc;
gsl_spline *spline;

before main

inside main I have done
gsl_interp_accel *acc
   = gsl_interp_accel_alloc ();
  gsl_spline *spline
  = gsl_spline_alloc (gsl_interp_cspline,M);

  gsl_spline_init (spline,tvalues.e,yvalues.e,M);
   val = gsl_spline_eval (spline, 0.6, acc);

and val is correctly computed.

main then calls another function X (say) which in turn calls function Y (say) a bunch of times. Inside Y I need to evaluate the same spline at a bunch of different points. But if I do

 val = gsl_spline_eval (spline, t, acc);

inside function Y the code terminates during runtime with a signal 11 termination. (It seems to compile fine...).

Any thoughts?

Thanks,
R Haynes


--
Dr. Ronald D. Haynes (PhD)
Assistant Professor
Mathematics and Statistics
Acadia University
Wolfville, N.S.


Using Opera's revolutionary e-mail client: http://www.opera.com/mail/




reply via email to

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