hsl_ma77d.h

Go to the documentation of this file.
00001 /*
00002  * COPYRIGHT (c) 2011 The 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-05-18
00007  */
00008 
00009 #ifndef HSL_MA77D_H
00010 #define HSL_MA77D_H
00011 
00012 #ifndef ma77_default_control
00013 #define ma77_control ma77_control_d
00014 #define ma77_info ma77_info_d
00015 #define ma77_default_control ma77_default_control_d
00016 #define ma77_open_nelt ma77_open_nelt_d
00017 #define ma77_open ma77_open_d
00018 #define ma77_input_vars ma77_input_vars_d
00019 #define ma77_input_reals ma77_input_reals_d
00020 #define ma77_analyse ma77_analyse_d
00021 #define ma77_factor ma77_factor_d
00022 #define ma77_factor_solve ma77_factor_solve_d
00023 #define ma77_solve ma77_solve_d
00024 #define ma77_resid ma77_resid_d
00025 #define ma77_scale ma77_scale_d
00026 #define ma77_enquire_posdef ma77_enquire_posdef_d
00027 #define ma77_enquire_indef ma77_enquire_indef_d
00028 #define ma77_alter ma77_alter_d
00029 #define ma77_restart ma77_restart_d
00030 #define ma77_finalise ma77_finalise_d
00031 #endif
00032 
00033 typedef double ma77pkgtype_d_;
00034 
00035 /* Data type for user controls */
00036 struct ma77_control_d {
00037    /* Note: 0 is false, non-zero is true */
00038 
00039    /* C/Fortran interface related controls */
00040    int f_arrays; /* Treat arrays as 1-based (Fortran) if true or 0-based (C) if
00041                     false. */
00042 
00043    /* Printing controls */
00044    int print_level;
00045    int unit_diagnostics;   /* unit for diagnostic messages
00046                               Printing is suppressed if unit_diagnostics < 0. */
00047    int unit_error;         /* unit for error messages
00048                               Printing is suppressed if unit_error  <  0.     */
00049    int unit_warning;       /* unit for warning messages
00050                               Printing is suppressed if unit_warning  <  0.   */
00051 
00052    /* Controls used by MA77_open */
00053    int bits;
00054    int buffer_lpage[2];
00055    int buffer_npage[2];
00056    long int file_size;
00057    long int maxstore;
00058    long int storage[3];
00059 
00060    /* Controls used by MA77_analyse */
00061    int nemin;  /* Node amalgamation parameter. A child node is merged with its
00062                   parent if they both involve fewer than nemin eliminations.*/
00063 
00064    /* Controls used by MA77_scale */
00065    int maxit;
00066    int infnorm;
00067    ma77pkgtype_d_ thresh;
00068 
00069    /* Controls used by MA77_factor with posdef true */
00070    int nb54;
00071 
00072    /* Controls used by MA77_factor with posdef false */
00073    int action;    /* Keep going even if matrix is singular if true, or abort
00074                      if false */
00075    ma77pkgtype_d_ multiplier;
00076    int nb64;
00077    int nbi;
00078    ma77pkgtype_d_ small;
00079    ma77pkgtype_d_ static_;
00080    long int storage_indef;
00081    ma77pkgtype_d_ u;       /* Pivot tolerance*/
00082    ma77pkgtype_d_ umin;    /* Minimum pivot tolerance*/
00083 };
00084 
00085 /***************************************************/
00086 
00087 /* data type for returning information to user.*/
00088 struct ma77_info_d {
00089    ma77pkgtype_d_ detlog;
00090    int detsign;
00091    int flag;
00092    int iostat;
00093    int matrix_dup;
00094    int matrix_rank;
00095    int matrix_outrange;
00096    int maxdepth;
00097    int maxfront;
00098    long int minstore;
00099    int ndelay;
00100    long int nfactor;
00101    long int nflops;
00102    int niter;
00103    int nsup;
00104    int num_neg;
00105    int num_nothresh;
00106    int num_perturbed;
00107    int ntwo;
00108    int stat;
00109    int index[4];
00110    long int nio_read[2];
00111    long int nio_write[2];
00112    long int nwd_read[2];
00113    long int nwd_write[2];
00114    int num_file[4];
00115    long int storage[4];
00116    int tree_nodes;
00117    int unit_restart;
00118    int unused;
00119    ma77pkgtype_d_ usmall;
00120 };
00121 
00122 /* Initialise control with default values */
00123 void ma77_default_control(struct ma77_control_d *control);
00124 void ma77_open_nelt(const int n, const char* fname1, const char* fname2,
00125    const char *fname3, const char *fname4, void **keep,
00126    const struct ma77_control_d *control, struct ma77_info_d *info,
00127    const int nelt);
00128 void ma77_open(const int n, const char* fname1, const char* fname2,
00129    const char *fname3, const char *fname4, void **keep,
00130    const struct ma77_control_d *control, struct ma77_info_d *info);
00131 void ma77_input_vars(const int idx, const int nvar, const int list[],
00132    void **keep, const struct ma77_control_d *control, struct ma77_info_d *info);
00133 void ma77_input_reals(const int idx, const int length,
00134    const ma77pkgtype_d_ reals[], void **keep, const struct ma77_control_d *control,
00135    struct ma77_info_d *info);
00136 /* Analyse the sparsity pattern and prepare for factorization */
00137 void ma77_analyse(const int order[], void **keep,
00138    const struct ma77_control_d *control, struct ma77_info_d *info);
00139 /* To factorize the matrix */
00140 void ma77_factor(const int posdef, void **keep, 
00141    const struct ma77_control_d *control, struct ma77_info_d *info,
00142    const ma77pkgtype_d_ *scale);
00143 /* To factorize the matrix AND solve AX = B */
00144 void ma77_factor_solve(const int posdef, void **keep, 
00145    const struct ma77_control_d *control, struct ma77_info_d *info,
00146    const ma77pkgtype_d_ *scale, const int nrhs, const int lx,
00147    ma77pkgtype_d_ rhs[]);
00148 /* To solve AX = B using the computed factors */
00149 void ma77_solve(const int job, const int nrhs, const int lx, ma77pkgtype_d_ x[],
00150    void **keep, const struct ma77_control_d *control, struct ma77_info_d *info,
00151    const ma77pkgtype_d_ *scale);
00152 void ma77_resid(const int nrhs, const int lx, const ma77pkgtype_d_ x[],
00153    const int lresid, ma77pkgtype_d_ resid[], void **keep, 
00154    const struct ma77_control_d *control, struct ma77_info_d *info,
00155    ma77pkgtype_d_ *anorm_bnd);
00156 void ma77_scale(ma77pkgtype_d_ scale[], void **keep, 
00157    const struct ma77_control_d *control, struct ma77_info_d *info,
00158    ma77pkgtype_d_ *anorm);
00159 void ma77_enquire_posdef(ma77pkgtype_d_ d[], void **keep, 
00160    const struct ma77_control_d *control, struct ma77_info_d *info);
00161 void ma77_enquire_indef(int piv_order[], ma77pkgtype_d_ d[], void **keep, 
00162    const struct ma77_control_d *control, struct ma77_info_d *info);
00163 void ma77_alter(const ma77pkgtype_d_ d[], void **keep, 
00164    const struct ma77_control_d *control, struct ma77_info_d *info);
00165 void ma77_restart(const char *restart_file, const char *fname1, 
00166    const char *fname2, const char *fname3, const char *fname4, void **keep, 
00167    const struct ma77_control_d *control, struct ma77_info_d *info);
00168 /* To clean up memory in keep */
00169 void ma77_finalise(void **keep, const struct ma77_control_d *control,
00170    struct ma77_info_d *info);
00171 
00172 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 8 May 2013 for Ipopt by  doxygen 1.6.1