Ipopt Documentation  
 
Loading...
Searching...
No Matches
hsl_ma86d.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT (c) 2011 Science and Technology Facilities Council (STFC)
3 * Original date 25 Feburary 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_MA86 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_MA86 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_MA86D_H
41#define HSL_MA86D_H
42
43#ifndef ma86_default_control
44#define ma86_control ma86_control_d
45#define ma86_info ma86_info_d
46#define ma86_default_control ma86_default_control_d
47#define ma86_analyse ma86_analyse_d
48#define ma86_factor ma86_factor_d
49#define ma86_factor_solve ma86_factor_solve_d
50#define ma86_solve ma86_solve_d
51#define ma86_finalise ma86_finalise_d
52#endif
53
54typedef double ma86pkgtype_d_;
55typedef double ma86realtype_d_;
56
57/* Data type for user controls */
59 /* Note: 0 is false, non-zero is true */
60
61 /* C/Fortran interface related controls */
62 int f_arrays; /* Treat arrays as 1-based (Fortran) if true or 0-based (C) if
63 false. */
64
65 /* Printing controls */
66 int diagnostics_level; /* Controls diagnostic printing.*/
67 /* Possible values are:
68 < 0: no printing.
69 0: error and warning messages only.
70 1: as 0 plus basic diagnostic printing.
71 2: as 1 plus some more detailed diagnostic messages.
72 3: as 2 plus all entries of user-supplied arrays. */
73 int unit_diagnostics; /* unit for diagnostic messages
74 Printing is suppressed if unit_diagnostics < 0. */
75 int unit_error; /* unit for error messages
76 Printing is suppressed if unit_error < 0. */
77 int unit_warning; /* unit for warning messages
78 Printing is suppressed if unit_warning < 0. */
79
80 /* Controls used by ma86_analyse */
81 int nemin; /* Node amalgamation parameter. A child node is merged with its
82 parent if they both involve fewer than nemin eliminations.*/
83 int nb; /* Controls the size of the blocks used within each node (used to
84 set nb within node_type)*/
85
86 /* Controls used by ma86_factor and ma86_factor_solve */
87 int action; /* Keep going even if matrix is singular if true, or abort
88 if false */
89 int nbi; /* Inner block size for use with ma64*/
90 int pool_size; /* Size of task pool arrays*/
91 ma86realtype_d_ small_; /* Pivots less than small are treated as zero*/
92 ma86realtype_d_ static_;/* Control static pivoting*/
93 ma86realtype_d_ u; /* Pivot tolerance*/
94 ma86realtype_d_ umin; /* Minimum pivot tolerance*/
95 int scaling; /* Scaling algorithm to use */
96};
97
98/***************************************************/
99
100/* data type for returning information to user.*/
102 ma86realtype_d_ detlog; /* Holds logarithm of abs det A (or 0) */
103 int detsign; /* Holds sign of determinant (+/-1 or 0) */
104 int flag; /* Error return flag (0 on success) */
105 int matrix_rank; /* Rank of matrix */
106 int maxdepth; /* Maximum depth of the tree. */
107 int num_delay; /* Number of delayed pivots */
108 long num_factor; /* Number of entries in the factor. */
109 long num_flops; /* Number of flops for factor. */
110 int num_neg; /* Number of negative pivots */
111 int num_nodes; /* Number of nodes */
112 int num_nothresh; /* Number of pivots not satisfying u */
113 int num_perturbed; /* Number of perturbed pivots */
114 int num_two; /* Number of 2x2 pivots */
115 int pool_size; /* Maximum size of task pool used */
116 int stat; /* STAT value on error return -1. */
117 ma86realtype_d_ usmall; /* smallest threshold parameter used */
118};
119
120/* Initialise control with default values */
122/* Analyse the sparsity pattern and prepare for factorization */
123void ma86_analyse_d(const int n, const int ptr[], const int row[], int order[],
124 void **keep, const struct ma86_control_d *control,
125 struct ma86_info_d *info);
126/* To factorize the matrix */
127void ma86_factor_d(const int n, const int ptr[], const int row[],
128 const ma86pkgtype_d_ val[], const int order[], void **keep,
129 const struct ma86_control_d *control, struct ma86_info_d *info,
130 const ma86realtype_d_ scale[]);
131/* To factorize the matrix AND solve AX = B */
132void ma86_factor_solve_d(const int n, const int ptr[], const int row[],
133 const ma86pkgtype_d_ val[], const int order[], void **keep,
134 const struct ma86_control_d *control, struct ma86_info_d *info,
135 const int nrhs, const int ldx, ma86pkgtype_d_ x[],
136 const ma86realtype_d_ scale[]);
137/* To solve AX = B using the computed factors */
138void ma86_solve_d(const int job, const int nrhs, const int ldx,
139 ma86pkgtype_d_ *x, const int order[], void **keep,
140 const struct ma86_control_d *control, struct ma86_info_d *info,
141 const ma86realtype_d_ scale[]);
142/* To clean up memory in keep */
143void ma86_finalise_d(void **keep, const struct ma86_control_d *control);
144
145#endif
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[])
void ma86_finalise_d(void **keep, const struct ma86_control_d *control)
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)
double ma86realtype_d_
Definition hsl_ma86d.h:55
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[])
double ma86pkgtype_d_
Definition hsl_ma86d.h:54
void ma86_default_control_d(struct ma86_control_d *control)
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[])
int diagnostics_level
Definition hsl_ma86d.h:66
ma86realtype_d_ static_
Definition hsl_ma86d.h:92
ma86realtype_d_ u
Definition hsl_ma86d.h:93
int unit_diagnostics
Definition hsl_ma86d.h:73
ma86realtype_d_ small_
Definition hsl_ma86d.h:91
ma86realtype_d_ umin
Definition hsl_ma86d.h:94
long num_flops
Definition hsl_ma86d.h:109
ma86realtype_d_ usmall
Definition hsl_ma86d.h:117
int matrix_rank
Definition hsl_ma86d.h:105
int num_nothresh
Definition hsl_ma86d.h:112
int num_perturbed
Definition hsl_ma86d.h:113
long num_factor
Definition hsl_ma86d.h:108
ma86realtype_d_ detlog
Definition hsl_ma86d.h:102