forum.alglib.net http://forum.alglib.net/ |
|
Help with Alglib in C++ http://forum.alglib.net/viewtopic.php?f=2&t=3746 |
Page 1 of 1 |
Author: | ximosh [ Fri Apr 22, 2016 11:54 am ] |
Post subject: | Help with Alglib in C++ |
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: 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? |
Author: | Sergey.Bochkanov [ Sat Apr 23, 2016 8:20 am ] |
Post subject: | Re: Help with Alglib in C++ |
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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |