Ipopt  3.12.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hsl_ma86d.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT (c) 2011 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-02-25
7  */
8 
9 #ifndef HSL_MA86D_H
10 #define HSL_MA86D_H
11 
12 #ifndef ma86_default_control
13 #define ma86_control ma86_control_d
14 #define ma86_info ma86_info_d
15 #define ma86_default_control ma86_default_control_d
16 #define ma86_analyse ma86_analyse_d
17 #define ma86_factor ma86_factor_d
18 #define ma86_factor_solve ma86_factor_solve_d
19 #define ma86_solve ma86_solve_d
20 #define ma86_finalise ma86_finalise_d
21 #endif
22 
23 typedef double ma86pkgtype_d_;
24 typedef double ma86realtype_d_;
25 
26 /* Data type for user controls */
28  /* Note: 0 is false, non-zero is true */
29 
30  /* C/Fortran interface related controls */
31  int f_arrays; /* Treat arrays as 1-based (Fortran) if true or 0-based (C) if
32  false. */
33 
34  /* Printing controls */
35  int diagnostics_level; /* Controls diagnostic printing.*/
36  /* Possible values are:
37  < 0: no printing.
38  0: error and warning messages only.
39  1: as 0 plus basic diagnostic printing.
40  2: as 1 plus some more detailed diagnostic messages.
41  3: as 2 plus all entries of user-supplied arrays. */
42  int unit_diagnostics; /* unit for diagnostic messages
43  Printing is suppressed if unit_diagnostics < 0. */
44  int unit_error; /* unit for error messages
45  Printing is suppressed if unit_error < 0. */
46  int unit_warning; /* unit for warning messages
47  Printing is suppressed if unit_warning < 0. */
48 
49  /* Controls used by ma86_analyse */
50  int nemin; /* Node amalgamation parameter. A child node is merged with its
51  parent if they both involve fewer than nemin eliminations.*/
52  int nb; /* Controls the size of the blocks used within each node (used to
53  set nb within node_type)*/
54 
55  /* Controls used by ma86_factor and ma86_factor_solve */
56  int action; /* Keep going even if matrix is singular if true, or abort
57  if false */
58  int nbi; /* Inner block size for use with ma64*/
59  int pool_size; /* Size of task pool arrays*/
60  ma86realtype_d_ small_; /* Pivots less than small are treated as zero*/
61  ma86realtype_d_ static_;/* Control static pivoting*/
62  ma86realtype_d_ u; /* Pivot tolerance*/
63  ma86realtype_d_ umin; /* Minimum pivot tolerance*/
64  int scaling; /* Scaling algorithm to use */
65 };
66 
67 /***************************************************/
68 
69 /* data type for returning information to user.*/
70 struct ma86_info_d {
71  ma86realtype_d_ detlog; /* Holds logarithm of abs det A (or 0) */
72  int detsign; /* Holds sign of determinant (+/-1 or 0) */
73  int flag; /* Error return flag (0 on success) */
74  int matrix_rank; /* Rank of matrix */
75  int maxdepth; /* Maximum depth of the tree. */
76  int num_delay; /* Number of delayed pivots */
77  long num_factor; /* Number of entries in the factor. */
78  long num_flops; /* Number of flops for factor. */
79  int num_neg; /* Number of negative pivots */
80  int num_nodes; /* Number of nodes */
81  int num_nothresh; /* Number of pivots not satisfying u */
82  int num_perturbed; /* Number of perturbed pivots */
83  int num_two; /* Number of 2x2 pivots */
84  int pool_size; /* Maximum size of task pool used */
85  int stat; /* STAT value on error return -1. */
86  ma86realtype_d_ usmall; /* smallest threshold parameter used */
87 };
88 
89 /* Initialise control with default values */
90 void ma86_default_control_d(struct ma86_control_d *control);
91 /* Analyse the sparsity pattern and prepare for factorization */
92 void ma86_analyse_d(const int n, const int ptr[], const int row[], int order[],
93  void **keep, const struct ma86_control_d *control,
94  struct ma86_info_d *info);
95 /* To factorize the matrix */
96 void ma86_factor_d(const int n, const int ptr[], const int row[],
97  const ma86pkgtype_d_ val[], const int order[], void **keep,
98  const struct ma86_control_d *control, struct ma86_info_d *info,
99  const ma86realtype_d_ scale[]);
100 /* To factorize the matrix AND solve AX = B */
101 void ma86_factor_solve_d(const int n, const int ptr[], const int row[],
102  const ma86pkgtype_d_ val[], const int order[], void **keep,
103  const struct ma86_control_d *control, struct ma86_info_d *info,
104  const int nrhs, const int ldx, ma86pkgtype_d_ x[],
105  const ma86realtype_d_ scale[]);
106 /* To solve AX = B using the computed factors */
107 void ma86_solve_d(const int job, const int nrhs, const int ldx,
108  ma86pkgtype_d_ *x, const int order[], void **keep,
109  const struct ma86_control_d *control, struct ma86_info_d *info,
110  const ma86realtype_d_ scale[]);
111 /* To clean up memory in keep */
112 void ma86_finalise_d(void **keep, const struct ma86_control_d *control);
113 
114 #endif
Number * x
Input: Starting point Output: Optimal solution.
int maxdepth
Definition: hsl_ma86d.h:75
int num_delay
Definition: hsl_ma86d.h:76
ma86realtype_d_ umin
Definition: hsl_ma86d.h:63
void ma86_solve_d(const int job, const int nrhs, const int ldx, ma86pkgtype_d_ *x, const int order[], void **keep, const struct ma86_control_d *control, struct ma86_info_d *info, const ma86realtype_d_ scale[])
int num_two
Definition: hsl_ma86d.h:83
ma86realtype_d_ small_
Definition: hsl_ma86d.h:60
ma86realtype_d_ u
Definition: hsl_ma86d.h:62
void ma86_factor_solve_d(const int n, const int ptr[], const int row[], const ma86pkgtype_d_ val[], const int order[], void **keep, const struct ma86_control_d *control, struct ma86_info_d *info, const int nrhs, const int ldx, ma86pkgtype_d_ x[], const ma86realtype_d_ scale[])
char char * val
void ma86_default_control_d(struct ma86_control_d *control)
void ma86_factor_d(const int n, const int ptr[], const int row[], const ma86pkgtype_d_ val[], const int order[], void **keep, const struct ma86_control_d *control, struct ma86_info_d *info, const ma86realtype_d_ scale[])
int unit_diagnostics
Definition: hsl_ma86d.h:42
double ma86realtype_d_
Definition: hsl_ma86d.h:24
int pool_size
Definition: hsl_ma86d.h:84
int num_nothresh
Definition: hsl_ma86d.h:81
long num_flops
Definition: hsl_ma86d.h:78
int unit_warning
Definition: hsl_ma86d.h:46
int diagnostics_level
Definition: hsl_ma86d.h:35
double ma86pkgtype_d_
Definition: hsl_ma86d.h:23
void ma86_finalise_d(void **keep, const struct ma86_control_d *control)
ma86realtype_d_ detlog
Definition: hsl_ma86d.h:71
int matrix_rank
Definition: hsl_ma86d.h:74
int num_perturbed
Definition: hsl_ma86d.h:82
void ma86_analyse_d(const int n, const int ptr[], const int row[], int order[], void **keep, const struct ma86_control_d *control, struct ma86_info_d *info)
int detsign
Definition: hsl_ma86d.h:72
int num_neg
Definition: hsl_ma86d.h:79
ma86realtype_d_ static_
Definition: hsl_ma86d.h:61
long num_factor
Definition: hsl_ma86d.h:77
ma86realtype_d_ usmall
Definition: hsl_ma86d.h:86
int num_nodes
Definition: hsl_ma86d.h:80