QR_MUMPS
 All Classes Files Functions Variables Enumerations Enumerator Pages
qrm_colamd_wrap.c
Go to the documentation of this file.
1 /* ##############################################################################################
2 **
3 ** Copyright 2012 CNRS, INPT
4 **
5 ** This file is part of qr_mumps.
6 **
7 ** qr_mumps is free software: you can redistribute it and/or modify
8 ** it under the terms of the GNU Lesser General Public License as
9 ** published by the Free Software Foundation, either version 3 of
10 ** the License, or (at your option) any later version.
11 **
12 ** qr_mumps is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU Lesser General Public License for more details.
16 **
17 ** You can find a copy of the GNU Lesser General Public License
18 ** in the qr_mumps/doc directory.
19 **
20 ** ##############################################################################################*/
21 
22 
23 /*##############################################################################################*/
33 /*##############################################################################################*/
34 
35 
36 #if defined(have_colamd)
37 #include "colamd.h"
38 #endif
39 #include <stdio.h>
40 
41 void qrm_colamd(int n_row, int n_col, int Alen, int *A, int *p, int *err){
42 #if defined(have_colamd)
43  int stats [COLAMD_STATS] ;
44  double knobs [COLAMD_KNOBS] ;
45 
46 
47  colamd_set_defaults (knobs) ;
48 
49  knobs[0]=-1;
50  knobs[1]=10;
51  knobs[2]=1;
52 
53  *err = colamd (n_row, n_col, Alen, A, p,
54  knobs, stats) ;
55  if(!*err)
56  printf("Error in COLAMD! %d\n",stats[3]);
57 
58  return;
59 #endif
60 }
61 
62 
63 void qrm_colamd_recommended(int *alen, int nnz, int n_row, int n_col){
64 
65 #if defined(have_colamd)
66  *alen = colamd_recommended(nnz, n_row, n_col);
67  if(!alen)
68  printf("Error in COLAMD_RECOMMENDED!\n");
69 #endif
70 }
71 
72 
73 
74 
75 
void qrm_colamd(int n_row, int n_col, int Alen, int *A, int *p, int *err)
void qrm_colamd_recommended(int *alen, int nnz, int n_row, int n_col)