11 #include <boost/program_options.hpp>
13 #include <utl/RK4ODEIntegrator.h>
18 namespace po = boost::program_options;
23 main(
int argc,
char* argv[])
28 po::options_description desc(
"Allowed options");
30 (
"help,h",
"produce help message")
31 (
"dx,d", po::value<double>(&dx)->default_value(0.5),
"step size")
32 (
"x1,1", po::value<double>(&x1)->default_value(1000),
"end point")
36 po::store(po::parse_command_line(argc, argv, desc), vm);
39 if (vm.count(
"help")) {
51 const Vector y0 = { 1, 0 };
53 cout << setprecision(16);
58 it.GetX() <= x1; it += dx)
59 cout << it.GetX() <<
' '
60 << it.GetY()[0] <<
' '
61 << it.GetY()[1] <<
'\n';
RK4Iterator< DerivativeFunctor, VectorType > Begin(const double x, const VectorType &y)
int main(int argc, char *argv[])