|
@@ -37,6 +37,8 @@
|
37
|
37
|
#include <Eigen/PaStiXSupport>
|
38
|
38
|
#endif
|
39
|
39
|
|
|
40
|
+#include <Eigen/PardisoSupport>
|
|
41
|
+
|
40
|
42
|
//#include "CSymSimplicialCholesky.h"
|
41
|
43
|
|
42
|
44
|
namespace Lemma {
|
|
@@ -437,6 +439,57 @@ namespace Lemma {
|
437
|
439
|
std::cout << " done in " << timer.end() / 60. << " [m]" << std::endl;
|
438
|
440
|
}
|
439
|
441
|
}
|
|
442
|
+
|
|
443
|
+// Pardiso
|
|
444
|
+ template<>
|
|
445
|
+ void EMSchur3D< Eigen::PardisoLU<Eigen::SparseMatrix<Complex, Eigen::ColMajor> > >::BuildCDirectSolver() {
|
|
446
|
+ CSolver = new Eigen::PardisoLU<Eigen::SparseMatrix<Complex, Eigen::ColMajor> > [Omegas.size()];
|
|
447
|
+ for (int iw=0; iw<Omegas.size(); ++iw) {
|
|
448
|
+ jsw_timer timer;
|
|
449
|
+ timer.begin();
|
|
450
|
+
|
|
451
|
+ //CSolver[iw].pardisoParameterArray()[2] = 28; // OMP_NUM_THREADS?
|
|
452
|
+
|
|
453
|
+ /* Complex system */
|
|
454
|
+ std::cout << "PardisoLU pattern analyzing C_" << iw << ",";
|
|
455
|
+ std::cout.flush();
|
|
456
|
+ CSolver[iw].analyzePattern( Cvec[iw].selfadjointView< Eigen::Lower>() );
|
|
457
|
+ std::cout << " done in " << timer.end() / 60. << " [m]" << std::endl;
|
|
458
|
+
|
|
459
|
+ // factorize
|
|
460
|
+ timer.begin();
|
|
461
|
+ std::cout << "PardisoLU factorising C_" << iw << ", ";
|
|
462
|
+ std::cout.flush();
|
|
463
|
+ CSolver[iw].factorize( Cvec[iw].selfadjointView< Eigen::Lower>() );
|
|
464
|
+ std::cout << " done in " << timer.end() / 60. << " [m]" << std::endl;
|
|
465
|
+ }
|
|
466
|
+ }
|
|
467
|
+
|
|
468
|
+ template<>
|
|
469
|
+ void EMSchur3D< Eigen::PardisoLDLT<Eigen::SparseMatrix<Complex, Eigen::ColMajor>, Eigen::Lower > >::BuildCDirectSolver() {
|
|
470
|
+ CSolver = new Eigen::PardisoLDLT<Eigen::SparseMatrix<Complex, Eigen::ColMajor>, Eigen::Lower > [Omegas.size()];
|
|
471
|
+ for (int iw=0; iw<Omegas.size(); ++iw) {
|
|
472
|
+ jsw_timer timer;
|
|
473
|
+ timer.begin();
|
|
474
|
+
|
|
475
|
+ //CSolver[iw].pardisoParameterArray()[2] = 28; // OMP_NUM_THREADS?
|
|
476
|
+
|
|
477
|
+ /* Complex system */
|
|
478
|
+ std::cout << "PardisoLDLT pattern analyzing C_" << iw << ",";
|
|
479
|
+ std::cout.flush();
|
|
480
|
+ //CSolver[iw].analyzePattern( Cvec[iw].selfadjointView< Eigen::Lower>() );
|
|
481
|
+ CSolver[iw].analyzePattern( Cvec[iw] );
|
|
482
|
+ std::cout << " done in " << timer.end() / 60. << " [m]" << std::endl;
|
|
483
|
+
|
|
484
|
+ // factorize
|
|
485
|
+ timer.begin();
|
|
486
|
+ std::cout << "PardisoLDLT factorising C_" << iw << ", ";
|
|
487
|
+ std::cout.flush();
|
|
488
|
+ //CSolver[iw].factorize( Cvec[iw].selfadjointView< Eigen::Lower>() );
|
|
489
|
+ CSolver[iw].factorize( Cvec[iw] );
|
|
490
|
+ std::cout << " done in " << timer.end() / 60. << " [m]" << std::endl;
|
|
491
|
+ }
|
|
492
|
+ }
|
440
|
493
|
|
441
|
494
|
#ifdef HAVE_UMFPACK
|
442
|
495
|
// Umfpack only seems to work when LOWER and UPPER are set to 1. Workarounds this have not been found.
|