#include #ifdef BOOST_MSVC #pragma warning(disable:4996) #endif #define BOOST_TEST_MODULE odeint_controlled_adams_bashforth_moulton #include #include #include using namespace boost::unit_test; using namespace boost::numeric::odeint; struct const_sys { template< class State , class Deriv , class Value > void operator()( const State &x , Deriv &dxdt , const Value &dt ) const { dxdt[0] = 1; } }; typedef boost::array< double , 1 > state_type; typedef double value_type; BOOST_AUTO_TEST_SUITE( controlled_adams_bashforth_moulton_test ) BOOST_AUTO_TEST_CASE( test_instantiation ) { controlled_adams_bashforth_moulton > s1; controlled_adams_bashforth_moulton > s2; controlled_adams_bashforth_moulton > s3; controlled_adams_bashforth_moulton > s4; controlled_adams_bashforth_moulton > s5; controlled_adams_bashforth_moulton > s6; controlled_adams_bashforth_moulton > s7; controlled_adams_bashforth_moulton > s8; controlled_adams_bashforth_moulton > s9; state_type x = {{ 10.0 }}; value_type t = 0.0 , dt = 0.01; s1.try_step(const_sys(), x, t, dt); s2.try_step(const_sys(), x, t, dt); s3.try_step(const_sys(), x, t, dt); s4.try_step(const_sys(), x, t, dt); s5.try_step(const_sys(), x, t, dt); s6.try_step(const_sys(), x, t, dt); s7.try_step(const_sys(), x, t, dt); s8.try_step(const_sys(), x, t, dt); s9.try_step(const_sys(), x, t, dt); } BOOST_AUTO_TEST_SUITE_END()