MAST
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
24
#include "
optimization/optimization_interface.h
"
25
26
// NLOpt includes
27
#include "nlopt.h"
28
29
namespace
MAST
{
30
31
class
NLOptOptimizationInterface
:
public
MAST::OptimizationInterface
{
32
33
public
:
34
35
NLOptOptimizationInterface
(nlopt_algorithm alg);
36
37
virtual
~NLOptOptimizationInterface
()
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
62
inequality_constraint_evaluation
(
unsigned
m,
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__
MAST::NLOptOptimizationInterface::~NLOptOptimizationInterface
virtual ~NLOptOptimizationInterface()
Definition:
nlopt_optimization_interface.h:37
MAST::NLOptOptimizationInterface::objective_evaluation
Real objective_evaluation(unsigned n, const double *x, double *grad)
Computes and.
Definition:
nlopt_optimization_interface.cpp:143
optimization_interface.h
MAST::NLOptOptimizationInterface::NLOptOptimizationInterface
NLOptOptimizationInterface(nlopt_algorithm alg)
Definition:
nlopt_optimization_interface.cpp:57
Real
libMesh::Real Real
Definition:
mast_data_types.h:32
MAST::NLOptOptimizationInterface::optimize
virtual void optimize()
Definition:
nlopt_optimization_interface.cpp:66
MAST::OptimizationInterface
Provides the basic interface API for classes the provide implement optimization problems.
Definition:
optimization_interface.h:36
MAST::NLOptOptimizationInterface
Definition:
nlopt_optimization_interface.h:31
MAST::NLOptOptimizationInterface::inequality_constraint_evaluation
void inequality_constraint_evaluation(unsigned m, double *result, unsigned n, const double *x, double *gradient)
Computes the m inequality constraints and.
Definition:
nlopt_optimization_interface.cpp:183
MAST::NLOptOptimizationInterface::_iter
unsigned int _iter
Definition:
nlopt_optimization_interface.h:70
MAST
Definition:
flutter_root_base.h:27
MAST::NLOptOptimizationInterface::_alg
nlopt_algorithm _alg
NLOpt algorithm to use.
Definition:
nlopt_optimization_interface.h:75
src
optimization
nlopt_optimization_interface.h
Generated by
1.8.11