Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
boost/numeric/odeint.hpp
✓ #include <boost/numeric/odeint.hpp>
Integrate the Lorenz system using Boost.Odeint
#include <boost/numeric/odeint.hpp>
#include <iostream>
using namespace boost::numeric::odeint;
typedef std::vector<double> state_type;
void lorenz(const state_type &x, state_type &dxdt, double t) {
dxdt[0] = 10.0 * (x[1] - x[0]);
dxdt[1] = 28.0 * x[0] - x[1] - x[0] * x[2];
dxdt[2] = x[0] * x[1] - (8.0/3.0) * x[2];
}
int main() {
state_type x(3);
x[0] = 1.0; x[1] = 0.0; x[2] = 0.0;
integrate(lorenz, x, 0.0, 10.0, 0.1);
std::cout << "Integration complete" << std::endl;
return 0;
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.