~logan/ubuntu/trusty/suitesparse/4.2.1-3ubuntu1

« back to all changes in this revision

Viewing changes to KLU/Source/klu_defaults.c

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-05-29 09:36:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529093629-zowquo0b7slkk6nc
Tags: 3.0.0-2
* suitesparse builds properly twice in a row
* Bug fix: "suitesparse - FTBFS: Broken build depens: libgfortran1-dev",
  thanks to Bastian Blank (Closes: #426349).
* Bug fix: "suitesparse_3.0.0-1: FTBFS: build-depends on
  libgfortran1-dev", thanks to Steve Langasek (Closes: #426354).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ========================================================================== */
2
 
/* === klu_defaults ========================================================= */
 
2
/* === KLU_defaults ========================================================= */
3
3
/* ========================================================================== */
4
4
 
5
5
/* Sets default parameters for KLU */
6
6
 
7
7
#include "klu_internal.h"
8
8
 
9
 
int klu_defaults
 
9
Int KLU_defaults
10
10
(
11
 
    klu_common *Common
 
11
    KLU_common *Common
12
12
)
13
13
{
14
14
    if (Common == NULL)
18
18
 
19
19
    /* parameters */
20
20
    Common->tol = 0.001 ;       /* pivot tolerance for diagonal */
21
 
    Common->growth = 1.2;       /* realloc growth size */
 
21
    Common->memgrow = 1.2;      /* realloc size ratio increase for LU factors */
22
22
    Common->initmem_amd = 1.2 ; /* init. mem with AMD:  c*nnz(L) + n */
23
23
    Common->initmem = 10 ;      /* init. mem otherwise: c*nnz(A) + n */
24
24
    Common->btf = TRUE ;        /* use BTF pre-ordering, or not */
 
25
    Common->maxwork = 0 ;       /* no limit to work done by btf_order */
25
26
    Common->ordering = 0 ;      /* 0: AMD, 1: COLAMD, 2: user-provided P and Q,
26
27
                                 * 3: user-provided function */
27
 
    Common->scale = -1 ;        /* scale: -1: none, and do not check for errors
28
 
                                 * in the input matrix in klu_refactor.
 
28
    Common->scale = 2 ;         /* scale: -1: none, and do not check for errors
 
29
                                 * in the input matrix in KLU_refactor.
29
30
                                 * 0: none, but check for errors,
30
31
                                 * 1: sum, 2: max */
31
 
    Common->halt_if_singular = TRUE ;
 
32
    Common->halt_if_singular = TRUE ;   /* quick halt if matrix is singular */
32
33
 
33
34
    /* memory management routines */
34
35
    Common->malloc_memory  = malloc ;
46
47
    Common->structural_rank = EMPTY ;
47
48
    Common->numerical_rank = EMPTY ;
48
49
    Common->noffdiag = EMPTY ;
 
50
    Common->flops = EMPTY ;
 
51
    Common->rcond = EMPTY ;
 
52
    Common->condest = EMPTY ;
 
53
    Common->rgrowth = EMPTY ;
 
54
    Common->work = 0 ;          /* work done by btf_order */
 
55
 
 
56
    Common->memusage = 0 ;
 
57
    Common->mempeak = 0 ;
49
58
 
50
59
    return (TRUE) ;
51
60
}