ALGLIB forum
It is currently Thu Sep 21, 2023 4:27 pm

All times are UTC

Forum rules

1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Help with Alglib in C++
PostPosted: Fri Apr 22, 2016 11:54 am 

Joined: Fri Apr 22, 2016 11:47 am
Posts: 1
Hi everyone,

I'm working with a simulator in C++ using ALGLIB,
when I compile the code I don't have any errors, but when i run it i got a loop doing de ode_function_1_diff.
That's the function that calls "odesolversolve" every time it does an iteration, but my loop is infinite!

I don't know exactly what it's wrong...

here is this part of the code:

std::cout << "***** Iniciando" << std::endl;
    const alglib::real_1d_array x("[0,0, 366.6667,366.6667, 5.7511,0.0294,0.0047,0.2991,56.5688, 23.5554]");
    const alglib::real_1d_array t("[5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100]");
    double eps = 0.00001;
    double h = 0;
    alglib::odesolverstate s;
    int m;
    alglib::odesolverreport rep;
    alglib::odesolverrkck(x, t, eps, h, s);
    alglib::odesolversolve(s, ode_function_1_diff);
    alglib::odesolverresults(s, m, ttbl, xtbl, rep);

I know we can use also a *ptr in odesolversolve, but I think it's not necessary to do it, isn't it?

 Post subject: Re: Help with Alglib in C++
PostPosted: Sat Apr 23, 2016 8:20 am 
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 891
Can you send me a source code of your ode_function_1_diff function? It is hard to tell what's wrong without looking at the actual code.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group