Ipopt 3.11.9
Loading...
Searching...
No Matches
hsl_ma77d.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT (c) 2011, 2013 The Science and Technology Facilities Council (STFC)
3 * All Rights Reserved.
4 * This code is published under the Eclipse Public License.
5 *
6 * Authors: Jonathan Hogg STFC 2011-05-18
7 */
8
9#ifndef HSL_MA77D_H
10#define HSL_MA77D_H
11
12#ifndef ma77_default_control
13#define ma77_control ma77_control_d
14#define ma77_info ma77_info_d
15#define ma77_default_control ma77_default_control_d
16#define ma77_open_nelt ma77_open_nelt_d
17#define ma77_open ma77_open_d
18#define ma77_input_vars ma77_input_vars_d
19#define ma77_input_reals ma77_input_reals_d
20#define ma77_analyse ma77_analyse_d
21#define ma77_factor ma77_factor_d
22#define ma77_factor_solve ma77_factor_solve_d
23#define ma77_solve ma77_solve_d
24#define ma77_resid ma77_resid_d
25#define ma77_scale ma77_scale_d
26#define ma77_enquire_posdef ma77_enquire_posdef_d
27#define ma77_enquire_indef ma77_enquire_indef_d
28#define ma77_alter ma77_alter_d
29#define ma77_restart ma77_restart_d
30#define ma77_finalise ma77_finalise_d
31#define ma77_solve_fredholm ma77_solve_fredholm_d
32#define ma77_lmultiply ma77_lmultiply_d
33#endif
34
35typedef double ma77pkgtype_d_;
36
37/* Data type for user controls */
39 /* Note: 0 is false, non-zero is true */
40
41 /* C/Fortran interface related controls */
42 int f_arrays; /* Treat arrays as 1-based (Fortran) if true or 0-based (C) if
43 false. */
44
45 /* Printing controls */
47 int unit_diagnostics; /* unit for diagnostic messages
48 Printing is suppressed if unit_diagnostics < 0. */
49 int unit_error; /* unit for error messages
50 Printing is suppressed if unit_error < 0. */
51 int unit_warning; /* unit for warning messages
52 Printing is suppressed if unit_warning < 0. */
53
54 /* Controls used by MA77_open */
55 int bits;
58 long int file_size;
59 long int maxstore;
60 long int storage[3];
61
62 /* Controls used by MA77_analyse */
63 int nemin; /* Node amalgamation parameter. A child node is merged with its
64 parent if they both involve fewer than nemin eliminations.*/
65
66 /* Controls used by MA77_scale */
67 int maxit;
70
71 /* Controls used by MA77_factor with posdef true */
72 int nb54;
73
74 /* Controls used by MA77_factor with posdef false */
75 int action; /* Keep going even if matrix is singular if true, or abort
76 if false */
78 int nb64;
79 int nbi;
82 long int storage_indef;
83 ma77pkgtype_d_ u; /* Pivot tolerance*/
84 ma77pkgtype_d_ umin; /* Minimum pivot tolerance*/
85
86#if defined(COINHSL_HSL2013) || !defined(COINHSL_HAS_MA77)
87 /* Controls used by ma77_solve_fredholm */
88 ma77pkgtype_d_ consist_tol; /* Tolerance for consistent singular system */
89
90 /* Pad data structure to allow for future growth */
91 int ispare[5]; long int lspare[5]; ma77pkgtype_d_ rspare[5];
92#endif
93};
94
95/***************************************************/
96
97/* data type for returning information to user.*/
101 int flag;
108 long int minstore;
110 long int nfactor;
111 long int nflops;
112 int niter;
113 int nsup;
117 int ntwo;
118 int stat;
119 int index[4];
120 long int nio_read[2];
121 long int nio_write[2];
122 long int nwd_read[2];
123 long int nwd_write[2];
124 int num_file[4];
125 long int storage[4];
130
131 /* if we do not have MA77, we assume its is loaded via the linear solver loader, for which we assume HSL 2013 */
132#if defined(COINHSL_HSL2013) || !defined(COINHSL_HAS_MA77)
133 /* Pad data structure to allow for future growth */
134 int ispare[5]; long int lspare[5]; ma77pkgtype_d_ rspare[5];
135#endif
136};
137
138/* Initialise control with default values */
140void ma77_open_nelt(const int n, const char* fname1, const char* fname2,
141 const char *fname3, const char *fname4, void **keep,
142 const struct ma77_control_d *control, struct ma77_info_d *info,
143 const int nelt);
144void ma77_open_d(const int n, const char* fname1, const char* fname2,
145 const char *fname3, const char *fname4, void **keep,
146 const struct ma77_control_d *control, struct ma77_info_d *info);
147void ma77_input_vars(const int idx, const int nvar, const int list[],
148 void **keep, const struct ma77_control_d *control, struct ma77_info_d *info);
149void ma77_input_reals_d(const int idx, const int length,
150 const ma77pkgtype_d_ reals[], void **keep, const struct ma77_control_d *control,
151 struct ma77_info_d *info);
152/* Analyse the sparsity pattern and prepare for factorization */
153void ma77_analyse(const int order[], void **keep,
154 const struct ma77_control_d *control, struct ma77_info_d *info);
155/* To factorize the matrix */
156void ma77_factor_d(const int posdef, void **keep,
157 const struct ma77_control_d *control, struct ma77_info_d *info,
158 const ma77pkgtype_d_ *scale);
159/* To factorize the matrix AND solve AX = B */
160void ma77_factor_solve_d(const int posdef, void **keep,
161 const struct ma77_control_d *control, struct ma77_info_d *info,
162 const ma77pkgtype_d_ *scale, const int nrhs, const int lx,
163 ma77pkgtype_d_ rhs[]);
164/* To solve AX = B using the computed factors */
165void ma77_solve_d(const int job, const int nrhs, const int lx, ma77pkgtype_d_ x[],
166 void **keep, const struct ma77_control_d *control, struct ma77_info_d *info,
167 const ma77pkgtype_d_ *scale);
168void ma77_resid_d(const int nrhs, const int lx, const ma77pkgtype_d_ x[],
169 const int lresid, ma77pkgtype_d_ resid[], void **keep,
170 const struct ma77_control_d *control, struct ma77_info_d *info,
171 ma77pkgtype_d_ *anorm_bnd);
172void ma77_scale_d(ma77pkgtype_d_ scale[], void **keep,
173 const struct ma77_control_d *control, struct ma77_info_d *info,
174 ma77pkgtype_d_ *anorm);
176 const struct ma77_control_d *control, struct ma77_info_d *info);
177void ma77_enquire_indef_d(int piv_order[], ma77pkgtype_d_ d[], void **keep,
178 const struct ma77_control_d *control, struct ma77_info_d *info);
179void ma77_alter_d(const ma77pkgtype_d_ d[], void **keep,
180 const struct ma77_control_d *control, struct ma77_info_d *info);
181void ma77_restart_d(const char *restart_file, const char *fname1,
182 const char *fname2, const char *fname3, const char *fname4, void **keep,
183 const struct ma77_control_d *control, struct ma77_info_d *info);
184/* exists only for HSL 2013 */
185void ma77_solve_fredholm_d(int nrhs, int flag_out[], int lx, ma77pkgtype_d_ x[],
186 void **keep, const struct ma77_control_d *control,
187 struct ma77_info_d *info, const ma77pkgtype_d_ *scale);
188/* exists only for HSL 2013 */
189void ma77_lmultiply_d(int trans, int k, int lx, ma77pkgtype_d_ x[], int ly,
190 ma77pkgtype_d_ y[], void **keep, const struct ma77_control_d *control,
191 struct ma77_info_d *info, const ma77pkgtype_d_ *scale);
192/* To clean up memory in keep */
193void ma77_finalise_d(void **keep, const struct ma77_control_d *control,
194 struct ma77_info_d *info);
195
196#endif
Number * x
Input: Starting point Output: Optimal solution.
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)
void ma77_alter_d(const 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)
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)
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)
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)
#define ma77_open_nelt
Definition hsl_ma77d.h:16
void ma77_factor_d(const int posdef, void **keep, const struct ma77_control_d *control, struct ma77_info_d *info, const ma77pkgtype_d_ *scale)
double ma77pkgtype_d_
Definition hsl_ma77d.h:35
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_scale_d(ma77pkgtype_d_ scale[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info, ma77pkgtype_d_ *anorm)
#define ma77_analyse
Definition hsl_ma77d.h:20
void ma77_enquire_posdef_d(ma77pkgtype_d_ d[], void **keep, const struct ma77_control_d *control, struct ma77_info_d *info)
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[])
#define ma77_input_vars
Definition hsl_ma77d.h:18
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)
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)
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_finalise_d(void **keep, const struct ma77_control_d *control, struct ma77_info_d *info)
long int lspare[5]
Definition hsl_ma77d.h:91
ma77pkgtype_d_ consist_tol
Definition hsl_ma77d.h:88
long int storage[3]
Definition hsl_ma77d.h:60
long int storage_indef
Definition hsl_ma77d.h:82
ma77pkgtype_d_ rspare[5]
Definition hsl_ma77d.h:91
long int maxstore
Definition hsl_ma77d.h:59
ma77pkgtype_d_ umin
Definition hsl_ma77d.h:84
int buffer_lpage[2]
Definition hsl_ma77d.h:56
ma77pkgtype_d_ static_
Definition hsl_ma77d.h:81
ma77pkgtype_d_ u
Definition hsl_ma77d.h:83
ma77pkgtype_d_ thresh
Definition hsl_ma77d.h:69
int ispare[5]
Definition hsl_ma77d.h:91
ma77pkgtype_d_ small
Definition hsl_ma77d.h:80
long int file_size
Definition hsl_ma77d.h:58
int buffer_npage[2]
Definition hsl_ma77d.h:57
int unit_diagnostics
Definition hsl_ma77d.h:47
ma77pkgtype_d_ multiplier
Definition hsl_ma77d.h:77
long int nwd_write[2]
Definition hsl_ma77d.h:123
int matrix_rank
Definition hsl_ma77d.h:104
long int nio_read[2]
Definition hsl_ma77d.h:120
int matrix_outrange
Definition hsl_ma77d.h:105
ma77pkgtype_d_ usmall
Definition hsl_ma77d.h:129
long int lspare[5]
Definition hsl_ma77d.h:134
int index[4]
Definition hsl_ma77d.h:119
long int nflops
Definition hsl_ma77d.h:111
int num_perturbed
Definition hsl_ma77d.h:116
ma77pkgtype_d_ rspare[5]
Definition hsl_ma77d.h:134
long int minstore
Definition hsl_ma77d.h:108
long int storage[4]
Definition hsl_ma77d.h:125
int unit_restart
Definition hsl_ma77d.h:127
long int nio_write[2]
Definition hsl_ma77d.h:121
int ispare[5]
Definition hsl_ma77d.h:134
ma77pkgtype_d_ detlog
Definition hsl_ma77d.h:99
int num_nothresh
Definition hsl_ma77d.h:115
long int nwd_read[2]
Definition hsl_ma77d.h:122
long int nfactor
Definition hsl_ma77d.h:110
int num_file[4]
Definition hsl_ma77d.h:124