MAST
gcmma_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_gcmma_optimization_interface_h__
21 #define __MAST_gcmma_optimization_interface_h__
22 
23 // MAST includes
25 
26 extern "C" {
27  extern void raasta_(int *M, int *N,
28  double *RAA0, double *RAA,
29  double *XMIN, double *XMAX,
30  double *DF0DX, double *DFDX);
31  extern void asympg_(int *ITER, int *M, int *N,
32  double *ALBEFA, double *GHINIT,
33  double *GHDECR, double *GHINCR,
34  double *XVAL, double *XMIN, double *XMAX,
35  double *XOLD1, double *XOLD2,
36  double *XLOW, double *XUPP,
37  double *ALFA, double *BETA);
38  extern void mmasug_(int *ITER, int *M, int *N, double *GEPS, int *IYFREE,
39  double *XVAL, double *XMMA,
40  double *XMIN, double *XMAX,
41  double *XLOW, double *XUPP,
42  double *ALFA, double *BETA,
43  double *A, double *B, double *C, double *Y, double *Z,
44  double *RAA0, double *RAA, double *ULAM,
45  double *F0VAL, double *FVAL,
46  double *F0APP, double *FAPP,
47  double *FMAX, double *DF0DX, double *DFDX,
48  double *P, double *Q, double *P0, double *Q0,
49  double *UU, double *GRADF, double *DSRCH, double *HESSF);
50  extern void conser_(int *M, int *ICONSE,
51  double *GEPS, double *F0NEW, double *F0APP,
52  double *FNEW, double *FAPP);
53  extern void raaupd_(int *M, int *N, double *GEPS,
54  double *XMMA, double *XVAL,
55  double *XMIN, double *XMAX,
56  double *XLOW, double *XUPP,
57  double *F0NEW, double *FNEW,
58  double *F0APP, double *FAPP,
59  double *RAA0, double *RAA);
60  extern void xupdat_(int *N, int *ITER,
61  double *XMMA, double *XVAL,
62  double *XOLD1, double *XOLD2);
63  extern void fupdat_(int *M, double *F0NEW, double *FNEW,
64  double *F0VAL, double *FVAL);
65 }
66 
67 
68 namespace MAST {
69 
71 
72  public:
73 
75 
77  { }
78 
79  virtual void
80  set_real_parameter(const std::string& nm, Real val);
81 
82  virtual void
83  set_integer_parameter(const std::string& nm, int val);
84 
85  virtual void optimize();
86 
87 
88  protected:
89 
90  void _output_iteration_data(unsigned int i,
91  const std::vector<Real>& XVAL,
92  const std::vector<Real>& XMIN,
93  const std::vector<Real>& XMAX,
94  const std::vector<Real>& XLOW,
95  const std::vector<Real>& XUPP,
96  const std::vector<Real>& ALFA,
97  const std::vector<Real>& BETA);
98 
103  unsigned int _max_inner_iters;
104  };
105 }
106 
107 
108 
109 
110 
111 #endif // __MAST_gcmma_optimization_interface_h__
void xupdat_(int *N, int *ITER, double *XMMA, double *XVAL, double *XOLD1, double *XOLD2)
virtual void set_real_parameter(const std::string &nm, Real val)
void raasta_(int *M, int *N, double *RAA0, double *RAA, double *XMIN, double *XMAX, double *DF0DX, double *DFDX)
void raaupd_(int *M, int *N, double *GEPS, double *XMMA, double *XVAL, double *XMIN, double *XMAX, double *XLOW, double *XUPP, double *F0NEW, double *FNEW, double *F0APP, double *FAPP, double *RAA0, double *RAA)
void conser_(int *M, int *ICONSE, double *GEPS, double *F0NEW, double *F0APP, double *FNEW, double *FAPP)
libMesh::Real Real
void asympg_(int *ITER, int *M, int *N, double *ALBEFA, double *GHINIT, double *GHDECR, double *GHINCR, double *XVAL, double *XMIN, double *XMAX, double *XOLD1, double *XOLD2, double *XLOW, double *XUPP, double *ALFA, double *BETA)
void mmasug_(int *ITER, int *M, int *N, double *GEPS, int *IYFREE, double *XVAL, double *XMMA, double *XMIN, double *XMAX, double *XLOW, double *XUPP, double *ALFA, double *BETA, double *A, double *B, double *C, double *Y, double *Z, double *RAA0, double *RAA, double *ULAM, double *F0VAL, double *FVAL, double *F0APP, double *FAPP, double *FMAX, double *DF0DX, double *DFDX, double *P, double *Q, double *P0, double *Q0, double *UU, double *GRADF, double *DSRCH, double *HESSF)
Provides the basic interface API for classes the provide implement optimization problems.
virtual void set_integer_parameter(const std::string &nm, int val)
void _output_iteration_data(unsigned int i, const std::vector< Real > &XVAL, const std::vector< Real > &XMIN, const std::vector< Real > &XMAX, const std::vector< Real > &XLOW, const std::vector< Real > &XUPP, const std::vector< Real > &ALFA, const std::vector< Real > &BETA)
void fupdat_(int *M, double *F0NEW, double *FNEW, double *F0VAL, double *FVAL)