umfpack_wrapper.c
6.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
#include "umfpack.h"
#include <ctype.h>
#include <stdio.h>
#ifdef NULL
#undef NULL
#endif
#define NULL 0
#define LEN 200
/* for umfpack 4.1 */
/* #define UF_long long */
/*
set of routines used by fvn_sparse
complex(8) and integer(8)
*/
/* defaults */
void umfpack_zl_defaults_ (double Control [UMFPACK_CONTROL])
{
umfpack_zl_defaults (Control) ;
}
/* free the Numeric object */
void umfpack_zl_free_numeric_(void **Numeric)
{
umfpack_zl_free_numeric (Numeric) ;
}
/* free th Symbolic object */
void umfpack_zl_free_symbolic_(void **Symbolic)
{
umfpack_zl_free_symbolic (Symbolic) ;
}
/* numeric factorization */
void umfpack_zl_numeric_ (UF_long Ap [ ], UF_long Ai [ ], double Ax [ ], double Az [ ],
void **Symbolic, void **Numeric,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_zl_numeric (Ap, Ai, Ax, Az, *Symbolic, Numeric, Control, Info);
}
/* pre-ordering and symbolic factorization */
void umfpack_zl_symbolic_ (UF_long *m, UF_long *n, UF_long Ap [ ], UF_long Ai [ ],
double Ax [ ], double Az [ ], void **Symbolic,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_zl_symbolic (*m, *n, Ap, Ai, Ax, Az, Symbolic, Control, Info) ;
}
/* solve a linear system */
void umfpack_zl_solve_ (UF_long *sys, UF_long Ap [ ], UF_long Ai [ ], double Ax [ ], double Az [ ],
double x [ ], double xz [ ], double b [ ], double bz [ ], void **Numeric,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_zl_solve (*sys, Ap, Ai, Ax, Az, x, xz, b, bz,
*Numeric, Control, Info) ;
}
/* triplet 2 col */
void umfpack_zl_triplet_to_col_ (UF_long *m, UF_long *n, UF_long *nz, UF_long Ti [ ], UF_long Tj [ ],
double Tx [ ], double Tz [ ], UF_long Ap [ ], UF_long Ai [ ],
double Ax [ ], double Az [ ], UF_long *status)
{
*status = umfpack_zl_triplet_to_col (*m, *n, *nz, Ti, Tj, Tx, Tz, Ap, Ai, Ax, Az, (UF_long *) NULL);
}
/* complex(8) and integer(4) */
/* defaults */
void umfpack_zi_defaults_ (double Control [UMFPACK_CONTROL])
{
umfpack_zi_defaults (Control) ;
}
/* free the Numeric object */
void umfpack_zi_free_numeric_(void **Numeric)
{
umfpack_zi_free_numeric (Numeric) ;
}
/* free the Symbolic object */
void umfpack_zi_free_symbolic_(void **Symbolic)
{
umfpack_zi_free_symbolic (Symbolic) ;
}
/* numeric factorization */
void umfpack_zi_numeric_ (int Ap [ ], int Ai [ ], double Ax [ ], double Az [ ],
void **Symbolic, void **Numeric,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_zi_numeric (Ap, Ai, Ax, Az, *Symbolic, Numeric, Control, Info);
}
/* pre-ordering and symbolic factorization */
void umfpack_zi_symbolic_ (int *m, int *n, int Ap [ ], int Ai [ ],
double Ax [ ], double Az [ ], void **Symbolic,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_zi_symbolic (*m, *n, Ap, Ai, Ax, Az, Symbolic, Control, Info) ;
}
/* solve a linear system */
void umfpack_zi_solve_ (int *sys, int Ap [ ], int Ai [ ], double Ax [ ], double Az [ ],
double x [ ], double xz [ ], double b [ ], double bz [ ], void **Numeric,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_zi_solve (*sys, Ap, Ai, Ax, Az, x, xz, b, bz,
*Numeric, Control, Info) ;
}
/* triplet 2 col */
void umfpack_zi_triplet_to_col_ (int *m, int *n, int *nz, int Ti [ ], int Tj [ ],
double Tx [ ], double Tz [ ], int Ap [ ], int Ai [ ],
double Ax [ ], double Az [ ], int *status)
{
*status = umfpack_zi_triplet_to_col (*m, *n, *nz, Ti, Tj, Tx, Tz, Ap, Ai, Ax, Az, (int *) NULL);
}
/* real(8) and integer(8) */
/* defaults */
void umfpack_dl_defaults_ (double Control [UMFPACK_CONTROL])
{
umfpack_dl_defaults (Control) ;
}
void umfpack_dl_free_numeric_ (void **Numeric)
{
umfpack_dl_free_numeric (Numeric) ;
}
void umfpack_dl_free_symbolic_ (void **Symbolic)
{
umfpack_dl_free_symbolic (Symbolic) ;
}
void umfpack_dl_numeric_ (UF_long Ap [ ], UF_long Ai [ ], double Ax [ ],
void **Symbolic, void **Numeric,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_dl_numeric (Ap, Ai, Ax, *Symbolic, Numeric, Control, Info);
}
void umfpack_dl_symbolic_ (UF_long *m, UF_long *n, UF_long Ap [ ], UF_long Ai [ ],
double Ax [ ], void **Symbolic,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_dl_symbolic (*m, *n, Ap, Ai, Ax, Symbolic, Control, Info) ;
}
void umfpack_dl_solve_ (UF_long *sys, UF_long Ap [ ], UF_long Ai [ ], double Ax [ ],
double x [ ], double b [ ], void **Numeric,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_dl_solve (*sys, Ap, Ai, Ax, x, b, *Numeric, Control, Info) ;
}
void umfpack_dl_triplet_to_col_ (UF_long *m, UF_long *n, UF_long *nz, UF_long Ti [ ], UF_long Tj [ ],
double T [ ], UF_long Ap [ ], UF_long Ai [ ],
double A [ ], UF_long *status)
{
*status = umfpack_dl_triplet_to_col (*m, *n, *nz, Ti, Tj, T, Ap, Ai, A, (UF_long *) NULL);
}
/* real(8) and integer(4) */
/* defaults */
void umfpack_di_defaults_ (double Control [UMFPACK_CONTROL])
{
umfpack_di_defaults (Control) ;
}
void umfpack_di_free_numeric_ (void **Numeric)
{
umfpack_di_free_numeric (Numeric) ;
}
void umfpack_di_free_symbolic_ (void **Symbolic)
{
umfpack_di_free_symbolic (Symbolic) ;
}
void umfpack_di_numeric_ (int Ap [ ], int Ai [ ], double Ax [ ],
void **Symbolic, void **Numeric,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_di_numeric (Ap, Ai, Ax, *Symbolic, Numeric, Control, Info);
}
void umfpack_di_symbolic_ (int *m, int *n, int Ap [ ], int Ai [ ],
double Ax [ ], void **Symbolic,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_di_symbolic (*m, *n, Ap, Ai, Ax, Symbolic, Control, Info) ;
}
void umfpack_di_solve_ (int *sys, int Ap [ ], int Ai [ ], double Ax [ ],
double x [ ], double b [ ], void **Numeric,
double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO])
{
(void) umfpack_di_solve (*sys, Ap, Ai, Ax, x, b, *Numeric, Control, Info) ;
}
void umfpack_di_triplet_to_col_ (int *m, int *n, int *nz, int Ti [ ], int Tj [ ],
double T [ ], int Ap [ ], int Ai [ ],
double A [ ], int *status)
{
*status = umfpack_di_triplet_to_col (*m, *n, *nz, Ti, Tj, T, Ap, Ai, A, (int *) NULL);
}