umfpack_wrapper.c
3.6 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
#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);
}