Ipopt Documentation  
hsl_ma77d.h
Go to the documentation of this file.
1 /* COPYRIGHT (c) 2011, 2013 The Science and Technology Facilities Council (STFC)
2  * All Rights Reserved.
3  * This code is published under the Eclipse Public License.
4  *
5  * Authors: Jonathan Hogg STFC 2011-05-18
6  */
7 
8 #ifndef HSL_MA77D_H
9 #define HSL_MA77D_H
10 
11 #ifndef ma77_default_control
12 #define ma77_control ma77_control_d
13 #define ma77_info ma77_info_d
14 #define ma77_default_control ma77_default_control_d
15 #define ma77_open_nelt ma77_open_nelt_d
16 #define ma77_open ma77_open_d
17 #define ma77_input_vars ma77_input_vars_d
18 #define ma77_input_reals ma77_input_reals_d
19 #define ma77_analyse ma77_analyse_d
20 #define ma77_factor ma77_factor_d
21 #define ma77_factor_solve ma77_factor_solve_d
22 #define ma77_solve ma77_solve_d
23 #define ma77_resid ma77_resid_d
24 #define ma77_scale ma77_scale_d
25 #define ma77_enquire_posdef ma77_enquire_posdef_d
26 #define ma77_enquire_indef ma77_enquire_indef_d
27 #define ma77_alter ma77_alter_d
28 #define ma77_restart ma77_restart_d
29 #define ma77_finalise ma77_finalise_d
30 #define ma77_solve_fredholm ma77_solve_fredholm_d
31 #define ma77_lmultiply ma77_lmultiply_d
32 #endif
33 
34 typedef double ma77pkgtype_d_;
35 
41 {
46  int f_arrays;
63  /* unit for warning messages
64  *
65  * Printing is suppressed if unit_warning < 0.
66  */
73  int bits;
74  int buffer_lpage[2];
75  int buffer_npage[2];
76  long int file_size;
77  long int maxstore;
78  long int storage[3];
88  int nemin;
94  int maxit;
95  int infnorm;
102  int nb54;
109  int action;
111  int nb64;
112  int nbi;
115  long int storage_indef;
126  /* Pad data structure to allow for future growth */
127  int ispare[5];
128  long int lspare[5];
130 };
131 
132 /***************************************************/
133 
136 {
138  int detsign;
139  int flag;
140  int iostat;
144  int maxdepth;
145  int maxfront;
146  long int minstore;
147  int ndelay;
148  long int nfactor;
149  long int nflops;
150  int niter;
151  int nsup;
152  int num_neg;
155  int ntwo;
156  int stat;
157  int index[4];
158  long int nio_read[2];
159  long int nio_write[2];
160  long int nwd_read[2];
161  long int nwd_write[2];
162  int num_file[4];
163  long int storage[4];
166  int unused;
168 
169  /* if we do not have MA77, we assume its is loaded via the linear solver loader, for which we assume HSL 2013 */
170  /* Pad data structure to allow for future growth */
171  int ispare[5];
172  long int lspare[5];
174 };
175 
178  struct ma77_control_d* control
179 );
180 
181 void ma77_open_nelt(
182  const int n,
183  const char* fname1,
184  const char* fname2,
185  const char* fname3,
186  const char* fname4,
187  void** keep,
188  const struct ma77_control_d* control,
189  struct ma77_info_d* info,
190  const int nelt
191 );
192 
193 void ma77_open_d(
194  const int n,
195  const char* fname1,
196  const char* fname2,
197  const char* fname3,
198  const char* fname4,
199  void** keep,
200  const struct ma77_control_d* control,
201  struct ma77_info_d* info
202 );
203 
204 void ma77_input_vars(
205  const int idx,
206  const int nvar,
207  const int list[],
208  void** keep,
209  const struct ma77_control_d* control,
210  struct ma77_info_d* info
211 );
212 
213 void ma77_input_reals_d(
214  const int idx,
215  const int length,
216  const ma77pkgtype_d_ reals[],
217  void** keep,
218  const struct ma77_control_d* control,
219  struct ma77_info_d* info
220 );
221 
223 void ma77_analyse(
224  const int order[],
225  void** keep,
226  const struct ma77_control_d* control,
227  struct ma77_info_d* info
228 );
229 
231 void ma77_factor_d(
232  const int posdef,
233  void** keep,
234  const struct ma77_control_d* control,
235  struct ma77_info_d* info,
236  const ma77pkgtype_d_* scale
237 );
238 
241  const int posdef,
242  void** keep,
243  const struct ma77_control_d* control,
244  struct ma77_info_d* info,
245  const ma77pkgtype_d_* scale,
246  const int nrhs,
247  const int lx,
248  ma77pkgtype_d_ rhs[]
249 );
250 
252 void ma77_solve_d(
253  const int job,
254  const int nrhs,
255  const int lx,
256  ma77pkgtype_d_ x[],
257  void** keep,
258  const struct ma77_control_d* control,
259  struct ma77_info_d* info,
260  const ma77pkgtype_d_* scale
261 );
262 
263 void ma77_resid_d(
264  const int nrhs,
265  const int lx,
266  const ma77pkgtype_d_ x[],
267  const int lresid,
268  ma77pkgtype_d_ resid[],
269  void** keep,
270  const struct ma77_control_d* control,
271  struct ma77_info_d* info,
272  ma77pkgtype_d_* anorm_bnd
273 );
274 
275 void ma77_scale_d(
276  ma77pkgtype_d_ scale[],
277  void** keep,
278  const struct ma77_control_d* control,
279  struct ma77_info_d* info,
280  ma77pkgtype_d_* anorm
281 );
282 
284  ma77pkgtype_d_ d[],
285  void** keep,
286  const struct ma77_control_d* control,
287  struct ma77_info_d* info
288 );
289 
291  int piv_order[],
292  ma77pkgtype_d_ d[],
293  void** keep,
294  const struct ma77_control_d* control,
295  struct ma77_info_d* info
296 );
297 
298 void ma77_alter_d(
299  ma77pkgtype_d_ d[],
300  void** keep,
301  const struct ma77_control_d* control,
302  struct ma77_info_d* info
303 );
304 
305 void ma77_restart_d(
306  const char* restart_file,
307  const char* fname1,
308  const char* fname2,
309  const char* fname3,
310  const char* fname4,
311  void** keep,
312  const struct ma77_control_d* control,
313  struct ma77_info_d* info
314 );
315 
316 /* exists only for HSL 2013 */
318  int nrhs,
319  int flag_out[],
320  int lx,
321  ma77pkgtype_d_ x[],
322  void** keep,
323  const struct ma77_control_d* control,
324  struct ma77_info_d* info,
325  const ma77pkgtype_d_* scale
326 );
327 
328 /* exists only for HSL 2013 */
329 void ma77_lmultiply_d(
330  int trans,
331  int k,
332  int lx,
333  ma77pkgtype_d_ x[],
334  int ly,
335  ma77pkgtype_d_ y[],
336  void** keep,
337  const struct ma77_control_d* control,
338  struct ma77_info_d* info,
339  const ma77pkgtype_d_* scale
340 );
341 
343 void ma77_finalise_d(
344  void** keep,
345  const struct ma77_control_d* control,
346  struct ma77_info_d* info
347 );
348 
349 #endif
int action
Keep going even if matrix is singular if true, or abort if false.
Definition: hsl_ma77d.h:109
void ma77_open_d(const int n, const char *fname1, const char *fname2, const char *fname3, const char *fname4, void **keep, const struct ma77_control_d *control, struct ma77_info_d *info)
double ma77pkgtype_d_
Definition: hsl_ma77d.h:34
long int nfactor
Definition: hsl_ma77d.h:148
int unit_restart
Definition: hsl_ma77d.h:165
void ma77_solve_fredholm_d(int nrhs, int flag_out[], int lx, ma77pkgtype_d_ x[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info, const ma77pkgtype_d_ *scale)
int num_nothresh
Definition: hsl_ma77d.h:153
ma77pkgtype_d_ consist_tol
Tolerance for consistent singular system.
Definition: hsl_ma77d.h:123
void ma77_alter_d(ma77pkgtype_d_ d[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info)
void ma77_finalise_d(void **keep, const struct ma77_control_d *control, struct ma77_info_d *info)
To clean up memory in keep.
int maxdepth
Definition: hsl_ma77d.h:144
ma77pkgtype_d_ detlog
Definition: hsl_ma77d.h:137
long int nio_read[2]
Definition: hsl_ma77d.h:158
int matrix_dup
Definition: hsl_ma77d.h:141
void ma77_enquire_indef_d(int piv_order[], ma77pkgtype_d_ d[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info)
void ma77_default_control_d(struct ma77_control_d *control)
Initialise control with default values.
#define ma77_input_vars
Definition: hsl_ma77d.h:17
void ma77_factor_solve_d(const int posdef, void **keep, const struct ma77_control_d *control, struct ma77_info_d *info, const ma77pkgtype_d_ *scale, const int nrhs, const int lx, ma77pkgtype_d_ rhs[])
To factorize the matrix AND solve AX = B.
int f_arrays
Treat arrays as 1-based (Fortran) if true or 0-based (C) if false.
Definition: hsl_ma77d.h:46
void ma77_restart_d(const char *restart_file, const char *fname1, const char *fname2, const char *fname3, const char *fname4, void **keep, const struct ma77_control_d *control, struct ma77_info_d *info)
long int storage[3]
Definition: hsl_ma77d.h:78
long int nflops
Definition: hsl_ma77d.h:149
void ma77_enquire_posdef_d(ma77pkgtype_d_ d[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info)
ma77pkgtype_d_ u
Pivot tolerance.
Definition: hsl_ma77d.h:116
long int storage[4]
Definition: hsl_ma77d.h:163
#define ma77_open_nelt
Definition: hsl_ma77d.h:15
int buffer_lpage[2]
Definition: hsl_ma77d.h:74
ma77pkgtype_d_ umin
Minimum pivot tolerance.
Definition: hsl_ma77d.h:117
long int storage_indef
Definition: hsl_ma77d.h:115
long int nwd_read[2]
Definition: hsl_ma77d.h:160
int buffer_npage[2]
Definition: hsl_ma77d.h:75
int tree_nodes
Definition: hsl_ma77d.h:164
void ma77_input_reals_d(const int idx, const int length, const ma77pkgtype_d_ reals[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info)
long int minstore
Definition: hsl_ma77d.h:146
void ma77_resid_d(const int nrhs, const int lx, const ma77pkgtype_d_ x[], const int lresid, ma77pkgtype_d_ resid[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info, ma77pkgtype_d_ *anorm_bnd)
void ma77_solve_d(const int job, const int nrhs, const int lx, ma77pkgtype_d_ x[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info, const ma77pkgtype_d_ *scale)
To solve AX = B using the computed factors.
ma77pkgtype_d_ rspare[5]
Definition: hsl_ma77d.h:129
int unit_warning
Definition: hsl_ma77d.h:67
int unit_error
unit for error messages
Definition: hsl_ma77d.h:62
int matrix_outrange
Definition: hsl_ma77d.h:143
int matrix_rank
Definition: hsl_ma77d.h:142
Data type for user controls.
Definition: hsl_ma77d.h:40
long int lspare[5]
Definition: hsl_ma77d.h:128
long int nio_write[2]
Definition: hsl_ma77d.h:159
ma77pkgtype_d_ small
Definition: hsl_ma77d.h:113
int nemin
Node amalgamation parameter.
Definition: hsl_ma77d.h:88
ma77pkgtype_d_ multiplier
Definition: hsl_ma77d.h:110
void ma77_factor_d(const int posdef, void **keep, const struct ma77_control_d *control, struct ma77_info_d *info, const ma77pkgtype_d_ *scale)
To factorize the matrix.
int unit_diagnostics
unit for diagnostic messages
Definition: hsl_ma77d.h:57
int num_perturbed
Definition: hsl_ma77d.h:154
data type for returning information to user.
Definition: hsl_ma77d.h:135
ma77pkgtype_d_ rspare[5]
Definition: hsl_ma77d.h:173
void ma77_scale_d(ma77pkgtype_d_ scale[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info, ma77pkgtype_d_ *anorm)
int num_file[4]
Definition: hsl_ma77d.h:162
ma77pkgtype_d_ static_
Definition: hsl_ma77d.h:114
int ispare[5]
Definition: hsl_ma77d.h:171
int maxfront
Definition: hsl_ma77d.h:145
#define ma77_analyse
Definition: hsl_ma77d.h:19
long int file_size
Definition: hsl_ma77d.h:76
ma77pkgtype_d_ thresh
Definition: hsl_ma77d.h:96
long int maxstore
Definition: hsl_ma77d.h:77
int index[4]
Definition: hsl_ma77d.h:157
ma77pkgtype_d_ usmall
Definition: hsl_ma77d.h:167
long int nwd_write[2]
Definition: hsl_ma77d.h:161
long int lspare[5]
Definition: hsl_ma77d.h:172
void ma77_lmultiply_d(int trans, int k, int lx, ma77pkgtype_d_ x[], int ly, ma77pkgtype_d_ y[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info, const ma77pkgtype_d_ *scale)
int ispare[5]
Definition: hsl_ma77d.h:127