Commit 6644564d authored by Miroslav Shaltev's avatar Miroslav Shaltev
Browse files

update to upstream 3.8.1

parent d3e2ee2c
# Some features of NOMAD have been developed under the impulsion of
# enthusiastic users/developers/researchers/students/engineers.
# Many feedbacks and tests significantly contributed to improve NOMAD.
# The constributors to the NOMAD project are listed below.
# Contact us at nomad@gerad.ca if you think your name is missing from
# the list.
Maud Bay,
Eve Bélisle,
Vincent Garnier,
Michal Kvasnička,
Alexander Lutz,
Rosa-Maria Torres-Calderon,
Yuri Vilmanis,
Martin Posch,
Etienne Duclos,
Emmanuel Bigeon,
Walid Zghal,
Jerawan Armstrong,
Stéphane Alarie,
Klaus Truemper,
Andrea Ianni,
Pascal Côté,
Florian Chambon,
Mohamed Sylla,
Quentin Reynaud,
Anthony Guillou,
Dominic Orban,
Amina Ihaddadene,
Viviane Rochon Montplaisir
2017-03: NOMAD 3.8
-Surrogate library
-Granular variables
2015-03: NOMAD 3.7
-Anisotropic scaling
-Block evaluations
......
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
#######################################################################################
# #
# README #
# #
#######################################################################################
# #
# NOMAD - Nonsmooth Optimization by Mesh Adaptive Direct search #
# V 3.7.2 #
# #
# Copyright (C) 2001-2015 #
# #
# Mark Abramson - the Boeing Company, Seattle #
# Charles Audet - Ecole Polytechnique, Montreal #
# Gilles Couture - Ecole Polytechnique, Montreal #
# John Dennis - Rice University, Houston #
# Sebastien Le Digabel - Ecole Polytechnique, Montreal #
# Christophe Tribes - Ecole Polytechnique, Montreal #
# #
#-------------------------------------------------------------------------------------#
# #
# Contact information: #
# Ecole Polytechnique de Montreal - GERAD #
# C.P. 6079, Succ. Centre-ville, Montreal (Quebec) H3C 3A7 Canada #
# e-mail: nomad@gerad.ca #
# phone : 1-514-340-6053 #6928 #
# fax : 1-514-340-5665 #
# #
# This program is free software: you can redistribute it and/or modify it under the #
# terms of the GNU Lesser General Public License as published by the Free Software #
# Foundation, either version 3 of the License, or (at your option) any later #
# version. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT ANY #
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A #
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #
# #
#
# You should have received a copy of the GNU Lesser General Public License along #
# with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
# You can find information on the NOMAD software at www.gerad.ca/nomad #
#######################################################################################
AUTHORS :
* Mark A. Abramson (Mark.A.Abramson@boeing.com), The Boeing Company.
* Charles Audet (www.gerad.ca/Charles.Audet), GERAD and Departement de
mathematiques et de genie industriel, ecole Polytechnique de Montreal.
* J.E. Dennis Jr. (www.caam.rice.edu/~dennis), Computational and Applied
Mathematics Department, Rice University.
* Sebastien Le Digabel (www.gerad.ca/Sebastien.Le.Digabel), GERAD and Departement
de mathematiques et de genie industriel, ecole Polytechnique de Montreal.
* Christophe Tribes, GERAD, Departement
de mathematiques et de genie industriel, Department of mechanical engineering, ecole Polytechnique de Montreal.
DESCRIPTION :
NOMAD is a C++ implementation of the Mesh Adaptive Direct Search (MADS) algorithm,
designed for constrained optimization of black-box functions.
The project started in 2001, and was funded in part by AFOSR, CRIAQ, FQRNT, LANL,
NSERC, the Boeing Company, and ExxonMobil Upstream Research Company.
WEB PAGE :
http://www.gerad.ca/nomad/
FURTHER INSTRUCTIONS :
################################################################################
# #
# README #
# #
#------------------------------------------------------------------------------#
# NOMAD - Nonlinear Optimization by Mesh Adaptive Direct search - #
# version 3.8.1 #
# #
# NOMAD - version 3.8.1 has been created by #
# Charles Audet - Ecole Polytechnique de Montreal #
# Sebastien Le Digabel - Ecole Polytechnique de Montreal #
# Christophe Tribes - Ecole Polytechnique de Montreal #
# #
# The copyright of NOMAD - version 3.8.1 is owned by #
# Sebastien Le Digabel - Ecole Polytechnique de Montreal #
# Christophe Tribes - Ecole Polytechnique de Montreal #
# #
# NOMAD v3 has been funded by AFOSR, Exxon Mobil, Hydro Québec, Rio Tinto #
# and IVADO. #
# #
# NOMAD v3 is a new version of NOMAD v1 and v2. NOMAD v1 and v2 were created #
# and developed by Mark Abramson, Charles Audet, Gilles Couture, and John E. #
# Dennis Jr., and were funded by AFOSR and Exxon Mobil. #
# #
# Contact information: #
# Ecole Polytechnique de Montreal - GERAD #
# C.P. 6079, Succ. Centre-ville, Montreal (Quebec) H3C 3A7 Canada #
# e-mail: nomad@gerad.ca #
# phone : 1-514-340-6053 #6928 #
# fax : 1-514-340-5665 #
# #
# This program is free software: you can redistribute it and/or modify it #
# under the terms of the GNU Lesser General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or (at your #
# option) any later version. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License #
# for more details. #
# #
# You should have received a copy of the GNU Lesser General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
# You can find information on the NOMAD software at www.gerad.ca/nomad #
#------------------------------------------------------------------------------#
DESCRIPTION :
NOMAD is a C++ implementation of the Mesh Adaptive Direct Search (MADS)
algorithm, designed for constrained optimization of black-box functions.
WEB PAGE :
https://www.gerad.ca/nomad/
FURTHER INSTRUCTIONS :
Please visit the web page for futher instruction on the following:
* Downloading, configuring, compiling, and installing NOMAD
* Using NOMAD and setting the parameters
* Reports on NOMAD
* How to report bugs and make enhancement requests
* And more...
* Downloading, configuring, compiling, and installing NOMAD
* Using NOMAD and setting the parameters
* Reports on NOMAD
* How to report bugs and make enhancement requests
* And more...
BATCH OR LIBRARY MODE :
BATCH OR LIBRARY MODE :
NOMAD is designed to be used in two different modes : batch and library.
The batch mode is intended for a basic ans simple usage of the MADS method,
The batch mode is intended for a basic and simple usage of the MADS method,
while the library mode allows more flexibility.
For example, in batch mode, users must define their separate black-box program,
that will be called with system calls by NOMAD.
......@@ -94,21 +79,28 @@ In library mode, users can define their black-box function as C++ code
that will be directly called by NOMAD, without system calls and temporary files.
TYPES OF USE :
EXECUTABLES :
There are two ways of using NOMAD, one can directly use an executable or compile
the source code.
NOMAD batch mode executable is located in directory $NOMAD_HOME/bin or %NOMAD_HOME%\bin.
On Windows and Mac OS X platforms, NOMAD batch mode executable is located in
directory $NOMAD_HOME/bin or %NOMAD_HOME%\bin.
In order to avoid compiling the code, you can simply use this executable.
COMPILATION :
On Linux, Unix, and Mac OS X, NOMAD can be compiled using the makefile located
in $NOMAD_HOME/bin. Alternatively, using the script install.sh located in
directory $NOMAD_HOME/install will install all NOMAD binaries.
On Windows, NOMAD can be compiled using the Microsoft Visual Studio projet
located in the %NOMAD_EXAMPLES%\VisualStudio directory.
HOW TO EXECUTE NOMAD :
HOW TO EXECUTE NOMAD :
For informations about the execution of NOMAD, please read the user guide :
$NOMAD_HOME/doc/user_guide.pdf or %NOMAD_HOME%\doc\user_guide.pdf
$NOMAD_HOME/doc/user_guide.pdf or %NOMAD_HOME%\doc\user_guide.pdf
or
http://www.gerad.ca/NOMAD/Downloads/user_guide.pdf
https://www.gerad.ca/NOMAD/Downloads/user_guide.pdf
No preview for this file type
#include "HS_Material.hpp"
using namespace std;
/*------------------------*/
/* conversion constants */
/*------------------------*/
const double HS_Material::DENSITY_CC = 2.767974E-2;
const double HS_Material::T_CC = 1/1.8;
const double HS_Material::K_CC = 1/57.7882;
const double HS_Material::S_CC = 689.476;
const double HS_Material::YM_CC = 6.89476E5;
/*---------------*/
/* constructor */
/*---------------*/
HS_Material::HS_Material ( material_type t ,
double d ) : _type ( t ) ,
_density ( d * DENSITY_CC ) ,
_nT ( 0 ) ,
_T ( NULL ) ,
_nk ( 0 ) ,
_k ( NULL ) ,
_kA ( NULL ) ,
_kB ( NULL ) ,
_kC ( NULL ) ,
_ns ( 0 ) ,
_s ( NULL ) ,
_sA ( NULL ) ,
_sB ( NULL ) ,
_sC ( NULL ) ,
_nTCI ( 0 ) ,
_TCI ( NULL ) ,
_ne ( 0 ) ,
_e ( NULL ) ,
_ekA ( NULL ) ,
_ekB ( NULL ) ,
_ekC ( NULL ) ,
_ksA ( NULL ) ,
_ksB ( NULL ) ,
_ksC ( NULL ) ,
_nTEI ( 0 ) ,
_TEI ( NULL ) ,
_ny ( 0 ) ,
_y ( NULL ) ,
_yA ( NULL ) ,
_yB ( NULL ) ,
_yC ( NULL ) {}
/*--------------*/
/* destructor */
/*--------------*/
HS_Material::~HS_Material ( void )
{
delete [] _T;
delete [] _k;
delete [] _kA;
delete [] _kB;
delete [] _kC;
delete [] _s;
delete [] _sA;
delete [] _sB;
delete [] _sC;
delete [] _TCI;
delete [] _e;
delete [] _ekA;
delete [] _ekB;
delete [] _ekC;
delete [] _ksA;
delete [] _ksB;
delete [] _ksC;
delete [] _TEI;
delete [] _y;
delete [] _yA;
delete [] _yB;
delete [] _yC;
}
/*---------------*/
/* SET methods */
/*---------------*/
// set_T:
void HS_Material::set_T ( int n , double * T , bool convert )
{
delete [] _T;
double CC = (convert) ? T_CC : 1.0;
_nT = n;
_T = new double [_nT];
for ( int i = 0 ; i < _nT ; ++i )
_T[i] = T[i] * CC;
}
// set_y:
void HS_Material::set_y ( int n , double * y , bool convert )
{
delete [] _y;
double CC = (convert) ? YM_CC : 1.0;
_ny = n;
_y = new double [_ny];
for ( int i = 0 ; i < _ny ; ++i )
_y[i] = y[i] * CC;
}
// set_k:
void HS_Material::set_k ( int n , double * k , bool convert )
{
delete [] _k;
double CC = (convert) ? K_CC : 1.0;
_nk = n;
_k = new double [_nk];
for ( int i = 0 ; i < _nk ; ++i )
_k[i] = k[i] * CC;
}
// set_yABC:
void HS_Material::set_yABC ( void )
{
delete [] _yA;
delete [] _yB;
delete [] _yC;
_yA = new double [ _ny-1 ];
_yB = new double [ _ny-1 ];
_yC = new double [ _ny-1 ];
double * T = new double [ _ny ];
int i1 = _ny-1;
int i2 = _nT-1;
while ( i1 >= 0 )
T[i1--] = _T[i2--];
CSplineABC ( _ny-1 , T , _y , _yA , _yB , _yC );
delete [] T;
}
// set_kABC:
void HS_Material::set_kABC ( void )
{
delete [] _kA;
delete [] _kB;
delete [] _kC;
_kA = new double [ _nk-1 ];
_kB = new double [ _nk-1 ];
_kC = new double [ _nk-1 ];
CSplineABC ( _nk-1 , _T , _k , _kA , _kB , _kC );
}
// set_s:
void HS_Material::set_s ( int n , double * s , bool convert )
{
delete [] _s;
double CC = (convert) ? S_CC : 1.0;
_ns = n;
_s = new double [_ns];
for ( int i = 0 ; i < _ns ; ++i )
_s[i] = s[i] * CC;
}
// set_e:
void HS_Material::set_e ( int n , double * e )
{
delete [] _e;
_ne = n;
_e = new double [_ne];
for ( int i = 0 ; i < _ne ; ++i )
_e[i] = e[i];
}
// set_sABC:
void HS_Material::set_sABC ( void )
{
delete [] _sA;
delete [] _sB;
delete [] _sC;
_sA = new double [ _ns-1 ];
_sB = new double [ _ns-1 ];
_sC = new double [ _ns-1 ];
// hypothesis: _ns may be smaller than _nT:
double * T = new double [ _ns ];
int i1 = _ns-1;
int i2 = _nT-1;
while ( i1 >= 0 )
T[i1--] = _T[i2--];
CSplineABC ( _ns-1 , T , _s , _sA , _sB , _sC );
delete [] T;
}
// set_ksABC:
void HS_Material::set_ksABC ( void )
{
delete [] _ksA;
delete [] _ksB;
delete [] _ksC;
_ksA = new double [_nT-1];
_ksB = new double [_nT-1];
_ksC = new double [_nT-1];
double * ks = new double [_nT];
for ( int i = 0 ; i < _nT ; ++i )
ks[i] = _k[i] / _s[i];
CSplineABC ( _nT-1 , _T , ks , _ksA , _ksB , _ksC );
delete [] ks;
}
// set_ekABC1:
void HS_Material::set_ekABC1 ( void )
{
delete [] _ekA;
delete [] _ekB;
delete [] _ekC;
_ekA = new double [_ne-1];
_ekB = new double [_ne-1];
_ekC = new double [_ne-1];
double * T = new double [ _ne ];
int i1 = _ne-1;
int i2 = _nT-1;
while ( i1 >= 0 )
T[i1--] = _T[i2--];
T[0] = 0.0;