9 #ifndef __INTEL_COMPILER
11 std::cerr <<
"dgrmatrix::pardiso is only for intel c++ compiler (icpc)." << std::endl;
12 std::cerr <<
"Recompile your code with icpc to use pardiso." << std::endl;
17 #else //__INTEL_COMPILER is defined.
21 std::cerr <<
"These matrix and vector cannot be solved." << std::endl
22 <<
"Your input was (" <<
m <<
"x" <<
n <<
") and (" << b.
l <<
")." << std::endl;
29 _MKL_DSS_HANDLE_t pt[64];
32 PARDISOINIT(pt, &mtype, iparm);
43 MKL_INT MKL_INT_n =MKL_INT(
n);
44 double* a0 =
const_cast<double*
>(&
a[0]);
45 MKL_INT* ia0 =
const_cast<MKL_INT*
>(&
ia[0]);
46 MKL_INT* ja0 =
const_cast<MKL_INT*
>(&
ja[0]);
47 std::vector<MKL_INT> perm(
n);
52 PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &MKL_INT_n, a0, ia0, ja0, &perm[0], &nrhs, iparm, &msglvl, b.
array, x.
array, &error);
56 std::cerr <<
"Serious trouble happend. error = " << error <<
"." << std::endl;
62 PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &MKL_INT_n, a0, ia0, ja0, &perm[0], &nrhs, iparm, &msglvl, b.
array, x.
array, &error2);
65 #endif //__INTEL_COMPILER
std::vector< double > a
matrix component values
friend void swap(dgrmatrix &, dgrmatrix &)
std::vector< CPPL_INT > ia
rowIndex (NOT zero-based BUT one-based indexing)
CPPL_INT n
matrix column size
double * array
1D array to store vector data
CPPL_INT pardiso(dcovector &) const
Real Double-precision Column Vector Class.
CPPL_INT m
matrix row size
std::vector< CPPL_INT > ja
columns (NOT zero-based BUT one-based indexing)