Ipopt
trunk
|
00001 /* 00002 * COPYRIGHT (c) 2011, 2013 Science and Technology Facilities Council (STFC) 00003 * All Rights Reserved. 00004 * This code is published under the Eclipse Public License. 00005 * 00006 * Authors: Jonathan Hogg STFC 2011-02-25 00007 */ 00008 00009 #ifndef HSL_MC68I_H 00010 #define HSL_MC68I_H 00011 00012 #include "IpoptConfig.h" 00013 #ifdef COIN_HAS_HSL 00014 #include "CoinHslConfig.h" 00015 #endif 00016 00017 /* if we do not have MC68, we assume its is loaded via the linear solver loader, for which we assume HSL 2013 */ 00018 #if defined(COINHSL_HSL2013) || !defined(COINHSL_HAS_MC68) 00019 #ifndef mc68_default_control 00020 #define mc68_control mc68_control_i 00021 #define mc68_info mc68_info_i 00022 #define mc68_default_control mc68_default_control_i 00023 #define mc68_order mc68_order_i 00024 #endif 00025 #endif 00026 00027 struct mc68_control { 00028 /* Extra options for C version */ 00029 int f_array_in; /* 0 for C array indexing, 1 for Fortran indexing */ 00030 int f_array_out; /* 0 for C array indexing, 1 for Fortran indexing 00031 * NOTE: 2x2 pivot information discarded if C indexing 00032 * is used for output! */ 00033 #if defined(COINHSL_HSL2013) || !defined(COINHSL_HAS_MC68) 00034 long min_l_workspace; /* Initial size of workspace, as argument in Fortran */ 00035 #else 00036 int min_l_workspace; /* Initial size of workspace, as argument in Fortran */ 00037 #endif 00038 /* Options from Fortran version */ 00039 int lp; /* stream number for error messages */ 00040 int wp; /* stream number for warning messages */ 00041 int mp; /* stream number for diagnostic messages */ 00042 int nemin; /* stream number for diagnostic messages */ 00043 int print_level; /* amount of informational output required */ 00044 int row_full_thresh; /* percentage threshold for full row */ 00045 int row_search; /* Number of rows searched for pivot with ord=6 */ 00046 }; 00047 00048 struct mc68_info { 00049 int flag; /* error/warning flag */ 00050 int iostat; /* holds Fortran iostat parameter */ 00051 int stat; /* holds Fortran stat parameter */ 00052 int out_range; /* holds number of out of range entries ignored */ 00053 int duplicate; /* holds number of duplicate entries */ 00054 int n_compressions; /* holds number of compressions in order */ 00055 int n_zero_eigs; /* holds the number of zero eigs from ma47 */ 00056 #if defined(COINHSL_HSL2013) || !defined(COINHSL_HAS_MC68) 00057 long l_workspace; /* holds length of workspace iw used in order */ 00058 #else 00059 int l_workspace; /* holds length of workspace iw used in order */ 00060 #endif 00061 int zb01_info; /* holds flag from zb01_expand1 call */ 00062 int n_dense_rows; /* holds number of dense rows from amdd */ 00063 }; 00064 00065 /* Set default values for control struct */ 00066 void mc68_default_control(struct mc68_control *control); 00067 /* Perform ordering */ 00068 void mc68_order(int ord, int n, const int ptr[], const int row[], 00069 int perm[], const struct mc68_control *control, struct mc68_info *info); 00070 00071 #endif