headmyshoulder / odeint-v2

odeint - solving ordinary differential equations in c++ v2
http://headmyshoulder.github.com/odeint-v2/
Other
337 stars 102 forks source link

odeint without uBLAS? #254

Open tueda opened 3 years ago

tueda commented 3 years ago

Is it possible to use odeint without uBLAS?

Background: vcpkg's boost-odeint port does not include boost-ublas in its dependency. So, if one simply uses #include <boost/numeric/odeint.hpp> then encounters a compilation error due to the lack of boost/numeric/ublas/vector.hpp etc. But I am not sure whether uBLAS is really always mandatory for odeint. Though some implicit solvers indeed use uBLAS directly, (if I correctly understand) in many cases it does not seem necessary unless users specify ublas::vector or ublas::matrix as the state type. But algebra_dispatcher.hpp always tries including uBLAS and defines their algebra even if not used.

It would be nice if odeint has a configuration option (say, BOOST_NUMERIC_ODEINT_DISABLE_UBLAS) not to include uBLAS headers in algebra_dispatcher.hpp, which is good for vcpkg users for the aforementioned reason and maybe also for reducing compilation time.