37 template <
typename Real, Integer N, Integer M = 0>
42 using Pointer = std::shared_ptr<Implicit<Real, N, M>>;
43 using NewtonB = Optimist::RootFinder::Newton<Real, N>;
112 #define CMD "Sandals::BVP::solve_single_shooting(...): "
117 if (!this->m_rk.
solve(t_mesh, x_ini, sol)) {
118 SANDALS_ERROR(
CMD "failed to integrate the system " << this->m_name <<
".");
119 return VectorF::Zero(N);
121 return this->
b(x_ini, sol.
x.col(last));
125 return this->m_newton.solve(
b, Jb, x_ini, x_sol);
#define SANDALS_ERROR(MSG)
Definition Sandals.hh:34
BVP(std::string t_name)
Definition BVP.hh:56
Optimist::RootFinder::Newton< Real, N > NewtonB
Definition BVP.hh:43
NewtonB m_newton
Definition BVP.hh:46
RungeKutta< Real, N, M > m_rk
Definition BVP.hh:48
typename Implicit< Real, N, M >::VectorF VectorF
Definition BVP.hh:41
virtual MatrixJF Jb_x_ini(VectorF const &x_ini, VectorF const &x_end) const =0
std::string m_name
Definition BVP.hh:49
RungeKutta< Real, N, M > & rk()
Definition BVP.hh:62
virtual VectorF b(VectorF const &x_ini, VectorF const &x_end) const =0
std::shared_ptr< Implicit< Real, N, M > > Pointer
Definition BVP.hh:42
RungeKutta< Real, N, M > const & rk() const
Definition BVP.hh:68
bool solve_single_shooting(VectorX const &t_mesh, VectorN const &ics, Solution< Real, N, M > &sol) const
Definition BVP.hh:108
virtual MatrixJF Jb_x_end(VectorF const &x_ini, VectorF const &x_end) const =0
Eigen::Vector< Real, N > VectorF
Definition Implicit.hh:46
Class container for the generic implicit, explicit, and diagonally implicit Runge-Kutta methods.
Definition RungeKutta.hh:52
bool solve(VectorX const &t_mesh, VectorN const &ics, Solution< Real, N, M > &sol) const
Definition RungeKutta.hh:1338
The namespace for the Sandals library.
Definition Sandals.hh:89
Class container for the numerical solution of a system of ODEs/DAEs.
Definition Solution.hh:62
MatrixN x
Definition Solution.hh:68