#pragma once #include "vec.h" #include "ivp.h" #include // Function declarations // Given the boundary-value problem (BVP) // u"(x) = f( x, {u(x), u'(x)} ) // with the boundary conditions // u(a) = u // a // and // u(b) = u , // b // find an approximation to the solution. // // Parameters: // f The right-hand side of the ODE // u" = f( x, {u, u'} ) // x_range A pair [a, b] // u_bndry A pair [u , u ] such that u(a) = u u(b) = u // a b a b // eps_abs The maximum error that the solution is away from u // b // max_iterations // The maximum number of iterations allowed // h The initial 'h' value for the IVP solver // h_range A pair of [h , h ] that bound the allowable // min max // step sizes ivp> bvp( vec<2> f( double x, vec<2> u ), std::pair x_range, std::pair u_bndry, double eps_abs, unsigned int max_iterations, double h, std::pair h_range ); #include "shooting.tpp"