TBCI Numerical high perf. C++ Library 2.8.0
superlu.h
Go to the documentation of this file.
1
7
8#ifndef TBCI_SOLVER_SUPERLU_H
9#define TBCI_SOLVER_SUPERLU_H
10
11#include "tbci/vector.h"
12#include "tbci/cscmatrix.h"
13
14#if !defined(COLPERM_T_DECLARED) //and !defined(__SUPERLU_UTIL)
21#define COLPERM_T_DECLARED
22#endif
23
25
36 const Vector<double>& rhs,
37 colperm_t permc_spec = NATURAL,
38 bool verbose = false, bool symm = false);
39
40inline
42 const Vector<double>& rhs,
43 colperm_t permc_spec = NATURAL,
44 bool verbose = false, bool symm = false)
45{
46 TVector<double> x(rhs.size());
47 const int info = lu_solve(M, (Vector<double>&)x, rhs, permc_spec, verbose, symm);
48 return x;
49}
50
51#ifdef TBCI_CPLX_H
54 const Vector< cplx<double> >& rhs,
55 colperm_t permc_spec = NATURAL,
56 bool verbose = false, bool symm = false);
57
58inline
60 const Vector< cplx<double> >& rhs,
61 colperm_t permc_spec = NATURAL,
62 bool verbose = false, bool symm = false)
63{
64 TVector< cplx<double> > x(rhs.size());
65 const int info = lu_solve(M, (Vector< cplx<double> >&)x,
66 rhs, permc_spec, verbose, symm);
67 return x;
68}
69
70#endif
72
73#endif /* TBCI_SOLVER_SUPERLU_H */
const Vector< T > const Vector< T > & x
Definition LM_fit.h:97
#define NAMESPACE_END
Definition basics.h:323
#define NAMESPACE_TBCI
Definition basics.h:317
exception class: Use MatErr from matrix.h
Definition cscmatrix.h:66
Temporary Base Class Idiom: Class TVector is used for temporary variables.
Definition vector.h:73
unsigned long size() const
Definition vector.h:104
Our own complex class.
Definition cplx.h:56
colperm_t
get column permutation vector perm_c[], according to permc_spec: permc_spec = NATURAL(0): use the nat...
Definition superlu.h:20
@ MMD_ATA
Definition superlu.h:20
@ NATURAL
Definition superlu.h:20
@ MY_PERMC
Definition superlu.h:20
@ MMD_AT_PLUS_A
Definition superlu.h:20
@ COLAMD
Definition superlu.h:20
NAMESPACE_TBCI int lu_solve(CSCMatrix< double > &M, Vector< double > &x, const Vector< double > &rhs, colperm_t permc_spec=NATURAL, bool verbose=false, bool symm=false)
Definition superlu_d.cpp:29