00001
00002
00003
00004
00005
00006
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 #define ma77_solve_fredholm ma77_solve_fredholm_d
00032 #define ma77_lmultiply ma77_lmultiply_d
00033 #endif
00034
00035 typedef double ma77pkgtype_d_;
00036
00037
00038 struct ma77_control_d {
00039
00040
00041
00042 int f_arrays;
00043
00044
00045
00046 int print_level;
00047 int unit_diagnostics;
00048
00049 int unit_error;
00050
00051 int unit_warning;
00052
00053
00054
00055 int bits;
00056 int buffer_lpage[2];
00057 int buffer_npage[2];
00058 long int file_size;
00059 long int maxstore;
00060 long int storage[3];
00061
00062
00063 int nemin;
00064
00065
00066
00067 int maxit;
00068 int infnorm;
00069 ma77pkgtype_d_ thresh;
00070
00071
00072 int nb54;
00073
00074
00075 int action;
00076
00077 ma77pkgtype_d_ multiplier;
00078 int nb64;
00079 int nbi;
00080 ma77pkgtype_d_ small;
00081 ma77pkgtype_d_ static_;
00082 long int storage_indef;
00083 ma77pkgtype_d_ u;
00084 ma77pkgtype_d_ umin;
00085
00086 #if defined(COINHSL_HSL2013) || !defined(COINHSL_HAS_MA77)
00087
00088 ma77pkgtype_d_ consist_tol;
00089
00090
00091 int ispare[5]; long int lspare[5]; ma77pkgtype_d_ rspare[5];
00092 #endif
00093 };
00094
00095
00096
00097
00098 struct ma77_info_d {
00099 ma77pkgtype_d_ detlog;
00100 int detsign;
00101 int flag;
00102 int iostat;
00103 int matrix_dup;
00104 int matrix_rank;
00105 int matrix_outrange;
00106 int maxdepth;
00107 int maxfront;
00108 long int minstore;
00109 int ndelay;
00110 long int nfactor;
00111 long int nflops;
00112 int niter;
00113 int nsup;
00114 int num_neg;
00115 int num_nothresh;
00116 int num_perturbed;
00117 int ntwo;
00118 int stat;
00119 int index[4];
00120 long int nio_read[2];
00121 long int nio_write[2];
00122 long int nwd_read[2];
00123 long int nwd_write[2];
00124 int num_file[4];
00125 long int storage[4];
00126 int tree_nodes;
00127 int unit_restart;
00128 int unused;
00129 ma77pkgtype_d_ usmall;
00130
00131
00132 #if defined(COINHSL_HSL2013) || !defined(COINHSL_HAS_MA77)
00133
00134 int ispare[5]; long int lspare[5]; ma77pkgtype_d_ rspare[5];
00135 #endif
00136 };
00137
00138
00139 void ma77_default_control_d(struct ma77_control_d *control);
00140 void ma77_open_nelt(const int n, const char* fname1, const char* fname2,
00141 const char *fname3, const char *fname4, void **keep,
00142 const struct ma77_control_d *control, struct ma77_info_d *info,
00143 const int nelt);
00144 void ma77_open_d(const int n, const char* fname1, const char* fname2,
00145 const char *fname3, const char *fname4, void **keep,
00146 const struct ma77_control_d *control, struct ma77_info_d *info);
00147 void ma77_input_vars(const int idx, const int nvar, const int list[],
00148 void **keep, const struct ma77_control_d *control, struct ma77_info_d *info);
00149 void ma77_input_reals_d(const int idx, const int length,
00150 const ma77pkgtype_d_ reals[], void **keep, const struct ma77_control_d *control,
00151 struct ma77_info_d *info);
00152
00153 void ma77_analyse(const int order[], void **keep,
00154 const struct ma77_control_d *control, struct ma77_info_d *info);
00155
00156 void ma77_factor_d(const int posdef, void **keep,
00157 const struct ma77_control_d *control, struct ma77_info_d *info,
00158 const ma77pkgtype_d_ *scale);
00159
00160 void ma77_factor_solve_d(const int posdef, void **keep,
00161 const struct ma77_control_d *control, struct ma77_info_d *info,
00162 const ma77pkgtype_d_ *scale, const int nrhs, const int lx,
00163 ma77pkgtype_d_ rhs[]);
00164
00165 void ma77_solve_d(const int job, const int nrhs, const int lx, ma77pkgtype_d_ x[],
00166 void **keep, const struct ma77_control_d *control, struct ma77_info_d *info,
00167 const ma77pkgtype_d_ *scale);
00168 void ma77_resid_d(const int nrhs, const int lx, const ma77pkgtype_d_ x[],
00169 const int lresid, ma77pkgtype_d_ resid[], void **keep,
00170 const struct ma77_control_d *control, struct ma77_info_d *info,
00171 ma77pkgtype_d_ *anorm_bnd);
00172 void ma77_scale_d(ma77pkgtype_d_ scale[], void **keep,
00173 const struct ma77_control_d *control, struct ma77_info_d *info,
00174 ma77pkgtype_d_ *anorm);
00175 void ma77_enquire_posdef_d(ma77pkgtype_d_ d[], void **keep,
00176 const struct ma77_control_d *control, struct ma77_info_d *info);
00177 void ma77_enquire_indef_d(int piv_order[], ma77pkgtype_d_ d[], void **keep,
00178 const struct ma77_control_d *control, struct ma77_info_d *info);
00179 void ma77_alter_d(const ma77pkgtype_d_ d[], void **keep,
00180 const struct ma77_control_d *control, struct ma77_info_d *info);
00181 void ma77_restart_d(const char *restart_file, const char *fname1,
00182 const char *fname2, const char *fname3, const char *fname4, void **keep,
00183 const struct ma77_control_d *control, struct ma77_info_d *info);
00184
00185 void ma77_solve_fredholm_d(int nrhs, int flag_out[], int lx, ma77pkgtype_d_ x[],
00186 void **keep, const struct ma77_control_d *control,
00187 struct ma77_info_d *info, const ma77pkgtype_d_ *scale);
00188
00189 void ma77_lmultiply_d(int trans, int k, int lx, ma77pkgtype_d_ x[], int ly,
00190 ma77pkgtype_d_ y[], void **keep, const struct ma77_control_d *control,
00191 struct ma77_info_d *info, const ma77pkgtype_d_ *scale);
00192
00193 void ma77_finalise_d(void **keep, const struct ma77_control_d *control,
00194 struct ma77_info_d *info);
00195
00196 #endif