20 #ifndef LIBMESH_NLOPT_OPTIMIZATION_SOLVER_H 21 #define LIBMESH_NLOPT_OPTIMIZATION_SOLVER_H 26 #if defined(LIBMESH_HAVE_NLOPT) && !defined(LIBMESH_USE_COMPLEX_NUMBERS) 93 virtual void clear ()
override;
98 virtual void init ()
override;
108 virtual void solve ()
override;
182 static std::map<std::string, nlopt_algorithm>
build_map()
184 std::map<std::string, nlopt_algorithm> ret;
185 ret[
"LD_SLSQP"] = NLOPT_LD_SLSQP;
186 ret[
"LD_MMA"] = NLOPT_LD_MMA;
187 ret[
"LD_CCSAQ"] = NLOPT_LD_CCSAQ;
188 ret[
"LD_LBFGS"] = NLOPT_LD_LBFGS;
189 ret[
"LD_LBFGS_NOCEDAL"] = NLOPT_LD_LBFGS_NOCEDAL;
190 ret[
"LD_TNEWTON"] = NLOPT_LD_TNEWTON;
191 ret[
"LD_TNEWTON_RESTART"] = NLOPT_LD_TNEWTON_RESTART;
192 ret[
"LD_TNEWTON_PRECOND"] = NLOPT_LD_TNEWTON_PRECOND;
193 ret[
"LD_TNEWTON_PRECOND_RESTART"] = NLOPT_LD_TNEWTON_PRECOND_RESTART;
194 ret[
"LD_AUGLAG"] = NLOPT_LD_AUGLAG;
195 ret[
"LD_VAR1"] = NLOPT_LD_VAR1;
196 ret[
"LD_VAR2"] = NLOPT_LD_VAR2;
197 ret[
"LN_COBYLA"] = NLOPT_LN_COBYLA;
198 ret[
"LN_BOBYQA"] = NLOPT_LN_BOBYQA;
199 ret[
"LN_PRAXIS"] = NLOPT_LN_PRAXIS;
200 ret[
"LN_NELDERMEAD"] = NLOPT_LN_NELDERMEAD;
201 ret[
"LN_SBPLX"] = NLOPT_LN_SBPLX;
202 ret[
"GN_ISRES"] = NLOPT_GN_ISRES;
212 template <
typename T>
213 std::map<std::string, nlopt_algorithm>
219 #endif // #if defined(LIBMESH_HAVE_NLOPT) && !defined(LIBMESH_USE_COMPLEX_NUMBERS) 220 #endif // LIBMESH_NLOPT_OPTIMIZATION_SOLVER_H ~NloptOptimizationSolver()
double _constraints_tolerance
virtual void init() override
friend void __libmesh_nlopt_equality_constraints(unsigned m, double *result, unsigned n, const double *x, double *gradient, void *data)
friend void __libmesh_nlopt_inequality_constraints(unsigned m, double *result, unsigned n, const double *x, double *gradient, void *data)
unsigned _iteration_count
OptimizationSystem sys_type
virtual void solve() override
friend double __libmesh_nlopt_objective(unsigned n, const double *x, double *gradient, void *data)
NloptOptimizationSolver(sys_type &system)
virtual void clear() override
void __libmesh_nlopt_inequality_constraints(unsigned m, double *result, unsigned n, const double *x, double *gradient, void *data)
const sys_type & system() const
virtual void print_converged_reason() override
unsigned & get_iteration_count()
nlopt_opt get_nlopt_object()
double __libmesh_nlopt_objective(unsigned n, const double *x, double *gradient, void *data)
static std::map< std::string, nlopt_algorithm > build_map()
virtual int get_converged_reason() override
static std::map< std::string, nlopt_algorithm > _nlopt_algorithms
void __libmesh_nlopt_equality_constraints(unsigned m, double *result, unsigned n, const double *x, double *gradient, void *data)