Amesos Package Browser (Single Doxygen Collection)
Development
src
SuiteSparse
KLU
Source
amesos_klu_l_defaults.c
Go to the documentation of this file.
1
/* ========================================================================== */
2
/* === KLU_defaults ========================================================= */
3
/* ========================================================================== */
4
5
/* Sets default parameters for KLU */
6
7
/* This file should make the long int version of KLU */
8
#define DLONG 1
9
10
#include "
amesos_klu_internal.h
"
11
12
Int
KLU_defaults
13
(
14
KLU_common
*
Common
15
)
16
{
17
if
(
Common
==
NULL
)
18
{
19
return
(
FALSE
) ;
20
}
21
22
/* parameters */
23
Common
->tol = 0.001 ;
/* pivot tolerance for diagonal */
24
Common
->memgrow = 1.2;
/* realloc size ratio increase for LU factors */
25
Common
->initmem_amd = 1.2 ;
/* init. mem with AMD: c*nnz(L) + n */
26
Common
->initmem = 10 ;
/* init. mem otherwise: c*nnz(A) + n */
27
Common
->btf =
TRUE
;
/* use BTF pre-ordering, or not */
28
Common
->maxwork = 0 ;
/* no limit to work done by btf_order */
29
Common
->ordering = 0 ;
/* 0: AMD, 1: COLAMD, 2: user-provided P and Q,
30
* 3: user-provided function */
31
Common
->scale = 2 ;
/* scale: -1: none, and do not check for errors
32
* in the input matrix in KLU_refactor.
33
* 0: none, but check for errors,
34
* 1: sum, 2: max */
35
Common
->halt_if_singular =
TRUE
;
/* quick halt if matrix is singular */
36
37
/* memory management routines */
38
Common
->malloc_memory = malloc ;
39
Common
->calloc_memory = calloc ;
40
Common
->free_memory = free ;
41
Common
->realloc_memory = realloc ;
42
43
/* user ordering function and optional argument */
44
Common
->user_order =
NULL
;
45
Common
->user_data =
NULL
;
46
47
/* statistics */
48
Common
->status =
KLU_OK
;
49
Common
->nrealloc = 0 ;
50
Common
->structural_rank =
EMPTY
;
51
Common
->numerical_rank =
EMPTY
;
52
Common
->noffdiag =
EMPTY
;
53
Common
->flops =
EMPTY
;
54
Common
->rcond =
EMPTY
;
55
Common
->condest =
EMPTY
;
56
Common
->rgrowth =
EMPTY
;
57
Common
->work = 0 ;
/* work done by btf_order */
58
59
Common
->memusage = 0 ;
60
Common
->mempeak = 0 ;
61
62
return
(
TRUE
) ;
63
}
Common
EMPTY
#define EMPTY
Definition:
amesos_amd_internal.h:144
Int
#define Int
Definition:
amesos_amd_internal.h:190
FALSE
#define FALSE
Definition:
amesos_amd_internal.h:141
amesos_klu_internal.h
KLU_defaults
Int KLU_defaults(KLU_common *Common)
Definition:
amesos_klu_l_defaults.c:13
NULL
#define NULL
Definition:
amesos_amd_internal.h:153
KLU_common
#define KLU_common
Definition:
amesos_klu_version.h:182
TRUE
#define TRUE
Definition:
amesos_amd_internal.h:140
KLU_OK
#define KLU_OK
Definition:
amesos_klu_decl.h:131
Generated by
1.8.14