Ipopt Documentation  
 
Loading...
Searching...
No Matches
hsl_ma77s.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT (c) 2011 Science and Technology Facilities Council (STFC)
3 * Original date 18 May 2011
4 * All rights reserved
5 *
6 * Written by: Jonathan Hogg
7 *
8 * THIS FILE ONLY may be redistributed under the below modified BSD licence.
9 * All other files distributed as part of the HSL_MA77 package
10 * require a licence to be obtained from STFC and may NOT be redistributed
11 * without permission. Please refer to your licence for HSL_MA77 for full terms
12 * and conditions. STFC may be contacted via hsl(at)stfc.ac.uk.
13 *
14 * Modified BSD licence (this header file only):
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions are met:
18 * * Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * * Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 * * Neither the name of STFC nor the names of its contributors may be used
24 * to endorse or promote products derived from this software without
25 * specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL STFC BE LIABLE FOR ANY DIRECT, INDIRECT,
31 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
33 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
36 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 *
38 */
39
40#ifndef HSL_MA77S_H
41#define HSL_MA77S_H
42
43#ifndef ma77_default_control
44#define ma77_control ma77_control_s
45#define ma77_info ma77_info_s
46#define ma77_default_control ma77_default_control_s
47#define ma77_open_nelt ma77_open_nelt_s
48#define ma77_open ma77_open_s
49#define ma77_input_vars ma77_input_vars_s
50#define ma77_input_reals ma77_input_reals_s
51#define ma77_analyse ma77_analyse_s
52#define ma77_factor ma77_factor_s
53#define ma77_factor_solve ma77_factor_solve_s
54#define ma77_solve ma77_solve_s
55#define ma77_resid ma77_resid_s
56#define ma77_scale ma77_scale_s
57#define ma77_enquire_posdef ma77_enquire_posdef_s
58#define ma77_enquire_indef ma77_enquire_indef_s
59#define ma77_alter ma77_alter_s
60#define ma77_restart ma77_restart_s
61#define ma77_finalise ma77_finalise_s
62#define ma77_solve_fredholm ma77_solve_fredholm_s
63#define ma77_lmultiply ma77_lmultiply_s
64#endif
65
66typedef float ma77pkgtype_s_;
67
68/* Data type for user controls */
70 /* Note: 0 is false, non-zero is true */
71
72 /* C/Fortran interface related controls */
73 int f_arrays; /* Treat arrays as 1-based (Fortran) if true or 0-based (C) if
74 false. */
75
76 /* Printing controls */
78 int unit_diagnostics; /* unit for diagnostic messages
79 Printing is suppressed if unit_diagnostics < 0. */
80 int unit_error; /* unit for error messages
81 Printing is suppressed if unit_error < 0. */
82 int unit_warning; /* unit for warning messages
83 Printing is suppressed if unit_warning < 0. */
84
85 /* Controls used by MA77_open */
86 int bits;
89 long int file_size;
90 long int maxstore;
91 long int storage[3];
92
93 /* Controls used by MA77_analyse */
94 int nemin; /* Node amalgamation parameter. A child node is merged with its
95 parent if they both involve fewer than nemin eliminations.*/
96
97 /* Controls used by MA77_scale */
98 int maxit;
101
102 /* Controls used by MA77_factor with posdef true */
103 int nb54;
104
105 /* Controls used by MA77_factor with posdef false */
106 int action; /* Keep going even if matrix is singular if true, or abort
107 if false */
109 int nb64;
110 int nbi;
114 ma77pkgtype_s_ u; /* Pivot tolerance*/
115 ma77pkgtype_s_ umin; /* Minimum pivot tolerance*/
116
117 /* Controls used by ma77_solve_fredholm */
118 ma77pkgtype_s_ consist_tol; /* Tolerance for consistent singular system */
119
120 /* Pad data structure to allow for future growth */
121 int ispare[5]; long int lspare[5]; ma77pkgtype_s_ rspare[5];
122};
123
124/***************************************************/
125
126/* data type for returning information to user.*/
130 int flag;
137 long int minstore;
139 long int nfactor;
140 long int nflops;
141 int niter;
142 int nsup;
146 int ntwo;
147 int stat;
148 int index[4];
149 long int nio_read[2];
150 long int nio_write[2];
151 long int nwd_read[2];
152 long int nwd_write[2];
153 int num_file[4];
154 long int storage[4];
159
160 /* Pad data structure to allow for future growth */
161 int ispare[5]; long int lspare[5]; ma77pkgtype_s_ rspare[5];
162};
163
164/* Initialise control with default values */
166void ma77_open_nelt_s(const int n, const char* fname1, const char* fname2,
167 const char *fname3, const char *fname4, void **keep,
168 const struct ma77_control_s *control, struct ma77_info_s *info,
169 const int nelt);
170void ma77_open_s(const int n, const char* fname1, const char* fname2,
171 const char *fname3, const char *fname4, void **keep,
172 const struct ma77_control_s *control, struct ma77_info_s *info);
173void ma77_input_vars_s(const int idx, const int nvar, const int list[],
174 void **keep, const struct ma77_control_s *control, struct ma77_info_s *info);
175void ma77_input_reals_s(const int idx, const int length,
176 const ma77pkgtype_s_ reals[], void **keep,
177 const struct ma77_control_s *control, struct ma77_info_s *info);
178/* Analyse the sparsity pattern and prepare for factorization */
179void ma77_analyse_s(const int order[], void **keep,
180 const struct ma77_control_s *control, struct ma77_info_s *info);
181/* To factorize the matrix */
182void ma77_factor_s(const int posdef, void **keep,
183 const struct ma77_control_s *control, struct ma77_info_s *info,
184 const ma77pkgtype_s_ *scale);
185/* To factorize the matrix AND solve AX = B */
186void ma77_factor_solve_s(const int posdef, void **keep,
187 const struct ma77_control_s *control, struct ma77_info_s *info,
188 const ma77pkgtype_s_ *scale, const int nrhs, const int lx,
189 ma77pkgtype_s_ rhs[]);
190/* To solve AX = B using the computed factors */
191void ma77_solve_s(const int job, const int nrhs, const int lx, ma77pkgtype_s_ x[],
192 void **keep, const struct ma77_control_s *control, struct ma77_info_s *info,
193 const ma77pkgtype_s_ *scale);
194void ma77_resid_s(const int nrhs, const int lx, const ma77pkgtype_s_ x[],
195 const int lresid, ma77pkgtype_s_ resid[], void **keep,
196 const struct ma77_control_s *control, struct ma77_info_s *info,
197 ma77pkgtype_s_ *anorm_bnd);
198void ma77_scale_s(ma77pkgtype_s_ scale[], void **keep,
199 const struct ma77_control_s *control, struct ma77_info_s *info,
200 ma77pkgtype_s_ *anorm);
202 const struct ma77_control_s *control, struct ma77_info_s *info);
203void ma77_enquire_indef_s(int piv_order[], ma77pkgtype_s_ d[], void **keep,
204 const struct ma77_control_s *control, struct ma77_info_s *info);
205void ma77_alter_s(const ma77pkgtype_s_ d[], void **keep,
206 const struct ma77_control_s *control, struct ma77_info_s *info);
207void ma77_restart_s(const char *restart_file, const char *fname1,
208 const char *fname2, const char *fname3, const char *fname4, void **keep,
209 const struct ma77_control_s *control, struct ma77_info_s *info);
210void ma77_solve_fredholm_s(int nrhs, int flag_out[], int lx, ma77pkgtype_s_ x[],
211 void **keep, const struct ma77_control_s *control,
212 struct ma77_info_s *info, const ma77pkgtype_s_ *scale);
213void ma77_lmultiply_s(int trans, int k, int lx, ma77pkgtype_s_ x[], int ly,
214 ma77pkgtype_s_ y[], void **keep, const struct ma77_control_s *control,
215 struct ma77_info_s *info, const ma77pkgtype_s_ *scale);
216/* To clean up memory in keep */
217void ma77_finalise_s(void **keep, const struct ma77_control_s *control,
218 struct ma77_info_s *info);
219
220#endif
void ma77_enquire_posdef_s(ma77pkgtype_s_ d[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info)
void ma77_lmultiply_s(int trans, int k, int lx, ma77pkgtype_s_ x[], int ly, ma77pkgtype_s_ y[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info, const ma77pkgtype_s_ *scale)
void ma77_factor_solve_s(const int posdef, void **keep, const struct ma77_control_s *control, struct ma77_info_s *info, const ma77pkgtype_s_ *scale, const int nrhs, const int lx, ma77pkgtype_s_ rhs[])
void ma77_analyse_s(const int order[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info)
void ma77_open_nelt_s(const int n, const char *fname1, const char *fname2, const char *fname3, const char *fname4, void **keep, const struct ma77_control_s *control, struct ma77_info_s *info, const int nelt)
void ma77_input_reals_s(const int idx, const int length, const ma77pkgtype_s_ reals[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info)
void ma77_default_control_s(struct ma77_control_s *control)
void ma77_solve_s(const int job, const int nrhs, const int lx, ma77pkgtype_s_ x[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info, const ma77pkgtype_s_ *scale)
void ma77_alter_s(const ma77pkgtype_s_ d[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info)
void ma77_factor_s(const int posdef, void **keep, const struct ma77_control_s *control, struct ma77_info_s *info, const ma77pkgtype_s_ *scale)
void ma77_resid_s(const int nrhs, const int lx, const ma77pkgtype_s_ x[], const int lresid, ma77pkgtype_s_ resid[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info, ma77pkgtype_s_ *anorm_bnd)
void ma77_solve_fredholm_s(int nrhs, int flag_out[], int lx, ma77pkgtype_s_ x[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info, const ma77pkgtype_s_ *scale)
void ma77_input_vars_s(const int idx, const int nvar, const int list[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info)
void ma77_enquire_indef_s(int piv_order[], ma77pkgtype_s_ d[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info)
void ma77_scale_s(ma77pkgtype_s_ scale[], void **keep, const struct ma77_control_s *control, struct ma77_info_s *info, ma77pkgtype_s_ *anorm)
void ma77_restart_s(const char *restart_file, const char *fname1, const char *fname2, const char *fname3, const char *fname4, void **keep, const struct ma77_control_s *control, struct ma77_info_s *info)
void ma77_finalise_s(void **keep, const struct ma77_control_s *control, struct ma77_info_s *info)
float ma77pkgtype_s_
Definition hsl_ma77s.h:66
void ma77_open_s(const int n, const char *fname1, const char *fname2, const char *fname3, const char *fname4, void **keep, const struct ma77_control_s *control, struct ma77_info_s *info)
long int lspare[5]
Definition hsl_ma77s.h:121
long int maxstore
Definition hsl_ma77s.h:90
long int storage_indef
Definition hsl_ma77s.h:113
int buffer_lpage[2]
Definition hsl_ma77s.h:87
ma77pkgtype_s_ static_
Definition hsl_ma77s.h:112
ma77pkgtype_s_ thresh
Definition hsl_ma77s.h:100
long int storage[3]
Definition hsl_ma77s.h:91
ma77pkgtype_s_ umin
Definition hsl_ma77s.h:115
long int file_size
Definition hsl_ma77s.h:89
ma77pkgtype_s_ small
Definition hsl_ma77s.h:111
ma77pkgtype_s_ rspare[5]
Definition hsl_ma77s.h:121
int buffer_npage[2]
Definition hsl_ma77s.h:88
ma77pkgtype_s_ u
Definition hsl_ma77s.h:114
ma77pkgtype_s_ multiplier
Definition hsl_ma77s.h:108
ma77pkgtype_s_ consist_tol
Definition hsl_ma77s.h:118
int unit_diagnostics
Definition hsl_ma77s.h:78
int num_nothresh
Definition hsl_ma77s.h:144
long int nflops
Definition hsl_ma77s.h:140
long int nio_write[2]
Definition hsl_ma77s.h:150
ma77pkgtype_s_ usmall
Definition hsl_ma77s.h:158
int ispare[5]
Definition hsl_ma77s.h:161
long int storage[4]
Definition hsl_ma77s.h:154
long int nfactor
Definition hsl_ma77s.h:139
ma77pkgtype_s_ detlog
Definition hsl_ma77s.h:128
long int nwd_write[2]
Definition hsl_ma77s.h:152
int index[4]
Definition hsl_ma77s.h:148
int matrix_rank
Definition hsl_ma77s.h:133
int unit_restart
Definition hsl_ma77s.h:156
int num_perturbed
Definition hsl_ma77s.h:145
long int minstore
Definition hsl_ma77s.h:137
long int nwd_read[2]
Definition hsl_ma77s.h:151
long int nio_read[2]
Definition hsl_ma77s.h:149
ma77pkgtype_s_ rspare[5]
Definition hsl_ma77s.h:161
int num_file[4]
Definition hsl_ma77s.h:153
long int lspare[5]
Definition hsl_ma77s.h:161
int matrix_outrange
Definition hsl_ma77s.h:134