00001
00008 #ifndef TBCI_SOLVER_SUPERLU_STDCPLX_H
00009 #define TBCI_SOLVER_SUPERLU_STDCPLX_H
00010
00011 #include "../vector.h"
00012 #include "../cscmatrix.h"
00013 #include "../std_cplx.h"
00014
00015 #ifndef COLPERM_T_DECLARED
00016
00021 typedef enum {NATURAL, MMD_ATA, MMD_AT_PLUS_A, COLAMD, MY_PERMC} colperm_t;
00022 #define COLPERM_T_DECLARED
00023 #endif
00024
00025 NAMESPACE_TBCI
00026
00028 int lu_solve (CSCMatrix< CPLX__ complex<double> >& M,
00029 Vector< CPLX__ complex<double> >& x,
00030 const Vector< CPLX__ complex<double> >& rhs,
00031 colperm_t permc_spec = NATURAL,
00032 bool verbose = false, bool symm = false);
00033
00034 inline
00035 TVector< CPLX__ complex<double> > lu_solve(CSCMatrix< CPLX__ complex<double> >& M,
00036 const Vector< CPLX__ complex<double> >& rhs,
00037 colperm_t permc_spec = NATURAL,
00038 bool verbose = false, bool symm = false)
00039 {
00040 TVector< CPLX__ complex<double> > x(rhs.size());
00041 const int info = lu_solve(M, (Vector< CPLX__ complex<double> >&)x,
00042 rhs, permc_spec, verbose, symm);
00043 return x;
00044 }
00045
00046 NAMESPACE_END
00047
00048 #endif