[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] problem
From: |
caoj |
Subject: |
[Help-gsl] problem |
Date: |
Tue, 23 Aug 2005 22:43:39 -0500 |
User-agent: |
Internet Messaging Program (IMP) 3.2-cvs |
Hi:
I use ordinary differential equations from GSL. The part of my program is like
example shown in the document.
const gsl_odeiv_step_type * T
= gsl_odeiv_step_rk8pd;
gsl_odeiv_step * s
= gsl_odeiv_step_alloc (T, 9);
gsl_odeiv_control * c
= gsl_odeiv_control_y_new (1e-6, 0.0);
gsl_odeiv_evolve * e
= gsl_odeiv_evolve_alloc (9);
double mu = 10;
gsl_odeiv_system sys = {func, NULL, 9, &mu};
double t = 0.0;
double h = 1e-6;
for (i = 1; i <no_of_data_points; i++) {
t1 = mytable[i];
while (t < t1)
{
int status = gsl_odeiv_evolve_apply (e, c, s,
&sys,
&t, t1,
&h, y);
if (status != GSL_SUCCESS)
break;
}
...
}
gsl_odeiv_evolve_free (e);
gsl_odeiv_control_free (c);
gsl_odeiv_step_free (s);
The weird thing is that at some i, the program stuck inside of "while" loop and
never come out. gsl_odeiv_evolve_apply will give t=t, so t is always < t1. As
result the program never stop. Dose anyone know how to solve this problem?
Thanks.
Jun Cao
- [Help-gsl] problem,
caoj <=
- Re: [Help-gsl] problem, Pau Cervera Badia, 2005/08/24
- Re: [Help-gsl] problem, caoj, 2005/08/24
- Re: [Help-gsl] problem, Pau Cervera Badia, 2005/08/24
- Re: [Help-gsl] problem, caoj, 2005/08/24
- Re: [Help-gsl] problem, Pau Cervera Badia, 2005/08/24
- Re: [Help-gsl] problem, caoj, 2005/08/24
- Re: [Help-gsl] problem, Pau Cervera Badia, 2005/08/24
- Re: [Help-gsl] problem, Paul Schneider, 2005/08/24
- Re: [Help-gsl] problem, Tommy Nordgren, 2005/08/25
- Re: [Help-gsl] problem, caoj, 2005/08/25