TBCI Numerical high perf. C++ Library  2.8.0
superlu.h
Go to the documentation of this file.
1 
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)
15 
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 
40 inline
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 
58 inline
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
Our own complex class.
Definition: cplx.h:48
#define NAMESPACE_TBCI
Definition: basics.h:317
F_TMatrix< double > lu_solve(const F_Matrix< double > &A, const F_Matrix< double > &B, int overwriteA=0)
Definition: lapack.cpp:156
colperm_t
get column permutation vector perm_c[], according to permc_spec: permc_spec = NATURAL(0): use the nat...
Definition: superlu.h:20
unsigned long size() const
Definition: vector.h:104
exception class: Use MatErr from matrix.h
Definition: cscmatrix.h:49
Temporary Base Class Idiom: Class TVector is used for temporary variables.
Definition: bvector.h:52
#define NAMESPACE_END
Definition: basics.h:323
Definition: bvector.h:54
Definition: superlu.h:20