umfpack_cbinding.c 889 Bytes
Newer Older
Rémy Mozul's avatar
Rémy Mozul committed
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

#include "stdio.h"

#include "umfpack_cbinding.h"


int c_symbolic(int nrow, int ncol, int * ap, int * ai, double * ax, void ** symbolic, double ** control, double * info)
{
  int i;
  umfpack_di_defaults(*control);
  return umfpack_di_symbolic (nrow, ncol, ap, ai, ax, symbolic, *control, info) ;
}

int c_numeric(int * ap, int * ai, double * ax, void ** symbolic, void ** numeric, double ** control, double * info)
{
  return umfpack_di_numeric(ap, ai, ax, *symbolic, numeric, *control, info) ;
}

int c_solve(int * ap, int * ai, double * ax, double ** x, double ** b, void ** numeric, double ** control, double * info)
{
  return umfpack_di_solve(UMFPACK_Aat, ap, ai, ax, *x, *b, *numeric, *control, info) ;
}

void c_free_symbolic(void ** symbolic)
{
  return umfpack_di_free_symbolic(symbolic);
}

void c_free_numeric(void ** numeric)
{
  return umfpack_di_free_numeric(numeric);
}