NEURON
sparse2.h
Go to the documentation of this file.
1 
2 /**************************************************************************
3 **
4 ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved.
5 **
6 ** Meschach Library
7 **
8 ** This Meschach Library is provided "as is" without any express
9 ** or implied warranty of any kind with respect to this software.
10 ** In particular the authors shall not be liable for any direct,
11 ** indirect, special, incidental or consequential damages arising
12 ** in any way from use of the software.
13 **
14 ** Everyone is granted permission to copy, modify and redistribute this
15 ** Meschach Library, provided:
16 ** 1. All copies contain this copyright notice.
17 ** 2. All modified copies shall carry a notice stating who
18 ** made the last modification and the date of such modification.
19 ** 3. No charge is made for this software or works derived from it.
20 ** This clause shall not be construed as constraining other software
21 ** distributed on the same medium as this software, nor is a
22 ** distribution fee considered a charge.
23 **
24 ***************************************************************************/
25 
26 
27 /* Sparse matrix factorise/solve header */
28 /* RCS id: sparse2.h,v 1.1 1997/11/03 16:15:56 hines Exp */
29 
30 
31 
32 #ifndef SPARSE2H
33 
34 #define SPARSE2H
35 
36 #include "sparse.h"
37 
38 
39 #ifdef ANSI_C
41 VEC *spCHsolve(SPMAT *,VEC *,VEC *);
42 
43 SPMAT *spLUfactor(SPMAT *,PERM *,double);
44 SPMAT *spILUfactor(SPMAT *,double);
45 VEC *spLUsolve(SPMAT *,PERM *,VEC *,VEC *),
46  *spLUTsolve(SPMAT *,PERM *,VEC *,VEC *);
47 
48 SPMAT *spBKPfactor(SPMAT *, PERM *, PERM *, double);
49 VEC *spBKPsolve(SPMAT *, PERM *, PERM *, VEC *, VEC *);
50 
51 VEC *pccg(VEC *(*A)(),void *A_par,VEC *(*M_inv)(),void *M_par,VEC *b,
52  double tol,VEC *x);
53 VEC *sp_pccg(SPMAT *,SPMAT *,VEC *,double,VEC *);
54 VEC *cgs(VEC *(*A)(),void *A_par,VEC *b,VEC *r0,double tol,VEC *x);
55 VEC *sp_cgs(SPMAT *,VEC *,VEC *,double,VEC *);
56 VEC *lsqr(VEC *(*A)(),VEC *(*AT)(),void *A_par,VEC *b,double tol,VEC *x);
57 VEC *sp_lsqr(SPMAT *,VEC *,double,VEC *);
58 int cg_set_maxiter(int);
59 
60 void lanczos(VEC *(*A)(),void *A_par,int m,VEC *x0,VEC *a,VEC *b,
61  Real *beta_m1,MAT *Q);
62 void sp_lanczos(SPMAT *,int,VEC *,VEC *,VEC *,Real *,MAT *);
63 VEC *lanczos2(VEC *(*A)(),void *A_par,int m,VEC *x0,VEC *evals,
64  VEC *err_est);
65 VEC *sp_lanczos2(SPMAT *,int,VEC *,VEC *,VEC *);
66 extern void scan_to(SPMAT *,IVEC *,IVEC *,IVEC *,int);
67 extern row_elt *chase_col(SPMAT *,int,int *,int *,int);
68 extern row_elt *chase_past(SPMAT *,int,int *,int *,int);
69 extern row_elt *bump_col(SPMAT *,int,int *,int *);
70 
71 #else
72 extern SPMAT *spCHfactor(), *spICHfactor(), *spCHsymb();
73 extern VEC *spCHsolve();
74 
75 extern SPMAT *spLUfactor();
76 extern SPMAT *spILUfactor();
77 extern VEC *spLUsolve(), *spLUTsolve();
78 
79 extern SPMAT *spBKPfactor();
80 extern VEC *spBKPsolve();
81 
82 extern VEC *pccg(), *sp_pccg(), *cgs(), *sp_cgs(), *lsqr(), *sp_lsqr();
83 extern int cg_set_maxiter();
84 
85 void lanczos(), sp_lanczos();
86 VEC *lanczos2(), *sp_lanczos2();
87 extern void scan_to();
88 extern row_elt *chase_col();
89 extern row_elt *chase_past();
90 extern row_elt *bump_col();
91 
92 #endif
93 
94 
95 #endif
VEC * spBKPsolve(SPMAT *, PERM *, PERM *, VEC *, VEC *)
Definition: spbkp.c:1253
VEC * cgs(VEC *(*A)(), void *A_par, VEC *b, VEC *r0, double tol, VEC *x)
Definition: conjgrad.c:179
void sp_lanczos(SPMAT *, int, VEC *, VEC *, VEC *, Real *, MAT *)
Definition: lanczos.c:307
#define Real
Definition: machine.h:189
row_elt * chase_col(SPMAT *, int, int *, int *, int)
Definition: spswap.c:134
VEC * sp_pccg(SPMAT *, SPMAT *, VEC *, double, VEC *)
Definition: conjgrad.c:160
int cg_set_maxiter(int)
Definition: conjgrad.c:74
VEC * spLUsolve(SPMAT *, PERM *, VEC *, VEC *)
Definition: sparse.h:44
Definition: matrix.h:67
VEC * sp_cgs(SPMAT *, VEC *, VEC *, double, VEC *)
Definition: conjgrad.c:250
Definition: sparse.h:54
SPMAT * spILUfactor(SPMAT *, double)
Definition: splufctr.c:302
SPMAT * spCHsymb(SPMAT *)
Definition: spchfctr.c:445
row_elt * chase_past(SPMAT *, int, int *, int *, int)
Definition: spswap.c:210
VEC * sp_lsqr(SPMAT *, VEC *, double, VEC *)
Definition: conjgrad.c:345
SPMAT * spBKPfactor(SPMAT *, PERM *, PERM *, double)
Definition: spbkp.c:562
VEC * pccg(VEC *(*A)(), void *A_par, VEC *(*M_inv)(), void *M_par, VEC *b, double tol, VEC *x)
Definition: conjgrad.c:90
VEC * lanczos2(VEC *(*A)(), void *A_par, int m, VEC *x0, VEC *evals, VEC *err_est)
Definition: lanczos.c:214
SPMAT * spLUfactor(SPMAT *, PERM *, double)
Definition: splufctr.c:49
Definition: matrix.h:92
VEC * sp_lanczos2(SPMAT *, int, VEC *, VEC *, VEC *)
Definition: lanczos.c:317
#define A(i)
Definition: multisplit.cpp:61
void scan_to(SPMAT *, IVEC *, IVEC *, IVEC *, int)
Definition: spswap.c:45
SPMAT * spICHfactor(SPMAT *)
VEC * spLUTsolve(SPMAT *, PERM *, VEC *, VEC *)
Definition: splufctr.c:219
VEC * lsqr(VEC *(*A)(), VEC *(*AT)(), void *A_par, VEC *b, double tol, VEC *x)
Definition: conjgrad.c:266
Definition: matrix.h:87
SPMAT * spCHfactor(SPMAT *)
Definition: matrix.h:73
void lanczos(VEC *(*A)(), void *A_par, int m, VEC *x0, VEC *a, VEC *b, Real *beta_m1, MAT *Q)
Definition: lanczos.c:50
row_elt * bump_col(SPMAT *, int, int *, int *)
Definition: spswap.c:258
VEC * spCHsolve(SPMAT *, VEC *, VEC *)
Definition: spchfctr.c:311