Ipopt Documentation  
 
Loading...
Searching...
No Matches
hsl_ma97s.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT (c) 2011 Science and Technology Facilities Council (STFC)
3 * Original date 20 September 2011
4 * All rights reserved
5 *
6 * Written by: Jonathan Hogg
7 *
8 * Version 2.8.0
9 *
10 * THIS FILE ONLY may be redistributed under the below modified BSD licence.
11 * All other files distributed as part of the HSL_MA97 package
12 * require a licence to be obtained from STFC and may NOT be redistributed
13 * without permission. Please refer to your licence for HSL_MA97 for full terms
14 * and conditions. STFC may be contacted via hsl(at)stfc.ac.uk.
15 *
16 * Modified BSD licence (this header file only):
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions are met:
20 * * Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 * * Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 * * Neither the name of STFC nor the names of its contributors may be used
26 * to endorse or promote products derived from this software without
27 * specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED. IN NO EVENT SHALL STFC BE LIABLE FOR ANY DIRECT, INDIRECT,
33 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
35 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
36 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
37 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
38 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 */
41
42#ifndef HSL_MA97S_H
43#define HSL_MA97S_H
44
45#ifndef ma97_default_control
46#define ma97_control ma97_control_s
47#define ma97_info ma97_info_s
48#define ma97_default_control ma97_default_control_s
49#define ma97_analyse ma97_analyse_s
50#define ma97_analyse_coord ma97_analyse_coord_s
51#define ma97_factor ma97_factor_s
52#define ma97_factor_solve ma97_factor_solve_s
53#define ma97_solve ma97_solve_s
54#define ma97_free_akeep ma97_free_akeep_s
55#define ma97_free_fkeep ma97_free_fkeep_s
56#define ma97_finalise ma97_finalise_s
57#define ma97_enquire_posdef ma97_enquire_posdef_s
58#define ma97_enquire_indef ma97_enquire_indef_s
59#define ma97_alter ma97_alter_s
60#define ma97_solve_fredholm ma97_solve_fredholm_s
61#define ma97_lmultiply ma97_lmultiply_s
62#define ma97_sparse_fwd_solve ma97_sparse_fwd_solve_s
63#endif
64
65typedef float ma97pkgtype_s_;
66typedef float ma97realtype_s_;
67
69 int f_arrays; /* Use C or Fortran numbering */
70 int action; /* Continue on singularity if !=0 (true),
71 otherwise abort */
72 int nemin; /* Supernode amalgamation if parent and child
73 have fewer than nemin eliminations */
74 ma97realtype_s_ multiplier;/* Amount of extra memory to allow for delays */
75 int ordering; /* Control scaling algorithm used:
76 0 - user supplied order (order absent=identity)
77 1 - AMD
78 2 - MD (as in MA27)
79 3 - METIS nested dissection
80 4 - MA47
81 5 - Automatic choice between 1 and 3 */
82 int print_level; /* <0 for no printing, 0 for basic, >1 for most */
83 int scaling; /* 0 user/none, 1 mc64, 2 mc77 */
84 ma97realtype_s_ small; /* Minimum value to count as non-zero */
85 ma97realtype_s_ u; /* Pivoting parameter */
86 int unit_diagnostics; /* Fortran unit for diagnostics (<0 disables) */
87 int unit_error; /* Fortran unit for error msgs (<0 disables) */
88 int unit_warning; /* Fortran unit for warning msgs (<0 disables) */
89 long factor_min; /* Min number of flops for parallel execution */
90 int solve_blas3; /* Use BLAS3 in solve in true, else BLAS2 */
91 long solve_min; /* Min number of entries for parallel exection */
92 int solve_mf; /* If true use m/f solve, else use s/n */
93 ma97realtype_s_ consist_tol; /* Consistent equation tolerance */
94
95 /* Reserve space for future interface changes */
97};
98
100 int flag; /* <0 on error */
103 int matrix_dup; /* number duplicate entries in A */
104 int matrix_rank; /* matrix rank */
105 int matrix_outrange; /* number of out of range entries in A */
106 int matrix_missing_diag; /* number of zero diagonal entries in A */
107 int maxdepth; /* height of assembly tree */
108 int maxfront; /* maximum no. rows in a supernode */
109 int num_delay; /* number of times a pivot was delayed */
110 long num_factor; /* number of entries in L */
111 long num_flops; /* number of floating point operations */
112 int num_neg; /* number of negative pivots */
113 int num_sup; /* number of supernodes in assembly tree */
114 int num_two; /* number of 2x2 pivots */
115 int ordering; /* ordering used (as per control.ordering) */
116 int stat; /* error code from failed memory allocation */
117 int maxsupernode; /* maximum no. columns in a supernode */
118
119 /* Reserve space for future interface changes */
121};
122
123/* Set default values of control */
125/* Perform symbolic analysis of matrix (sparse column entry) */
126void ma97_analyse_s(int check, int n, const int ptr[], const int row[],
127 ma97pkgtype_s_ val[], void **akeep, const struct ma97_control_s *control,
128 struct ma97_info_s *info, int order[]);
129/* Perform symbolic analysis of matrix (coordinate entry) */
130void ma97_analyse_coord_s(int n, int ne, const int row[], const int col[],
131 ma97pkgtype_s_ val[], void **akeep, const struct ma97_control_s *control,
132 struct ma97_info_s *info, int order[]);
133/* Perform numerical factorization, following call to ma97_analyse */
134void ma97_factor_s(int matrix_type, const int ptr[], const int row[],
135 const ma97pkgtype_s_ val[], void **akeep, void **fkeep,
136 const struct ma97_control_s *control, struct ma97_info_s *info,
137 ma97realtype_s_ scale[]);
138/* Perform numerical factorization and solve, following call to ma97_analyse */
139void ma97_factor_solve_s(int matrix_type, const int ptr[], const int row[],
140 const ma97pkgtype_s_ val[], int nrhs, ma97pkgtype_s_ x[], int ldx,
141 void **akeep, void **fkeep, const struct ma97_control_s *control,
142 struct ma97_info_s *info, ma97realtype_s_ scale[]);
143/* Perform forward and back substitutions, following call to ma97_factor */
144void ma97_solve_s(int job, int nrhs, ma97pkgtype_s_ x[], int ldx,
145 void **akeep, void **fkeep, const struct ma97_control_s *control,
146 struct ma97_info_s *info);
147/* Free memory in akeep */
148void ma97_free_akeep_s(void **akeep);
149/* Free memory in fkeep */
150void ma97_free_fkeep_s(void **fkeep);
151/* Free memory in akeep and fkeep */
152void ma97_finalise_s(void **akeep, void **fkeep);
153/* Return diagonal entries of L */
154void ma97_enquire_posdef_s(void **akeep, void **fkeep,
155 const struct ma97_control *control, struct ma97_info *info,
156 ma97realtype_s_ d[]);
157/* Return diagonal, subdiagonal and/or pivot order of D */
158void ma97_enquire_indef_s(void **akeep, void **fkeep,
159 const struct ma97_control *control, struct ma97_info *info,
160 int *piv_order, ma97pkgtype_s_ *d);
161/* Alter diagonal and subdiagonal of D */
162void ma97_alter_s(const ma97pkgtype_s_ d[], void **akeep, void **fkeep,
163 const struct ma97_control *control, struct ma97_info *info);
164/* Fredholm alternative for singular systems */
165void ma97_solve_fredholm_s(int nrhs, int flag_out[], ma97pkgtype_s_ x[],
166 int ldx, void **akeep, void **fkeep, const struct ma97_control_s *control,
167 struct ma97_info_s *info);
168/* Form (S^{-1}PL) X or (S^{-1}PL)^T X */
169void ma97_lmultiply_s(int trans, int k, const ma97pkgtype_s_ x[], int ldx,
170 ma97pkgtype_s_ y[], int ldy, void **akeep, void **fkeep,
171 const struct ma97_control_s *control, struct ma97_info_s *info);
172/* Perform a sparse forward solve */
173void ma97_sparse_fwd_solve_s(int nbi, const int bindex[],
174 const ma97pkgtype_s_ b[], const int order[], int *nxi, int xindex[],
175 ma97pkgtype_s_ x[], void **akeep, void **fkeep,
176 const struct ma97_control_s *control, struct ma97_info_s *info);
177
178#endif
void ma97_enquire_posdef_s(void **akeep, void **fkeep, const struct ma97_control *control, struct ma97_info *info, ma97realtype_s_ d[])
void ma97_analyse_s(int check, int n, const int ptr[], const int row[], ma97pkgtype_s_ val[], void **akeep, const struct ma97_control_s *control, struct ma97_info_s *info, int order[])
void ma97_solve_fredholm_s(int nrhs, int flag_out[], ma97pkgtype_s_ x[], int ldx, void **akeep, void **fkeep, const struct ma97_control_s *control, struct ma97_info_s *info)
float ma97realtype_s_
Definition hsl_ma97s.h:66
void ma97_enquire_indef_s(void **akeep, void **fkeep, const struct ma97_control *control, struct ma97_info *info, int *piv_order, ma97pkgtype_s_ *d)
void ma97_lmultiply_s(int trans, int k, const ma97pkgtype_s_ x[], int ldx, ma97pkgtype_s_ y[], int ldy, void **akeep, void **fkeep, const struct ma97_control_s *control, struct ma97_info_s *info)
void ma97_analyse_coord_s(int n, int ne, const int row[], const int col[], ma97pkgtype_s_ val[], void **akeep, const struct ma97_control_s *control, struct ma97_info_s *info, int order[])
void ma97_factor_solve_s(int matrix_type, const int ptr[], const int row[], const ma97pkgtype_s_ val[], int nrhs, ma97pkgtype_s_ x[], int ldx, void **akeep, void **fkeep, const struct ma97_control_s *control, struct ma97_info_s *info, ma97realtype_s_ scale[])
void ma97_factor_s(int matrix_type, const int ptr[], const int row[], const ma97pkgtype_s_ val[], void **akeep, void **fkeep, const struct ma97_control_s *control, struct ma97_info_s *info, ma97realtype_s_ scale[])
float ma97pkgtype_s_
Definition hsl_ma97s.h:65
void ma97_free_akeep_s(void **akeep)
void ma97_finalise_s(void **akeep, void **fkeep)
void ma97_solve_s(int job, int nrhs, ma97pkgtype_s_ x[], int ldx, void **akeep, void **fkeep, const struct ma97_control_s *control, struct ma97_info_s *info)
#define ma97_control
Definition hsl_ma97s.h:46
void ma97_free_fkeep_s(void **fkeep)
void ma97_alter_s(const ma97pkgtype_s_ d[], void **akeep, void **fkeep, const struct ma97_control *control, struct ma97_info *info)
#define ma97_info
Definition hsl_ma97s.h:47
void ma97_default_control_s(struct ma97_control_s *control)
void ma97_sparse_fwd_solve_s(int nbi, const int bindex[], const ma97pkgtype_s_ b[], const int order[], int *nxi, int xindex[], ma97pkgtype_s_ x[], void **akeep, void **fkeep, const struct ma97_control_s *control, struct ma97_info_s *info)
int ispare[5]
Definition hsl_ma97s.h:96
ma97realtype_s_ consist_tol
Definition hsl_ma97s.h:93
int unit_diagnostics
Definition hsl_ma97s.h:86
ma97realtype_s_ small
Definition hsl_ma97s.h:84
ma97realtype_s_ u
Definition hsl_ma97s.h:85
ma97realtype_s_ rspare[10]
Definition hsl_ma97s.h:96
ma97realtype_s_ multiplier
Definition hsl_ma97s.h:74
int matrix_rank
Definition hsl_ma97s.h:104
long num_flops
Definition hsl_ma97s.h:111
ma97realtype_s_ rspare[10]
Definition hsl_ma97s.h:120
int matrix_missing_diag
Definition hsl_ma97s.h:106
int ispare[4]
Definition hsl_ma97s.h:120
long num_factor
Definition hsl_ma97s.h:110
int matrix_outrange
Definition hsl_ma97s.h:105
int maxsupernode
Definition hsl_ma97s.h:117