11 #include <boost/program_options.hpp>
13 #include <utl/RK5ODEIntegrator.h>
18 namespace po = boost::program_options;
23 main(
int argc,
char* argv[])
29 po::options_description desc(
"Allowed options");
31 (
"help,h",
"produce help message")
32 (
"dx,d", po::value<double>(&dx)->default_value(0.5),
"step size")
33 (
"x1,1", po::value<double>(&x1)->default_value(1000),
"end point")
34 (
"accuracy,a", po::value<double>(&accuracy)->default_value(1e-3),
35 "variable step accuracy")
39 po::store(po::parse_command_line(argc, argv, desc), vm);
42 if (vm.count(
"help")) {
56 const Vector y0 = { 1, 0 };
58 cout << setprecision(16);
62 it.GetX() <= x1; ++it)
64 cout << it.GetX() <<
' '
65 << it.GetY()[0] <<
' '
66 << it.GetY()[1] <<
'\n';
int main(int argc, char *argv[])
AdaptiveRK5Iterator< DerivativeFunctor, VectorType > AdaptiveBegin(const double x, const double dx, const VectorType &y, const double accuracy=1e-5)