MAST
nlopt_optimization_interface.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2019 Manav Bhatia
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __MAST_nlopt_optimization_interface_h__
21 #define __MAST_nlopt_optimization_interface_h__
22 
23 // MAST includes
25 
26 // NLOpt includes
27 #include "nlopt.h"
28 
29 namespace MAST {
30 
32 
33  public:
34 
35  NLOptOptimizationInterface(nlopt_algorithm alg);
36 
38  { }
39 
40  virtual void optimize();
41 
48  Real
49  objective_evaluation(unsigned n,
50  const double* x,
51  double* grad);
52 
53 
61  void
63  double *result,
64  unsigned n,
65  const double *x,
66  double *gradient);
67 
68  protected:
69 
70  unsigned int _iter;
71 
75  nlopt_algorithm _alg;
76  };
77 }
78 
79 
80 
81 
82 
83 #endif // __MAST_nlopt_optimization_interface_h__
Real objective_evaluation(unsigned n, const double *x, double *grad)
Computes and.
libMesh::Real Real
Provides the basic interface API for classes the provide implement optimization problems.
void inequality_constraint_evaluation(unsigned m, double *result, unsigned n, const double *x, double *gradient)
Computes the m inequality constraints and.
nlopt_algorithm _alg
NLOpt algorithm to use.