Hello,
I downloaded odeint-v2 in a folder called C++.
I created a new cpp file called HARMONIC.cpp.
#include <iostream>
#include <vector>
#include <boost/numeric/odeint.hpp>
using namespace boost::numeric::odeint;
std::vector<double> state_type;
double gam = 0.15;
void harmonic_oscillator( const state_type &x , state_type &dxdt , const double )
{
dxdt[0] = x[1];
dxdt[1] = -x[0] - gam*x[1];
}
int main(int, char**)
{
using namespace std;
using namespace boost::numeric::odeint;
state_type x(2);
x[0] = 1.0;
x[1] = 0.0;
size_t steps = integrate( harmonic_oscillator ,
x , 0.0 , 10.0 , 0.1 );
}
While compiling in ubuntu
g++ HARMONIC.cpp -o har.output
The error is as following
HARMONIC.cpp:4:36: fatal error: boost/numeric/odeint.hpp: No such file or directory
compilation terminated.
But i downloaded in the same folder all the odeint-v2.
Please help me