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