Ipopt Documentation  
hsl_ma97d.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.6.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_MA97D_H
43 #define HSL_MA97D_H
44 
45 #ifndef ma97_default_control
46 #define ma97_control ma97_control_d
47 #define ma97_info ma97_info_d
48 #define ma97_default_control ma97_default_control_d
49 #define ma97_analyse ma97_analyse_d
50 #define ma97_analyse_coord ma97_analyse_coord_d
51 #define ma97_factor ma97_factor_d
52 #define ma97_factor_solve ma97_factor_solve_d
53 #define ma97_solve ma97_solve_d
54 #define ma97_free_akeep ma97_free_akeep_d
55 #define ma97_free_fkeep ma97_free_fkeep_d
56 #define ma97_finalise ma97_finalise_d
57 #define ma97_enquire_posdef ma97_enquire_posdef_d
58 #define ma97_enquire_indef ma97_enquire_indef_d
59 #define ma97_alter ma97_alter_d
60 #define ma97_solve_fredholm ma97_solve_fredholm_d
61 #define ma97_lmultiply ma97_lmultiply_d
62 #define ma97_sparse_fwd_solve ma97_sparse_fwd_solve_d
63 #endif
64 
65 typedef double ma97pkgtype_d_;
66 typedef double ma97realtype_d_;
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_d_ 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_d_ small; /* Minimum value to count as non-zero */
85  ma97realtype_d_ 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_d_ consist_tol; /* Consistent equation tolerance */
94 
95  /* Reserve space for future interface changes */
97 };
98 
99 struct ma97_info {
100  int flag; /* <0 on error */
101  int flag68;
102  int flag77;
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 dimension of frontal matrix */
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 
118  /* Reserve space for future interface changes */
120 };
121 
122 /* Set default values of control */
124 /* Perform symbolic analysis of matrix (sparse column entry) */
125 void ma97_analyse_d(int check, int n, const int ptr[], const int row[],
126  ma97pkgtype_d_ val[], void **akeep, const struct ma97_control_d *control,
127  struct ma97_info_d *info, int order[]);
128 /* Perform symbolic analysis of matrix (coordinate entry) */
129 void ma97_analyse_coord_d(int n, int ne, const int row[], const int col[],
130  ma97pkgtype_d_ val[], void **akeep, const struct ma97_control_d *control,
131  struct ma97_info_d *info, int order[]);
132 /* Perform numerical factorization, following call to ma97_analyse */
133 void ma97_factor_d(int matrix_type, const int ptr[], const int row[],
134  const ma97pkgtype_d_ val[], void **akeep, void **fkeep,
135  const struct ma97_control_d *control, struct ma97_info_d *info,
136  ma97realtype_d_ scale[]);
137 /* Perform numerical factorization and solve, following call to ma97_analyse */
138 void ma97_factor_solve_d(int matrix_type, const int ptr[], const int row[],
139  const ma97pkgtype_d_ val[], int nrhs, ma97pkgtype_d_ x[], int ldx,
140  void **akeep, void **fkeep, const struct ma97_control_d *control,
141  struct ma97_info_d *info, ma97realtype_d_ scale[]);
142 /* Perform forward and back substitutions, following call to ma97_factor */
143 void ma97_solve_d(int job, int nrhs, ma97pkgtype_d_ x[], int ldx,
144  void **akeep, void **fkeep, const struct ma97_control_d *control,
145  struct ma97_info_d *info);
146 /* Free memory in akeep */
147 void ma97_free_akeep_d(void **akeep);
148 /* Free memory in fkeep */
149 void ma97_free_fkeep_d(void **fkeep);
150 /* Free memory in akeep and fkeep */
151 void ma97_finalise_d(void **akeep, void **fkeep);
152 /* Return diagonal entries of L */
153 void ma97_enquire_posdef_d(void **akeep, void **fkeep,
154  const struct ma97_control *control, struct ma97_info *info,
155  ma97realtype_d_ d[]);
156 /* Return diagonal, subdiagonal and/or pivot order of D */
157 void ma97_enquire_indef_d(void **akeep, void **fkeep,
158  const struct ma97_control *control, struct ma97_info *info,
159  int *piv_order, ma97pkgtype_d_ *d);
160 /* Alter diagonal and subdiagonal of D */
161 void ma97_alter_d(const ma97pkgtype_d_ d[], void **akeep, void **fkeep,
162  const struct ma97_control *control, struct ma97_info *info);
163 /* Fredholm alternative for singular systems */
164 void ma97_solve_fredholm_d(int nrhs, int flag_out[], ma97pkgtype_d_ x[],
165  int ldx, void **akeep, void **fkeep, const struct ma97_control_d *control,
166  struct ma97_info_d *info);
167 /* Form (S^{-1}PL) X or (S^{-1}PL)^T X */
168 void ma97_lmultiply_d(int trans, int k, const ma97pkgtype_d_ x[], int ldx,
169  ma97pkgtype_d_ y[], int ldy, void **akeep, void **fkeep,
170  const struct ma97_control_d *control, struct ma97_info_d *info);
171 /* Perform a sparse forward solve */
172 void ma97_sparse_fwd_solve_d(int nbi, const int bindex[],
173  const ma97pkgtype_d_ b[], const int order[], int *nxi, int xindex[],
174  ma97pkgtype_d_ x[], void **akeep, void **fkeep,
175  const struct ma97_control_d *control, struct ma97_info_d *info);
176 
177 #endif
double ma97pkgtype_d_
Definition: hsl_ma97d.h:65
double ma97realtype_d_
Definition: hsl_ma97d.h:66
void ma97_factor_d(int matrix_type, const int ptr[], const int row[], const ma97pkgtype_d_ val[], void **akeep, void **fkeep, const struct ma97_control_d *control, struct ma97_info_d *info, ma97realtype_d_ scale[])
void ma97_finalise_d(void **akeep, void **fkeep)
void ma97_free_akeep_d(void **akeep)
void ma97_sparse_fwd_solve_d(int nbi, const int bindex[], const ma97pkgtype_d_ b[], const int order[], int *nxi, int xindex[], ma97pkgtype_d_ x[], void **akeep, void **fkeep, const struct ma97_control_d *control, struct ma97_info_d *info)
void ma97_enquire_posdef_d(void **akeep, void **fkeep, const struct ma97_control *control, struct ma97_info *info, ma97realtype_d_ d[])
void ma97_enquire_indef_d(void **akeep, void **fkeep, const struct ma97_control *control, struct ma97_info *info, int *piv_order, ma97pkgtype_d_ *d)
void ma97_default_control_d(struct ma97_control_d *control)
void ma97_analyse_coord_d(int n, int ne, const int row[], const int col[], ma97pkgtype_d_ val[], void **akeep, const struct ma97_control_d *control, struct ma97_info_d *info, int order[])
void ma97_lmultiply_d(int trans, int k, const ma97pkgtype_d_ x[], int ldx, ma97pkgtype_d_ y[], int ldy, void **akeep, void **fkeep, const struct ma97_control_d *control, struct ma97_info_d *info)
void ma97_solve_fredholm_d(int nrhs, int flag_out[], ma97pkgtype_d_ x[], int ldx, void **akeep, void **fkeep, const struct ma97_control_d *control, struct ma97_info_d *info)
#define ma97_control
Definition: hsl_ma97d.h:46
void ma97_alter_d(const ma97pkgtype_d_ d[], void **akeep, void **fkeep, const struct ma97_control *control, struct ma97_info *info)
void ma97_analyse_d(int check, int n, const int ptr[], const int row[], ma97pkgtype_d_ val[], void **akeep, const struct ma97_control_d *control, struct ma97_info_d *info, int order[])
void ma97_free_fkeep_d(void **fkeep)
void ma97_solve_d(int job, int nrhs, ma97pkgtype_d_ x[], int ldx, void **akeep, void **fkeep, const struct ma97_control_d *control, struct ma97_info_d *info)
void ma97_factor_solve_d(int matrix_type, const int ptr[], const int row[], const ma97pkgtype_d_ val[], int nrhs, ma97pkgtype_d_ x[], int ldx, void **akeep, void **fkeep, const struct ma97_control_d *control, struct ma97_info_d *info, ma97realtype_d_ scale[])
ma97realtype_d_ rspare[10]
Definition: hsl_ma97d.h:96
ma97realtype_d_ multiplier
Definition: hsl_ma97d.h:74
int ispare[5]
Definition: hsl_ma97d.h:96
long solve_min
Definition: hsl_ma97d.h:91
ma97realtype_d_ small
Definition: hsl_ma97d.h:84
ma97realtype_d_ u
Definition: hsl_ma97d.h:85
long factor_min
Definition: hsl_ma97d.h:89
int unit_warning
Definition: hsl_ma97d.h:88
ma97realtype_d_ consist_tol
Definition: hsl_ma97d.h:93
int unit_diagnostics
Definition: hsl_ma97d.h:86
long num_factor
Definition: hsl_ma97d.h:110
int stat
Definition: hsl_ma97d.h:116
int flag68
Definition: hsl_ma97d.h:101
long num_flops
Definition: hsl_ma97d.h:111
int matrix_outrange
Definition: hsl_ma97d.h:105
int flag
Definition: hsl_ma97d.h:100
int flag77
Definition: hsl_ma97d.h:102
int matrix_dup
Definition: hsl_ma97d.h:103
int num_neg
Definition: hsl_ma97d.h:112
int ordering
Definition: hsl_ma97d.h:115
int maxfront
Definition: hsl_ma97d.h:108
int maxdepth
Definition: hsl_ma97d.h:107
int matrix_rank
Definition: hsl_ma97d.h:104
int num_sup
Definition: hsl_ma97d.h:113
int matrix_missing_diag
Definition: hsl_ma97d.h:106
int ispare[5]
Definition: hsl_ma97d.h:119
int num_two
Definition: hsl_ma97d.h:114
int num_delay
Definition: hsl_ma97d.h:109
ma97realtype_d_ rspare[10]
Definition: hsl_ma97d.h:119