Nek5000
SEM for Incompressible NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sparse_cholesky.h
Go to the documentation of this file.
1 #ifndef SPARSE_CHOLESKY_H
2 #define SPARSE_CHOLESKY_H
3 
4 #if !defined(TYPES_H) || !defined(MEM_H)
5 #warning "sparse_cholesky.h" requires "types.h" and "mem.h"
6 #endif
7 
8 #define sparse_cholesky_factor PREFIXED_NAME(sparse_cholesky_factor)
9 #define sparse_cholesky_solve PREFIXED_NAME(sparse_cholesky_solve )
10 #define sparse_cholesky_free PREFIXED_NAME(sparse_cholesky_free )
11 
12 struct sparse_cholesky {
13  uint n, *Lrp, *Lj;
14  double *L, *D;
15 };
16 
17 /* input data is the usual CSR
18  matrix is n by n
19  Arp has n+1 elements
20  elements of row i are A [Arp[i]], ..., A [Arp[i+1]-1]
21  in columns Aj[Arp[i]], ..., Aj[Arp[i+1]-1]
22 */
23 void sparse_cholesky_factor(uint n, const uint *Arp, const uint *Aj,
24  const double *A,
25  struct sparse_cholesky *out, buffer *buf);
26 
27 /* x = A^(-1) b; works when x and b alias */
29  double *x, const struct sparse_cholesky *fac, double *b);
30 
31 void sparse_cholesky_free(struct sparse_cholesky *fac);
32 
33 #endif
34 
#define uint
Definition: types.h:70
#define sparse_cholesky_factor
n
Definition: xxt_test.m:73
#define x
ulong A[NUM][SI]
Definition: sort_test.c:17
Definition: mem.h:111
const uint Aj[3][32]
Definition: xxt_test.c:85
#define sparse_cholesky_solve
ulong out[N]
Definition: sort_test2.c:20
#define sparse_cholesky_free