1#ifndef CGMRES__NEWTON_GMRES_HPP_
2#define CGMRES__NEWTON_GMRES_HPP_
16 static constexpr int nx = NLP::nx;
17 static constexpr int dim = NLP::dim;
21 finite_difference_epsilon_(finite_difference_epsilon),
25 if (finite_difference_epsilon <= 0.0) {
26 throw std::invalid_argument(
"[NewtonGMRES]: 'finite_difference_epsilon' must be positive!");
38 template <
typename VectorType>
43 template <
typename VectorType1,
typename VectorType2,
typename VectorType3,
typename VectorType4>
53 nlp_.eval_fonc_hu(
t,
x, updated_solution_, fonc_1_);
57 template <
typename VectorType1,
typename VectorType2,
typename VectorType3,
typename VectorType4>
66 nlp_.eval_fonc_hu(
t,
x, updated_solution_, fonc_1_);
72 nlp_.retrieve_dummy(
solution, fonc_1_, min_dummy);
80 decltype(
auto)
x()
const {
return nlp_.x(); }
82 decltype(
auto)
lmd()
const {
return nlp_.lmd(); }
92 Scalar finite_difference_epsilon_;
Definition newton_gmres.hpp:14
decltype(auto) x() const
Definition newton_gmres.hpp:80
void eval_Ax(const Scalar t, const MatrixBase< VectorType1 > &x, const MatrixBase< VectorType2 > &solution, const MatrixBase< VectorType3 > &solution_update, const MatrixBase< VectorType4 > &ax_vec)
Definition newton_gmres.hpp:58
void eval_b(const Scalar t, const MatrixBase< VectorType1 > &x, const MatrixBase< VectorType2 > &solution, const MatrixBase< VectorType3 > &solution_update, const MatrixBase< VectorType4 > &b_vec)
Definition newton_gmres.hpp:44
const NLP & get_nlp() const
Definition newton_gmres.hpp:84
NewtonGMRES(const NLP &nlp, const Scalar finite_difference_epsilon)
Definition newton_gmres.hpp:19
static constexpr int nx
Definition newton_gmres.hpp:16
void synchronize_ocp()
Definition newton_gmres.hpp:86
void retrieve_mu(Vector< dim > &solution)
Definition newton_gmres.hpp:75
void retrieve_dummy(Vector< dim > &solution, const Scalar min_dummy)
Definition newton_gmres.hpp:70
Scalar optError() const
Definition newton_gmres.hpp:34
void eval_fonc(const Scalar t, const MatrixBase< VectorType > &x, const Vector< dim > &solution)
Definition newton_gmres.hpp:39
decltype(auto) lmd() const
Definition newton_gmres.hpp:82
static constexpr int dim
Definition newton_gmres.hpp:17
#define CGMRES_EIGEN_CONST_CAST(TYPE, OBJ)
Definition macros.hpp:7
Definition continuation_gmres.hpp:11
Eigen::Map< MatrixType > Map
Alias of Eigen::Map.
Definition types.hpp:54
Eigen::Matrix< Scalar, size, 1 > Vector
Alias of Eigen::Vector.
Definition types.hpp:27
double Scalar
Alias of double.
Definition types.hpp:15