odeint incompatible with multiple precision types in boost v1.68?
niggetiedt opened this issue · 2 comments
niggetiedt commented
Hi there,
First of all, I really appreciate this library and its powerful methods.
However, I managed to compile the following code within boost version 1.67 but not with version >= 1.68. In the newer versions they included multiple precision support for complex numbers, which I would also like to use with odeint. Is it a problem of the stepper?
Thank you in advance!
#include <iostream>
#include <boost/array.hpp>
#include <boost/numeric/odeint.hpp>
#include <boost/multiprecision/gmp.hpp>
using namespace std;
using namespace boost::numeric::odeint;
typedef boost::multiprecision::mpf_float_100 mpf;
typedef boost::array< mpf , 1 > state_type;
void rhs( const state_type &x , state_type &dxdt , const mpf t )
{
dxdt[0] = ( - x[0] * sin( t ) + 2.0 * tan( t ) ) * x[0];
}
void write_out( const state_type &x , const mpf t )
{
cout.precision(50);
cout << t << '\t' << x[0] << endl;
}
int main()
{
bulirsch_stoer< state_type , mpf > stepper( 1E-20 , 0 , 0 , 0 );
state_type x;
mpf t = mpf("0.2");
mpf dt = mpf("0.01");
mpf t_end = mpf("1.5");
x[0] = 1.15;
integrate_adaptive( stepper , rhs , x , t , t_end , dt , write_out );
}
ds283 commented
This is no help, but I have a similar issue with #245 with no response from the developers. It's unfortunate because In the past they have been very responsive.
ds283 commented
See #245 (comment).
Currently the workaround seems to be to revert to commit boostorg/multiprecision@3390855 in Boost::Multiprecision
or earlier.