ParGeMSLR
parallel_gemslr.hpp
Go to the documentation of this file.
1 #ifndef PARGEMSLR_PARALLEL_GEMSLR_H
2 #define PARGEMSLR_PARALLEL_GEMSLR_H
3 
8 #include <iostream>
9 
10 #include "../utils/utils.hpp"
11 #include "../utils/structs.hpp"
12 #include "../vectors/int_vector.hpp"
13 #include "../vectors/sequential_vector.hpp"
14 #include "../vectors/parallel_vector.hpp"
15 #include "../matrices/csr_matrix.hpp"
16 #include "../solvers/solver.hpp"
17 #include "gemslr.hpp"
18 
19 #ifdef PARGEMSLR_CUDA
20 #include "cusparse.h"
21 #endif
22 
23 namespace pargemslr
24 {
25 
26  template <class MatrixType, class VectorType, typename DataType> class ParallelGemslrClass;
27 
33  template <class MatrixType, class VectorType, typename DataType>
35  {
36  private:
37 
38  /* variables */
39 
44  int _level;
45 
50  int _option;
51 
58 
59  public:
60 
65  VectorType _temp_v;
66 
72 
78 
84 
90 
96 
102 
111  int Setup(int level, int option, ParallelGemslrClass<MatrixType, VectorType, DataType> &gemslr);
112 
119  int SetupVectorPtrStr(VectorType &v);
120 
126  int Clear();
127 
133  int GetNumRowsLocal();
134 
140  int GetNumColsLocal();
141 
152  int MatVec( char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
153 
162  int GetMpiInfo(int &np, int &myid, MPI_Comm &comm) const
163  {
164  this->_gemslr->GetMatrix()->GetMpiInfo(np, myid, comm);
165  return PARGEMSLR_SUCCESS;
166  }
167 
173  MPI_Comm GetComm() const
174  {
175  return this->_gemslr->GetMatrix()->GetComm();
176  }
177 
183  int GetDataLocation() const
184  {
185  if(this->_gemslr)
186  {
187  return this->_gemslr->GetMatrix()->GetDataLocation();
188  }
189  return kMemoryHost;
190  }
191 
192  };
193 
194  typedef ParallelGemslrEBFCMatrixClass<ParallelCsrMatrixClass<float>, ParallelVectorClass<float>, float> precond_gemslrebfc_csr_par_float;
195  typedef ParallelGemslrEBFCMatrixClass<ParallelCsrMatrixClass<double>, ParallelVectorClass<double>, double> precond_gemslrebfc_csr_par_double;
196  typedef ParallelGemslrEBFCMatrixClass<ParallelCsrMatrixClass<complexs>, ParallelVectorClass<complexs>, complexs> precond_gemslrebfc_csr_par_complexs;
197  typedef ParallelGemslrEBFCMatrixClass<ParallelCsrMatrixClass<complexd>, ParallelVectorClass<complexd>, complexd> precond_gemslrebfc_csr_par_complexd;
198 
203  template <class MatrixType, class VectorType, typename DataType>
205  {
206  private:
207 
208  /* variables */
209 
214  int _level;
215 
220  int _option;
221 
227 
228  public:
229 
234  VectorType _temp_v;
235 
241 
247 
253 
259 
265 
271 
280  int Setup(int level, int option, ParallelGemslrClass<MatrixType, VectorType, DataType> &gemslr);
281 
288  int SetupVectorPtrStr(VectorType &v);
289 
295  int Clear();
296 
307  int MatVec( char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
308 
316  int Solve( VectorType &x, VectorType &rhs);
317 
326  int GetMpiInfo(int &np, int &myid, MPI_Comm &comm) const
327  {
328  this->_gemslr->GetMatrix()->GetMpiInfo(np, myid, comm);
329  return PARGEMSLR_SUCCESS;
330  }
331 
337  MPI_Comm GetComm() const
338  {
339  return this->_gemslr->GetMatrix()->GetComm();
340  }
341 
342  };
343 
344  typedef ParallelGemslrSchurMatrixClass<ParallelCsrMatrixClass<float>, ParallelVectorClass<float>, float> precond_gemslr_schur_par_float;
345  typedef ParallelGemslrSchurMatrixClass<ParallelCsrMatrixClass<double>, ParallelVectorClass<double>, double> precond_gemslr_schur_par_double;
346  typedef ParallelGemslrSchurMatrixClass<ParallelCsrMatrixClass<complexs>, ParallelVectorClass<complexs>, complexs> precond_gemslr_schur_par_complexs;
347  typedef ParallelGemslrSchurMatrixClass<ParallelCsrMatrixClass<complexd>, ParallelVectorClass<complexd>, complexd> precond_gemslr_schur_par_complexd;
348 
353  template <class MatrixType, class VectorType, typename DataType>
354  class ParallelGemslrSchurSolveClass: public SolverClass<MatrixType, VectorType, DataType>
355  {
356  public:
357 
362  ParallelGemslrSchurSolveClass() : SolverClass<MatrixType, VectorType, DataType>(){}
363 
369  virtual int Clear(){SolverClass<MatrixType, VectorType, DataType>::Clear();return PARGEMSLR_SUCCESS;}
370 
376  {
377  this->Clear();
378  }
379 
384  ParallelGemslrSchurSolveClass(ParallelGemslrSchurSolveClass<MatrixType, VectorType, DataType> &&precond) : SolverClass<MatrixType, VectorType, DataType>(std::move(precond))
385  {
386  this->Clear();
387  }
388 
394  {
395  this->Clear();
397  return *this;
398  }
399 
405  {
406  this->Clear();
408  return *this;
409  }
410 
416 
424  virtual int Setup( VectorType &x, VectorType &rhs)
425  {
426  if(this->_ready)
427  {
428  return PARGEMSLR_SUCCESS;
429  }
430 
431  if(!this->_matrix)
432  {
433  PARGEMSLR_ERROR("Setup without matrix.");
434  return PARGEMSLR_ERROR_INVALED_PARAM;
435  }
436 
437  this->_ready = true;
438 
439  return PARGEMSLR_SUCCESS;
440 
441  }
442 
450  virtual int Solve( VectorType &x, VectorType &rhs)
451  {
452 
453  if(!(this->_ready))
454  {
455  PARGEMSLR_ERROR("Solve without setup.");
456  return PARGEMSLR_ERROR_FUNCTION_CALL_ERR;
457  }
458 
459  this->_matrix->Solve(x, rhs);
460 
461  return PARGEMSLR_SUCCESS;
462 
463  }
464 
470  virtual long int GetNumNonzeros(){return 0;};
471 
478  virtual int SetSolveLocation( const int &location){return PARGEMSLR_SUCCESS;};
479 
486  virtual int MoveData( const int &location){return PARGEMSLR_SUCCESS;};
487 
488  /* ------- SETS and GETS ------- */
489 
496  virtual int SetWithParameterArray(double *params)
497  {
498  this->_print_option = params[PARGEMSLR_IO_GENERAL_PRINT_LEVEL];
499  return PARGEMSLR_SUCCESS;
500  }
501 
502  };
503 
504  typedef ParallelGemslrSchurMatrixClass<precond_gemslr_schur_par_float, ParallelVectorClass<float>, float> precond_gemslr_schursolve_par_float;
505  typedef ParallelGemslrSchurMatrixClass<precond_gemslr_schur_par_double, ParallelVectorClass<double>, double> precond_gemslr_schursolve_par_double;
506  typedef ParallelGemslrSchurMatrixClass<precond_gemslr_schur_par_complexs, ParallelVectorClass<complexs>, complexs> precond_gemslr_schursolve_par_complexs;
507  typedef ParallelGemslrSchurMatrixClass<precond_gemslr_schur_par_complexd, ParallelVectorClass<complexd>, complexd> precond_gemslr_schursolve_par_complexd;
508 
514  template <class MatrixType, class VectorType, typename DataType>
516  {
517  public:
518 
524 
525  /* Variables */
526 
531  int _lrc;
532 
537  int _ncomps;
538 
543  std::vector<CsrMatrixClass<DataType> > _B_mat_v;
544 
549  MatrixType _E_mat;
550 
555  MatrixType _F_mat;
556 
561  MatrixType _A_mat;
562 
567  MatrixType _C_mat;
568 
573  MatrixType _S_mat;
574 
579  int _nI;
580 
586 
592 
598 
604 
610 
616 
622 
628 
634 
640 
647 
653 
659 
665 
666 #ifdef PARGEMSLR_DEBUG
667 
671  IntVectorClass<int> _work_vector_occupied;
672 
673 #endif
674 
679  VectorType _x_temp;
680 
685  VectorType _xlr_temp;
686 
691  VectorType _xlr1_temp;
692 
697  VectorType _xlr2_temp;
698 
703  VectorType _xlr1_temp_h;
704 
709  VectorType _xlr2_temp_h;
710 
715  VectorType _sol_temp;
716 
721  VectorType _rhs_temp;
722 
727  VectorType _sol2_temp;
728 
733  VectorType _rhs2_temp;
734 
739  VectorType _sol3_temp;
740 
745  VectorType _rhs3_temp;
746 
752  int Clear();
753 
759 
765 
771 
777 
783 
789 
798  int GetNumNonzeros(long int &nnz_bsolver, long int &nnz_lr);
799 
800  };
801 
806 
812  template <class MatrixType, class VectorType, typename DataType>
813  class ParallelGemslrClass: public SolverClass<MatrixType, VectorType, DataType>
814  {
815  private:
816 
821  int _n;
822 
827  GemslrSetupStruct<DataType> _gemslr_setups;
828 
834 
840  VectorType, DataType> _inner_iters_precond;
841 
847  VectorType, DataType> _inner_iters_solver;
848 
854  int _nlev_max;
855 
860  int _nlev_used;
861 
866  IntVectorClass<int> _lev_ptr_v;
867 
872  std::vector<IntVectorClass<int> > _dom_ptr_v2;
873 
879 
886 
891  int _location;
892 
898  template <typename RealDataType>
899  int OrdLowRank(int m, int &rank, RealDataType (*weight)(ComplexValueClass<RealDataType>), DenseMatrixClass<RealDataType> &R, DenseMatrixClass<RealDataType> &Q);
900 
906  template <typename RealDataType>
908 
917  int SetupLowRankThickRestartNoLock( ParallelVectorClass<DataType> &x, ParallelVectorClass<DataType> &rhs, int level, int option);
918 
925  template <typename T1, typename T2>
926  static T1 ComputeDistance(T2 val);
927 
934  template <typename T1, typename T2>
935  static T1 ComputeDistanceSC(T2 val);
936 
942  int PrintInfo();
943 
944  public:
945 
946  /* experimental algorithms */
947 
953 
958  int SetupPartialILUT( VectorType &x, VectorType &rhs);
959 
960  /* end of experiment part */
961 
968  std::vector< ParallelGemslrLevelClass< MatrixType, VectorType, DataType> > _levs_v;
969 
975 
981 
987  virtual int Clear();
988 
993  virtual ~ParallelGemslrClass();
994 
1000 
1006 
1012 
1018 
1023  int CheckParameters();
1024 
1032  virtual int Setup( VectorType &x, VectorType &rhs);
1033 
1039  int SetupPermutation();
1040 
1049  int SetupPermutationRKway(MatrixType &A, int nlev_setup, int &nlev_max, int &nlev_used, vector_int &map_v, vector_int &mapptr_v);
1050 
1056  int SetupPermutationND(MatrixType &A, int nlev_setup, int &nlev_max, int &nlev_used, vector_int &map_v, vector_int &mapptr_v);
1057 
1063  int SetupPermutationBuildLevelStructure( MatrixType &A, int level_start, vector_int &map_v, vector_int &mapptr_v);
1064 
1072  int SetupBSolve( VectorType &x, VectorType &rhs);
1073 
1082  int SetupBSolveILUT( VectorType &x, VectorType &rhs, int level);
1083 
1092  int SetupBSolveILUK( VectorType &x, VectorType &rhs, int level);
1093 
1102  int SetupBSolveGemslr( VectorType &x, VectorType &rhs, int level);
1103 
1111  int SetupLowRank( VectorType &x, VectorType &rhs);
1112 
1122  int SetupLowRankSubspaceIteration( VectorType &x, VectorType &rhs, int level, int option);
1123 
1133  int SetupLowRankNoRestart( VectorType &x, VectorType &rhs, int level, int option);
1134 
1144  int SetupLowRankThickRestart( VectorType &x, VectorType &rhs, int level, int option);
1145 
1161  int SetupLowRankBuildLowRank( VectorType &x, VectorType &rhs, DenseMatrixClass<DataType> &V, DenseMatrixClass<DataType> &H, int m, int rank, int level, int option);
1162 
1170  virtual int Solve( VectorType &x, VectorType &rhs);
1171 
1181  int SolveLevelGemslr( VectorType &x_out, VectorType &rhs_in, int level, bool doperm);
1182 
1192  int SolveLevelGemslrU( VectorType &x_out, VectorType &rhs_in, int level, bool doperm);
1193 
1203  int SolveLevelGemslrMul( VectorType &x_out, VectorType &rhs_in, int level, bool doperm);
1204 
1214  int SolveLevelEsmslr( VectorType &x_out, VectorType &rhs_in, int level, bool doperm);
1215 
1225  int SolveLevelEsmslrU( VectorType &x_out, VectorType &rhs_in, int level, bool doperm);
1226 
1236  int SolveLevelEsmslrMul( VectorType &x_out, VectorType &rhs_in, int level, bool doperm);
1237 
1247  int SolveLevelPslr( VectorType &x_out, VectorType &rhs_in, int level, bool doperm);
1248 
1258  int SolveB( VectorType &x, VectorType &rhs, int option, int level);
1259 
1268  int SolveApplyLowRankLevel( VectorType &x, VectorType &rhs, int level);
1269 
1275  int GetNumRows(int level);
1276 
1288  int EBFCMatVec( int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
1289 
1290 
1302  int RAPEBFCMatVec( int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
1303 
1314  int SCMatVec( int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
1315 
1327  int ACMatVec( int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
1328 
1339  int PCLRMatVec( int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
1340 
1353  int SchurMatVec( int level, int option, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
1354 
1367  int RAPMatVec( int level, int option, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
1368 
1381  int CMatVec( int level, int option, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
1382 
1395  int BMatVec( int level, int option, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y);
1396 
1402  int GetSize();
1403 
1409  virtual long int GetNumNonzeros();
1410 
1416  long int GetNumNonzeros(long int &nnz_bsolver, long int &nnz_lr);
1417 
1424  int PlotPatternGnuPlot( const char *datafilename);
1425 
1426  /* Sets and gets */
1427 
1435  {
1436 
1437  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslr_SetLocalGemslr."));
1438 
1439  /* general setup */
1440 
1441  /* mute the sub-gemslr print */
1442  gemslr.SetPrintOption(0);
1443 
1444  /* gemslr_setup */
1445 
1446  gemslr.SetPartitionOption(this->_gemslr_setups._partition_option_B_setup);
1447  gemslr.SetPermutationOption(this->_gemslr_setups._perm_option_B_setup);
1448  gemslr.SetNumLevels(this->_gemslr_setups._nlev_B_setup);
1449  gemslr.SetNumSubdomains(this->_gemslr_setups._ncomp_B_setup);
1450  gemslr.SetMinimalNumberSubdomains(this->_gemslr_setups._kmin_B_setup);
1451  gemslr.SetNumberSubdomainsReduceFactor(this->_gemslr_setups._kfactor_B_setup);
1452  gemslr.SetSeperatorOption(this->_gemslr_setups._vertexsep_B_setup);
1453 
1454  /* turn off local inner iteration for now. Arnoldi reauires fix operation */
1455  gemslr.SetInnerIterationOption(false);
1456  gemslr.SetSolveOption(kGemslrLUSolve);
1457 
1458  /* level_setup */
1459 
1460  gemslr.SetLowRankOptionTopLevel(this->_gemslr_setups._level_setups._lr_option1_B_setup);
1461  gemslr.SetLowRankOptionOtherLevels(this->_gemslr_setups._level_setups._lr_option2_B_setup);
1462  gemslr.SetLowRankRandomInitGuess(this->_gemslr_setups._level_setups._lr_rand_init_B_setup);
1463  gemslr.SetLowRankFactorTopLevel(this->_gemslr_setups._level_setups._lr_rank_factor1_B_setup);
1464  gemslr.SetLowRankFactorOtherLevels(this->_gemslr_setups._level_setups._lr_rank_factor2_B_setup);
1465  gemslr.SetLowRankRanksTopLevel(this->_gemslr_setups._level_setups._lr_rank1_B_setup);
1466  gemslr.SetLowRankRanksOtherLevels(this->_gemslr_setups._level_setups._lr_rank2_B_setup);
1467  gemslr.SetLowRankArnoldiFactorTopLevel(this->_gemslr_setups._level_setups._lr_arnoldi_factor1_B_setup);
1468  gemslr.SetLowRankArnoldiFactorOtherLevels(this->_gemslr_setups._level_setups._lr_arnoldi_factor2_B_setup);
1469  gemslr.SetLowRankMaxNumberIterationsTopLevel(this->_gemslr_setups._level_setups._lr_maxits1_B_setup);
1470  gemslr.SetLowRankMaxNumberIterationsOtherLevels(this->_gemslr_setups._level_setups._lr_maxits2_B_setup);
1471  gemslr.SetLowRankThresholdTopLevel(this->_gemslr_setups._level_setups._lr_tol_eig1_B_setup);
1472  gemslr.SetLowRankThresholdOtherLevels(this->_gemslr_setups._level_setups._lr_tol_eig2_B_setup);
1473 
1474  /* currently the inner solve is ILUT only */
1475  gemslr.SetPreconditionerOptionB(kGemslrBSolveILUT);
1476  gemslr.SetPreconditionerOptionC(kGemslrCSolveILUT);
1477 
1478  /* set ilu options */
1479  gemslr.SetIluResidualIters(this->_gemslr_setups._level_setups._ilu_residual_iters);
1480  gemslr.SetIluComplexShift(this->_gemslr_setups._level_setups._ilu_complex_shift);
1481  gemslr.SetIluDropTolB(this->_gemslr_setups._level_setups._B_ilu_tol_B_setup);
1482  gemslr.SetIluDropTolC(this->_gemslr_setups._level_setups._C_ilu_tol_B_setup);
1483  gemslr.SetIluMaxRowNnzB(this->_gemslr_setups._level_setups._B_ilu_max_row_nnz_B_setup);
1484  gemslr.SetIluMaxRowNnzC(this->_gemslr_setups._level_setups._C_ilu_max_row_nnz_B_setup);
1485  gemslr.SetIluFillLevelB(this->_gemslr_setups._level_setups._B_ilu_fill_level_B_setup);
1486  gemslr.SetIluFillLevelC(this->_gemslr_setups._level_setups._C_ilu_fill_level_B_setup);
1487  gemslr.SetPolyOrder(this->_gemslr_setups._level_setups._B_poly_order_B);
1488 
1489  return PARGEMSLR_SUCCESS;
1490  }
1491 
1499  {
1500 
1501  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslr_SetLowerGemslr."));
1502 
1503  /* general setup */
1504 
1505  /* mute the sub-gemslr print */
1506  gemslr.SetPrintOption(0);
1507 
1508  /* gemslr_setup */
1509  gemslr.SetPartitionOption(this->_gemslr_setups._partition_option_setup);
1510  gemslr.SetBPartitionOption(this->_gemslr_setups._partition_option_B_setup);
1511  gemslr.SetPermutationOption(this->_gemslr_setups._perm_option_setup);
1512  gemslr.SetBPermutationOption(this->_gemslr_setups._perm_option_B_setup);
1513  gemslr.SetNumLevels(this->_gemslr_setups._nlev_setup);
1514  gemslr.SetBNumLevels(this->_gemslr_setups._nlev_B_setup);
1515  gemslr.SetNumSubdomains(this->_gemslr_setups._ncomp_setup);
1516  gemslr.SetBNumSubdomains(this->_gemslr_setups._ncomp_B_setup);
1517  gemslr.SetMinimalNumberSubdomains(this->_gemslr_setups._kmin_setup);
1518  gemslr.SetBMinimalNumberSubdomains(this->_gemslr_setups._kmin_B_setup);
1519  gemslr.SetNumberSubdomainsReduceFactor(this->_gemslr_setups._kfactor_setup);
1520  gemslr.SetBNumberSubdomainsReduceFactor(this->_gemslr_setups._kfactor_B_setup);
1521  gemslr.SetSeperatorOption(this->_gemslr_setups._vertexsep_setup);
1522  gemslr.SetBSeperatorOption(this->_gemslr_setups._vertexsep_B_setup);
1523 
1524  /* turn off local inner iteration for now. Arnoldi reauires fix operation */
1525  gemslr.SetInnerIterationOption(false);
1526  gemslr.SetSolveOption(this->_gemslr_setups._solve_option_setup);
1527 
1528  /* turn on global partition */
1529  gemslr.SetGlobalPartitionOption(true);
1530 
1531  /* level_setup */
1532  /* the low-rank setups was changed, since the top level is the IO level */
1533  gemslr.SetLowRankOptionTopLevel(this->_gemslr_setups._level_setups._lr_option2_setup);
1534  gemslr.SetBLowRankOptionTopLevel(this->_gemslr_setups._level_setups._lr_option1_B_setup);
1535  gemslr.SetLowRankOptionOtherLevels(this->_gemslr_setups._level_setups._lr_option2_setup);
1536  gemslr.SetBLowRankOptionOtherLevels(this->_gemslr_setups._level_setups._lr_option2_B_setup);
1537  gemslr.SetLowRankRandomInitGuess(this->_gemslr_setups._level_setups._lr_rand_init_setup);
1538  gemslr.SetBLowRankRandomInitGuess(this->_gemslr_setups._level_setups._lr_rand_init_B_setup);
1539  gemslr.SetLowRankFactorTopLevel(this->_gemslr_setups._level_setups._lr_rank_factor2_setup);
1540  gemslr.SetBLowRankFactorTopLevel(this->_gemslr_setups._level_setups._lr_rank_factor1_B_setup);
1541  gemslr.SetLowRankFactorOtherLevels(this->_gemslr_setups._level_setups._lr_rank_factor2_setup);
1542  gemslr.SetBLowRankFactorOtherLevels(this->_gemslr_setups._level_setups._lr_rank_factor2_B_setup);
1543  gemslr.SetLowRankRanksTopLevel(this->_gemslr_setups._level_setups._lr_rank2_setup);
1544  gemslr.SetBLowRankRanksTopLevel(this->_gemslr_setups._level_setups._lr_rank1_B_setup);
1545  gemslr.SetLowRankRanksOtherLevels(this->_gemslr_setups._level_setups._lr_rank2_setup);
1546  gemslr.SetBLowRankRanksOtherLevels(this->_gemslr_setups._level_setups._lr_rank2_B_setup);
1547  gemslr.SetLowRankArnoldiFactorTopLevel(this->_gemslr_setups._level_setups._lr_arnoldi_factor2_setup);
1548  gemslr.SetBLowRankArnoldiFactorTopLevel(this->_gemslr_setups._level_setups._lr_arnoldi_factor1_B_setup);
1549  gemslr.SetLowRankArnoldiFactorOtherLevels(this->_gemslr_setups._level_setups._lr_arnoldi_factor2_setup);
1550  gemslr.SetBLowRankArnoldiFactorOtherLevels(this->_gemslr_setups._level_setups._lr_arnoldi_factor2_B_setup);
1551  gemslr.SetLowRankMaxNumberIterationsTopLevel(this->_gemslr_setups._level_setups._lr_maxits2_setup);
1552  gemslr.SetBLowRankMaxNumberIterationsTopLevel(this->_gemslr_setups._level_setups._lr_maxits1_B_setup);
1553  gemslr.SetLowRankMaxNumberIterationsOtherLevels(this->_gemslr_setups._level_setups._lr_maxits2_setup);
1554  gemslr.SetBLowRankMaxNumberIterationsOtherLevels(this->_gemslr_setups._level_setups._lr_maxits2_B_setup);
1555  gemslr.SetLowRankThresholdTopLevel(this->_gemslr_setups._level_setups._lr_tol_eig2_setup);
1556  gemslr.SetBLowRankThresholdTopLevel(this->_gemslr_setups._level_setups._lr_tol_eig1_B_setup);
1557  gemslr.SetLowRankThresholdOtherLevels(this->_gemslr_setups._level_setups._lr_tol_eig2_setup);
1558  gemslr.SetBLowRankThresholdOtherLevels(this->_gemslr_setups._level_setups._lr_tol_eig2_B_setup);
1559 
1560  /* set the solver into multilevel */
1561  gemslr.SetGlobalPrecondOption(kGemslrGlobalPrecondGeMSLR);
1562  gemslr.SetPreconditionerOption1(this->_gemslr_setups._level_setups._B_solve_option1);
1563  gemslr.SetPreconditionerOption1Levels(this->_gemslr_setups._level_setups._B_solve_option1_levels);
1564  gemslr.SetPreconditionerOption2(this->_gemslr_setups._level_setups._B_solve_option2);
1565  gemslr.SetPreconditionerOptionC(this->_gemslr_setups._level_setups._C_solve_option);
1566  gemslr.SetSmoothOptionB(this->_gemslr_setups._level_setups._B_smooth_option1);
1567 
1568  /* set ilu options */
1569  gemslr.SetIluResidualIters(this->_gemslr_setups._level_setups._ilu_residual_iters);
1570  gemslr.SetIluComplexShift(this->_gemslr_setups._level_setups._ilu_complex_shift);
1571  gemslr.SetIluDropTolB(this->_gemslr_setups._level_setups._B_ilu_tol_setup);
1572  gemslr.SetBIluDropTolB(this->_gemslr_setups._level_setups._B_ilu_tol_B_setup);
1573  gemslr.SetIluDropTolC(this->_gemslr_setups._level_setups._C_ilu_tol_setup);
1574  gemslr.SetBIluDropTolC(this->_gemslr_setups._level_setups._C_ilu_tol_B_setup);
1575  gemslr.SetIluMaxRowNnzB(this->_gemslr_setups._level_setups._B_ilu_max_row_nnz_setup);
1576  gemslr.SetBIluMaxRowNnzB(this->_gemslr_setups._level_setups._B_ilu_max_row_nnz_B_setup);
1577  gemslr.SetIluMaxRowNnzC(this->_gemslr_setups._level_setups._C_ilu_max_row_nnz_setup);
1578  gemslr.SetBIluMaxRowNnzC(this->_gemslr_setups._level_setups._C_ilu_max_row_nnz_B_setup);
1579  gemslr.SetIluFillLevelB(this->_gemslr_setups._level_setups._B_ilu_fill_level_setup);
1580  gemslr.SetBIluFillLevelB(this->_gemslr_setups._level_setups._B_ilu_fill_level_B_setup);
1581  gemslr.SetIluFillLevelC(this->_gemslr_setups._level_setups._C_ilu_fill_level_setup);
1582  gemslr.SetBIluFillLevelC(this->_gemslr_setups._level_setups._C_ilu_fill_level_B_setup);
1583  gemslr.SetPolyOrder(this->_gemslr_setups._level_setups._B_poly_order);
1584  gemslr.SetBPolyOrder(this->_gemslr_setups._level_setups._B_poly_order_B);
1585 
1586  return PARGEMSLR_SUCCESS;
1587  }
1588 
1595  virtual int SetWithParameterArray(double *params)
1596  {
1597 
1598  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslr_SetWithParameterArray."));
1599 
1600  /* general setup */
1601 
1602  //pargemslr_global::_metis_refine = params[PARGEMSLR_IO_PREPOSS_METIS_REFINE];
1603  this->_print_option = params[PARGEMSLR_IO_GENERAL_PRINT_LEVEL];
1604 
1605  /* gemslr_setup */
1606 
1607  this->_gemslr_setups._partition_option_setup = params[PARGEMSLR_IO_PREPOSS_PARTITION_GLOBAL];
1608  this->_gemslr_setups._partition_option_B_setup = params[PARGEMSLR_IO_PREPOSS_PARTITION_LOCAL];
1609  this->_gemslr_setups._perm_option_setup = params[PARGEMSLR_IO_ILU_PERM_OPTION_GLOBAL];
1610  this->_gemslr_setups._perm_option_B_setup = params[PARGEMSLR_IO_ILU_PERM_OPTION_LOCAL];
1611  this->_gemslr_setups._nlev_setup = params[PARGEMSLR_IO_PREPOSS_NLEV_GLOBAL];
1612  this->_gemslr_setups._nlev_B_setup = params[PARGEMSLR_IO_PREPOSS_NLEV_LOCAL];
1613  this->_gemslr_setups._ncomp_setup = params[PARGEMSLR_IO_PREPOSS_NCOMP_GLOBAL];
1614  this->_gemslr_setups._ncomp_B_setup = params[PARGEMSLR_IO_PREPOSS_NCOMP_LOCAL];
1615  this->_gemslr_setups._kmin_setup = params[PARGEMSLR_IO_PREPOSS_KMIN_GLOBAL];
1616  this->_gemslr_setups._kmin_B_setup = params[PARGEMSLR_IO_PREPOSS_KMIN_LOCAL];
1617  this->_gemslr_setups._kfactor_setup = params[PARGEMSLR_IO_PREPOSS_KFACTOR_GLOBAL];
1618  this->_gemslr_setups._kfactor_B_setup = params[PARGEMSLR_IO_PREPOSS_KFACTOR_LOCAL];
1619  this->_gemslr_setups._vertexsep_setup = params[PARGEMSLR_IO_PREPOSS_VTXSEP_GLOBAL] != 0;
1620  this->_gemslr_setups._vertexsep_B_setup = params[PARGEMSLR_IO_PREPOSS_VTXSEP_LOCAL] != 0;
1621  this->_gemslr_setups._global_partition_setup = params[PARGEMSLR_IO_PREPOSS_GLOBAL_PARTITION] != 0;
1622 
1623  this->_gemslr_setups._enable_inner_iters_setup = params[PARGEMSLR_IO_SCHUR_ENABLE] != 0;
1624  this->_gemslr_setups._inner_iters_tol_setup = params[PARGEMSLR_IO_SCHUR_ITER_TOL];
1625  this->_gemslr_setups._inner_iters_maxits_setup = params[PARGEMSLR_IO_SCHUR_MAXITS];
1626  this->_gemslr_setups._solve_option_setup = params[PARGEMSLR_IO_ADVANCED_GLOBAL_SOLVE];
1627 
1628  this->_gemslr_setups._diag_shift_milu = params[PARGEMSLR_IO_ADVANCED_DIAG_SHIFT_MODIFIED];
1629 
1630  /* level_setup */
1631 
1632  this->_gemslr_setups._level_setups._lr_option1_setup = params[PARGEMSLR_IO_LR_ARNOLDI_OPTION1_GLOBAL];
1633  this->_gemslr_setups._level_setups._lr_option2_setup = params[PARGEMSLR_IO_LR_ARNOLDI_OPTION2_GLOBAL];
1634  this->_gemslr_setups._level_setups._lr_optionA_setup = params[PARGEMSLR_IO_LR_ARNOLDI_OPTIONA];
1635  this->_gemslr_setups._level_setups._lr_rand_init_setup = params[PARGEMSLR_IO_LR_RAND_INIT_GUESS] != 0.0;
1636  this->_gemslr_setups._level_setups._lr_rank_factor1_setup = params[PARGEMSLR_IO_LR_RANK_FACTOR1_GLOBAL];
1637  this->_gemslr_setups._level_setups._lr_rank_factor2_setup = params[PARGEMSLR_IO_LR_RANK_FACTOR2_GLOBAL];
1638  this->_gemslr_setups._level_setups._lr_rank_factorA_setup = params[PARGEMSLR_IO_LR_RANK_FACTORA];
1639  this->_gemslr_setups._level_setups._lr_rank1_setup = params[PARGEMSLR_IO_LR_RANK1_GLOBAL];
1640  this->_gemslr_setups._level_setups._lr_rank2_setup = params[PARGEMSLR_IO_LR_RANK2_GLOBAL];
1641  this->_gemslr_setups._level_setups._lr_rankA_setup = params[PARGEMSLR_IO_LR_RANK_A];
1642  this->_gemslr_setups._level_setups._lr_arnoldi_factor1_setup = params[PARGEMSLR_IO_LR_ARNOLDI_FACTOR1_GLOBAL];
1643  this->_gemslr_setups._level_setups._lr_arnoldi_factor2_setup = params[PARGEMSLR_IO_LR_ARNOLDI_FACTOR2_GLOBAL];
1644  this->_gemslr_setups._level_setups._lr_arnoldi_factorA_setup = params[PARGEMSLR_IO_LR_ARNOLDI_FACTORA];
1645  this->_gemslr_setups._level_setups._lr_maxits1_setup = params[PARGEMSLR_IO_LR_MAXITS1_GLOBAL];
1646  this->_gemslr_setups._level_setups._lr_maxits2_setup = params[PARGEMSLR_IO_LR_MAXITS2_GLOBAL];
1647  this->_gemslr_setups._level_setups._lr_maxitsA_setup = params[PARGEMSLR_IO_LR_MAXITSA];
1648  this->_gemslr_setups._level_setups._lr_tol_eig1_setup = params[PARGEMSLR_IO_LR_TOL_EIG1_GLOBAL];
1649  this->_gemslr_setups._level_setups._lr_tol_eig2_setup = params[PARGEMSLR_IO_LR_TOL_EIG2_GLOBAL];
1650  this->_gemslr_setups._level_setups._lr_tol_eigA_setup = params[PARGEMSLR_IO_LR_TOL_EIGA];
1651 
1652  this->_global_precond_option = params[PARGEMSLR_IO_PRECOND_GLOBAL_PRECOND];
1653  this->_gemslr_setups._level_setups._B_solve_option1 = params[PARGEMSLR_IO_PRECOND_LOCAL_REPCOND1];
1654  this->_gemslr_setups._level_setups._B_solve_option1_levels = params[PARGEMSLR_IO_PRECOND_LOCAL_REPCOND1_LEVEL];
1655  this->_gemslr_setups._level_setups._B_solve_option2 = params[PARGEMSLR_IO_PRECOND_LOCAL_REPCOND2];
1656  this->_gemslr_setups._level_setups._C_solve_option = params[PARGEMSLR_IO_PRECOND_LOCAL_REPCOND3];
1657  this->_gemslr_setups._level_setups._B_smooth_option1 = params[PARGEMSLR_IO_PRECOND_LOCAL_SMOOTHER1];
1658 
1659  if(this->_gemslr_setups._level_setups._C_solve_option == kGemslrCSolveBJILUK2)
1660  {
1661  this->_gemslr_setups._level_setups._C_solve_option = kGemslrCSolveBJILUK;
1662  this->_gemslr_setups._level_setups._C_lr_pslr = true;
1663  }
1664  if(this->_gemslr_setups._level_setups._C_solve_option == kGemslrCSolveBJILUT2)
1665  {
1666  this->_gemslr_setups._level_setups._C_solve_option = kGemslrCSolveBJILUT;
1667  this->_gemslr_setups._level_setups._C_lr_pslr = true;
1668  }
1669 
1670  this->_gemslr_setups._level_setups._B_ilu_tol_setup = params[PARGEMSLR_IO_ILU_DROPTOL_B_GLOBAL];
1671  this->_gemslr_setups._level_setups._C_ilu_tol_setup = params[PARGEMSLR_IO_ILU_DROPTOL_C_GLOBAL];
1672  this->_gemslr_setups._level_setups._EF_ilu_tol_setup = params[PARGEMSLR_IO_ILU_DROPTOL_EF_GLOBAL];
1673  this->_gemslr_setups._level_setups._S_ilu_tol_setup = params[PARGEMSLR_IO_ILU_DROPTOL_S_GLOBAL];
1674  this->_gemslr_setups._level_setups._B_ilu_max_row_nnz_setup = params[PARGEMSLR_IO_ILU_ROWNNZ_B_GLOBAL];
1675  this->_gemslr_setups._level_setups._C_ilu_max_row_nnz_setup = params[PARGEMSLR_IO_ILU_ROWNNZ_C_GLOBAL];
1676  this->_gemslr_setups._level_setups._S_ilu_max_row_nnz_setup = params[PARGEMSLR_IO_ILU_ROWNNZ_S_GLOBAL];
1677  this->_gemslr_setups._level_setups._B_ilu_fill_level_setup = params[PARGEMSLR_IO_ILU_LFIL_B_GLOBAL];
1678  this->_gemslr_setups._level_setups._C_ilu_fill_level_setup = params[PARGEMSLR_IO_ILU_LFIL_C_GLOBAL];
1679  this->_gemslr_setups._level_setups._B_poly_order = params[PARGEMSLR_IO_POLY_ORDER];
1680 
1681  this->_gemslr_setups._level_setups._ilu_complex_shift = params[PARGEMSLR_IO_ADVANCED_USE_COMPLEX_SHIFT] != 0.0;
1682  this->_gemslr_setups._level_setups._ilu_residual_iters = params[PARGEMSLR_IO_ADVANCED_RESIDUAL_ITERS];
1683 
1684  pargemslr_global::_gram_schmidt = params[PARGEMSLR_IO_ADVANCED_GRAM_SCHMIDT];
1685 
1686  this->_gemslr_setups._level_setups._lr_option1_B_setup = params[PARGEMSLR_IO_LR_ARNOLDI_OPTION1_LOCAL];
1687  this->_gemslr_setups._level_setups._lr_option2_B_setup = params[PARGEMSLR_IO_LR_ARNOLDI_OPTION2_LOCAL];
1688  this->_gemslr_setups._level_setups._lr_rand_init_B_setup = params[PARGEMSLR_IO_LR_RAND_INIT_GUESS] != 0.0;
1689  this->_gemslr_setups._level_setups._lr_rank_factor1_B_setup = params[PARGEMSLR_IO_LR_RANK_FACTOR1_LOCAL];
1690  this->_gemslr_setups._level_setups._lr_rank_factor2_B_setup = params[PARGEMSLR_IO_LR_RANK_FACTOR2_LOCAL];
1691  this->_gemslr_setups._level_setups._lr_rank1_B_setup = params[PARGEMSLR_IO_LR_RANK1_LOCAL];
1692  this->_gemslr_setups._level_setups._lr_rank2_B_setup = params[PARGEMSLR_IO_LR_RANK2_LOCAL];
1693  this->_gemslr_setups._level_setups._lr_arnoldi_factor1_B_setup = params[PARGEMSLR_IO_LR_ARNOLDI_FACTOR1_LOCAL];
1694  this->_gemslr_setups._level_setups._lr_arnoldi_factor2_B_setup = params[PARGEMSLR_IO_LR_ARNOLDI_FACTOR2_LOCAL];
1695  this->_gemslr_setups._level_setups._lr_maxits1_B_setup = params[PARGEMSLR_IO_LR_MAXITS1_LOCAL];
1696  this->_gemslr_setups._level_setups._lr_maxits2_B_setup = params[PARGEMSLR_IO_LR_MAXITS2_LOCAL];
1697  this->_gemslr_setups._level_setups._lr_tol_eig1_B_setup = params[PARGEMSLR_IO_LR_TOL_EIG1_LOCAL];
1698  this->_gemslr_setups._level_setups._lr_tol_eig2_B_setup = params[PARGEMSLR_IO_LR_TOL_EIG2_LOCAL];
1699 
1700  this->_gemslr_setups._level_setups._B_ilu_tol_B_setup = params[PARGEMSLR_IO_ILU_DROPTOL_B_LOCAL];
1701  this->_gemslr_setups._level_setups._C_ilu_tol_B_setup = params[PARGEMSLR_IO_ILU_DROPTOL_C_LOCAL];
1702  this->_gemslr_setups._level_setups._B_ilu_max_row_nnz_B_setup = params[PARGEMSLR_IO_ILU_ROWNNZ_B_LOCAL];
1703  this->_gemslr_setups._level_setups._C_ilu_max_row_nnz_B_setup = params[PARGEMSLR_IO_ILU_ROWNNZ_C_LOCAL];
1704  this->_gemslr_setups._level_setups._B_ilu_fill_level_B_setup = params[PARGEMSLR_IO_ILU_LFIL_B_LOCAL];
1705  this->_gemslr_setups._level_setups._C_ilu_fill_level_B_setup = params[PARGEMSLR_IO_ILU_LFIL_C_LOCAL];
1706  this->_gemslr_setups._level_setups._B_poly_order_B = params[PARGEMSLR_IO_POLY_ORDER];
1707 
1708  return PARGEMSLR_SUCCESS;
1709  }
1710 
1717  int SetGlobalPrecondOption(int option)
1718  {
1719  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1720  PARGEMSLR_FIRM_CHKERR(option < 0);
1721  PARGEMSLR_FIRM_CHKERR(option > 3);
1722  this->_global_precond_option = option;
1723  return PARGEMSLR_SUCCESS;
1724  }
1725 
1732  int SetPartitionOption(int option)
1733  {
1734  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1735  PARGEMSLR_FIRM_CHKERR(option < 0);
1736  PARGEMSLR_FIRM_CHKERR(option > 1);
1737  this->_gemslr_setups._partition_option_setup = option;
1738  return PARGEMSLR_SUCCESS;
1739  }
1740 
1747  int SetBPartitionOption(int option)
1748  {
1749  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1750  PARGEMSLR_FIRM_CHKERR(option < 0);
1751  PARGEMSLR_FIRM_CHKERR(option > 1);
1752  this->_gemslr_setups._partition_option_B_setup = option;
1753  return PARGEMSLR_SUCCESS;
1754  }
1755 
1762  int SetPermutationOption(int option)
1763  {
1764  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1765  PARGEMSLR_FIRM_CHKERR(option < 0);
1766  PARGEMSLR_FIRM_CHKERR(option > 2);
1767  this->_gemslr_setups._perm_option_setup = option;
1768  return PARGEMSLR_SUCCESS;
1769  }
1770 
1777  int SetBPermutationOption(int option)
1778  {
1779  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1780  PARGEMSLR_FIRM_CHKERR(option < 0);
1781  PARGEMSLR_FIRM_CHKERR(option > 2);
1782  this->_gemslr_setups._perm_option_B_setup = option;
1783  return PARGEMSLR_SUCCESS;
1784  }
1785 
1792  int SetNumLevels(int option)
1793  {
1794  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1795  PARGEMSLR_FIRM_CHKERR(option < 1);
1796  this->_gemslr_setups._nlev_setup = option;
1797  return PARGEMSLR_SUCCESS;
1798  }
1799 
1806  int SetBNumLevels(int option)
1807  {
1808  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1809  PARGEMSLR_FIRM_CHKERR(option < 1);
1810  this->_gemslr_setups._nlev_B_setup = option;
1811  return PARGEMSLR_SUCCESS;
1812  }
1813 
1820  int SetNumSubdomains(int option)
1821  {
1822  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1823  PARGEMSLR_FIRM_CHKERR(option < 1);
1824  this->_gemslr_setups._ncomp_setup = option;
1825  return PARGEMSLR_SUCCESS;
1826  }
1827 
1834  int SetBNumSubdomains(int option)
1835  {
1836  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1837  PARGEMSLR_FIRM_CHKERR(option < 1);
1838  this->_gemslr_setups._ncomp_B_setup = option;
1839  return PARGEMSLR_SUCCESS;
1840  }
1841 
1849  {
1850  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1851  PARGEMSLR_FIRM_CHKERR(option < 1);
1852  this->_gemslr_setups._kmin_setup = option;
1853  return PARGEMSLR_SUCCESS;
1854  }
1855 
1863  {
1864  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1865  PARGEMSLR_FIRM_CHKERR(option < 1);
1866  this->_gemslr_setups._kmin_B_setup = option;
1867  return PARGEMSLR_SUCCESS;
1868  }
1869 
1877  {
1878  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1879  PARGEMSLR_FIRM_CHKERR(option < 1);
1880  this->_gemslr_setups._kfactor_setup = option;
1881  return PARGEMSLR_SUCCESS;
1882  }
1883 
1891  {
1892  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1893  PARGEMSLR_FIRM_CHKERR(option < 1);
1894  this->_gemslr_setups._kfactor_B_setup = option;
1895  return PARGEMSLR_SUCCESS;
1896  }
1897 
1904  int SetSeperatorOption(bool option)
1905  {
1906  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1907  this->_gemslr_setups._vertexsep_setup = option;
1908  return PARGEMSLR_SUCCESS;
1909  }
1910 
1917  int SetBSeperatorOption(bool option)
1918  {
1919  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1920  this->_gemslr_setups._vertexsep_B_setup = option;
1921  return PARGEMSLR_SUCCESS;
1922  }
1923 
1930  int SetGlobalPartitionOption(bool option)
1931  {
1932  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1933  this->_gemslr_setups._global_partition_setup = option;
1934  return PARGEMSLR_SUCCESS;
1935  }
1936 
1943  int SetInnerIterationOption(bool option)
1944  {
1945  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1946  this->_gemslr_setups._enable_inner_iters_setup = option;
1947  return PARGEMSLR_SUCCESS;
1948  }
1949 
1956  template <typename T>
1958  {
1959  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1960  this->_gemslr_setups._inner_iters_tol_setup = option;
1961  return PARGEMSLR_SUCCESS;
1962  }
1963 
1971  {
1972  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1973  PARGEMSLR_FIRM_CHKERR(option < 1);
1974  this->_gemslr_setups._inner_iters_maxits_setup = option;
1975  return PARGEMSLR_SUCCESS;
1976  }
1977 
1984  int SetSolveOption(int option)
1985  {
1986  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
1987  PARGEMSLR_FIRM_CHKERR(option < 0);
1988  PARGEMSLR_FIRM_CHKERR(option > 2);
1989  this->_gemslr_setups._solve_option_setup = option;
1990  return PARGEMSLR_SUCCESS;
1991  }
1992 
2000  {
2001  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2002  PARGEMSLR_FIRM_CHKERR(option < 0);
2003  PARGEMSLR_FIRM_CHKERR(option > 2);
2004  this->_gemslr_setups._level_setups._lr_option1_setup = option;
2005  return PARGEMSLR_SUCCESS;
2006  }
2007 
2015  {
2016  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2017  PARGEMSLR_FIRM_CHKERR(option < 0);
2018  PARGEMSLR_FIRM_CHKERR(option > 2);
2019  this->_gemslr_setups._level_setups._lr_option2_setup = option;
2020  return PARGEMSLR_SUCCESS;
2021  }
2022 
2029  int SetLowRankOptionA(int option)
2030  {
2031  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2032  PARGEMSLR_FIRM_CHKERR(option < 0);
2033  PARGEMSLR_FIRM_CHKERR(option > 2);
2034  this->_gemslr_setups._level_setups._lr_optionA_setup = option;
2035  return PARGEMSLR_SUCCESS;
2036  }
2037 
2045  {
2046  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2047  PARGEMSLR_FIRM_CHKERR(option < 0);
2048  PARGEMSLR_FIRM_CHKERR(option > 2);
2049  this->_gemslr_setups._level_setups._lr_option1_B_setup = option;
2050  return PARGEMSLR_SUCCESS;
2051  }
2052 
2060  {
2061  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2062  PARGEMSLR_FIRM_CHKERR(option < 0);
2063  PARGEMSLR_FIRM_CHKERR(option > 2);
2064  this->_gemslr_setups._level_setups._lr_option2_B_setup = option;
2065  return PARGEMSLR_SUCCESS;
2066  }
2067 
2074  int SetLowRankRandomInitGuess(bool option)
2075  {
2076  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2077  this->_gemslr_setups._level_setups._lr_rand_init_setup = option;
2078  return PARGEMSLR_SUCCESS;
2079  }
2080 
2088  {
2089  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2090  this->_gemslr_setups._level_setups._lr_rand_init_B_setup = option;
2091  return PARGEMSLR_SUCCESS;
2092  }
2093 
2100  template <typename T>
2102  {
2103  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2104  PARGEMSLR_FIRM_CHKERR(option < T(1.0));
2105  this->_gemslr_setups._level_setups._lr_rank_factor1_setup = option;
2106  return PARGEMSLR_SUCCESS;
2107  }
2108 
2115  template <typename T>
2117  {
2118  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2119  PARGEMSLR_FIRM_CHKERR(option < T(1.0));
2120  this->_gemslr_setups._level_setups._lr_rank_factor2_setup = option;
2121  return PARGEMSLR_SUCCESS;
2122  }
2123 
2130  template <typename T>
2131  int SetLowRankFactorA(T option)
2132  {
2133  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2134  PARGEMSLR_FIRM_CHKERR(option < T(1.0));
2135  this->_gemslr_setups._level_setups._lr_rank_factorA_setup = option;
2136  return PARGEMSLR_SUCCESS;
2137  }
2138 
2145  template <typename T>
2147  {
2148  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2149  PARGEMSLR_FIRM_CHKERR(option < T(1.0));
2150  this->_gemslr_setups._level_setups._lr_rank_factor1_B_setup = option;
2151  return PARGEMSLR_SUCCESS;
2152  }
2153 
2160  template <typename T>
2162  {
2163  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2164  PARGEMSLR_FIRM_CHKERR(option < T(1.0));
2165  this->_gemslr_setups._level_setups._lr_rank_factor2_B_setup = option;
2166  return PARGEMSLR_SUCCESS;
2167  }
2168 
2175  template <typename T>
2177  {
2178  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2179  PARGEMSLR_FIRM_CHKERR(option < 0);
2180  this->_gemslr_setups._level_setups._lr_rank1_setup = option;
2181  return PARGEMSLR_SUCCESS;
2182  }
2183 
2190  template <typename T>
2192  {
2193  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2194  PARGEMSLR_FIRM_CHKERR(option < 0);
2195  this->_gemslr_setups._level_setups._lr_rank2_setup = option;
2196  return PARGEMSLR_SUCCESS;
2197  }
2198 
2205  template <typename T>
2206  int SetLowRankA(T option)
2207  {
2208  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2209  PARGEMSLR_FIRM_CHKERR(option < 0);
2210  this->_gemslr_setups._level_setups._lr_rankA_setup = option;
2211  return PARGEMSLR_SUCCESS;
2212  }
2213 
2220  template <typename T>
2222  {
2223  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2224  PARGEMSLR_FIRM_CHKERR(option < 0);
2225  this->_gemslr_setups._level_setups._lr_rank1_B_setup = option;
2226  return PARGEMSLR_SUCCESS;
2227  }
2228 
2235  template <typename T>
2237  {
2238  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2239  PARGEMSLR_FIRM_CHKERR(option < 0);
2240  this->_gemslr_setups._level_setups._lr_rank2_B_setup = option;
2241  return PARGEMSLR_SUCCESS;
2242  }
2243 
2250  template <typename T>
2252  {
2253  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2254  PARGEMSLR_FIRM_CHKERR(option < T(1.0));
2255  this->_gemslr_setups._level_setups._lr_arnoldi_factor1_setup = option;
2256  return PARGEMSLR_SUCCESS;
2257  }
2258 
2265  template <typename T>
2267  {
2268  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2269  PARGEMSLR_FIRM_CHKERR(option < 0);
2270  this->_gemslr_setups._level_setups._lr_arnoldi_factor2_setup = option;
2271  return PARGEMSLR_SUCCESS;
2272  }
2273 
2280  template <typename T>
2282  {
2283  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2284  PARGEMSLR_FIRM_CHKERR(option < 0);
2285  this->_gemslr_setups._level_setups._lr_arnoldi_factorA_setup = option;
2286  return PARGEMSLR_SUCCESS;
2287  }
2288 
2295  template <typename T>
2297  {
2298  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2299  PARGEMSLR_FIRM_CHKERR(option < T(1.0));
2300  this->_gemslr_setups._level_setups._lr_arnoldi_factor1_B_setup = option;
2301  return PARGEMSLR_SUCCESS;
2302  }
2303 
2310  template <typename T>
2312  {
2313  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2314  PARGEMSLR_FIRM_CHKERR(option < T(1.0));
2315  this->_gemslr_setups._level_setups._lr_arnoldi_factor2_B_setup = option;
2316  return PARGEMSLR_SUCCESS;
2317  }
2318 
2326  {
2327  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2328  PARGEMSLR_FIRM_CHKERR(option < 0);
2329  this->_gemslr_setups._level_setups._lr_maxits1_setup = option;
2330  return PARGEMSLR_SUCCESS;
2331  }
2332 
2340  {
2341  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2342  PARGEMSLR_FIRM_CHKERR(option < 0);
2343  this->_gemslr_setups._level_setups._lr_maxits2_setup = option;
2344  return PARGEMSLR_SUCCESS;
2345  }
2346 
2354  {
2355  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2356  PARGEMSLR_FIRM_CHKERR(option < 0);
2357  this->_gemslr_setups._level_setups._lr_maxitsA_setup = option;
2358  return PARGEMSLR_SUCCESS;
2359  }
2360 
2368  {
2369  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2370  PARGEMSLR_FIRM_CHKERR(option < 0);
2371  this->_gemslr_setups._level_setups._lr_maxits1_B_setup = option;
2372  return PARGEMSLR_SUCCESS;
2373  }
2374 
2382  {
2383  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2384  PARGEMSLR_FIRM_CHKERR(option < 0);
2385  this->_gemslr_setups._level_setups._lr_maxits2_B_setup = option;
2386  return PARGEMSLR_SUCCESS;
2387  }
2388 
2395  template <typename T>
2397  {
2398  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2399  this->_gemslr_setups._level_setups._lr_tol_eig1_setup = option;
2400  return PARGEMSLR_SUCCESS;
2401  }
2402 
2409  template <typename T>
2411  {
2412  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2413  this->_gemslr_setups._level_setups._lr_tol_eig2_setup = option;
2414  return PARGEMSLR_SUCCESS;
2415  }
2416 
2423  template <typename T>
2424  int SetLowRankThresholdA(T option)
2425  {
2426  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2427  this->_gemslr_setups._level_setups._lr_tol_eigA_setup = option;
2428  return PARGEMSLR_SUCCESS;
2429  }
2430 
2437  template <typename T>
2439  {
2440  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2441  this->_gemslr_setups._level_setups._lr_tol_eig1_B_setup = option;
2442  return PARGEMSLR_SUCCESS;
2443  }
2444 
2451  template <typename T>
2453  {
2454  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2455  this->_gemslr_setups._level_setups._lr_tol_eig2_B_setup = option;
2456  return PARGEMSLR_SUCCESS;
2457  }
2458 
2465  template <typename T>
2466  int SetIluDropTolB(T option)
2467  {
2468  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2469  this->_gemslr_setups._level_setups._B_ilu_tol_setup = option;
2470  return PARGEMSLR_SUCCESS;
2471  }
2472 
2479  template <typename T>
2480  int SetIluDropTolC(T option)
2481  {
2482  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2483  this->_gemslr_setups._level_setups._C_ilu_tol_setup = option;
2484  return PARGEMSLR_SUCCESS;
2485  }
2486 
2493  template <typename T>
2494  int SetIluDropTolS(T option)
2495  {
2496  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2497  this->_gemslr_setups._level_setups._S_ilu_tol_setup = option;
2498  return PARGEMSLR_SUCCESS;
2499  }
2500 
2507  template <typename T>
2508  int SetIluDropTolEF(T option)
2509  {
2510  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2511  this->_gemslr_setups._level_setups._EF_ilu_tol_setup = option;
2512  return PARGEMSLR_SUCCESS;
2513  }
2514 
2521  template <typename T>
2522  int SetBIluDropTolB(T option)
2523  {
2524  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2525  this->_gemslr_setups._level_setups._B_ilu_tol_B_setup = option;
2526  return PARGEMSLR_SUCCESS;
2527  }
2528 
2535  template <typename T>
2536  int SetBIluDropTolC(T option)
2537  {
2538  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2539  this->_gemslr_setups._level_setups._C_ilu_tol_B_setup = option;
2540  return PARGEMSLR_SUCCESS;
2541  }
2542 
2549  int SetIluMaxRowNnzB(int option)
2550  {
2551  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2552  PARGEMSLR_FIRM_CHKERR(option < 0);
2553  this->_gemslr_setups._level_setups._B_ilu_max_row_nnz_setup = option;
2554  return PARGEMSLR_SUCCESS;
2555  }
2556 
2563  int SetIluMaxRowNnzC(int option)
2564  {
2565  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2566  PARGEMSLR_FIRM_CHKERR(option < 0);
2567  this->_gemslr_setups._level_setups._C_ilu_max_row_nnz_setup = option;
2568  return PARGEMSLR_SUCCESS;
2569  }
2570 
2577  int SetIluMaxRowNnzS(int option)
2578  {
2579  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2580  PARGEMSLR_FIRM_CHKERR(option < 0);
2581  this->_gemslr_setups._level_setups._S_ilu_max_row_nnz_setup = option;
2582  return PARGEMSLR_SUCCESS;
2583  }
2584 
2591  int SetBIluMaxRowNnzB(int option)
2592  {
2593  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2594  PARGEMSLR_FIRM_CHKERR(option < 0);
2595  this->_gemslr_setups._level_setups._B_ilu_max_row_nnz_B_setup = option;
2596  return PARGEMSLR_SUCCESS;
2597  }
2598 
2605  int SetBIluMaxRowNnzC(int option)
2606  {
2607  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2608  PARGEMSLR_FIRM_CHKERR(option < 0);
2609  this->_gemslr_setups._level_setups._C_ilu_max_row_nnz_B_setup = option;
2610  return PARGEMSLR_SUCCESS;
2611  }
2612 
2619  int SetIluFillLevelB(int option)
2620  {
2621  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("GemslrSets"));
2622  PARGEMSLR_FIRM_CHKERR(option < 0);
2623  this->_gemslr_setups._level_setups._B_ilu_fill_level_setup = option;
2624  return PARGEMSLR_SUCCESS;
2625  }
2626 
2633  int SetIluFillLevelC(int option)
2634  {
2635  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("GemslrSets"));
2636  PARGEMSLR_FIRM_CHKERR(option < 0);
2637  this->_gemslr_setups._level_setups._C_ilu_fill_level_setup = option;
2638  return PARGEMSLR_SUCCESS;
2639  }
2640 
2647  int SetBIluFillLevelB(int option)
2648  {
2649  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("GemslrSets"));
2650  PARGEMSLR_FIRM_CHKERR(option < 0);
2651  this->_gemslr_setups._level_setups._B_ilu_fill_level_B_setup = option;
2652  return PARGEMSLR_SUCCESS;
2653  }
2654 
2661  int SetBIluFillLevelC(int option)
2662  {
2663  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("GemslrSets"));
2664  PARGEMSLR_FIRM_CHKERR(option < 0);
2665  this->_gemslr_setups._level_setups._C_ilu_fill_level_B_setup = option;
2666  return PARGEMSLR_SUCCESS;
2667  }
2668 
2675  int SetPolyOrder(int option)
2676  {
2677  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2678  PARGEMSLR_FIRM_CHKERR(option < 1);
2679  this->_gemslr_setups._level_setups._B_poly_order = option;
2680  return PARGEMSLR_SUCCESS;
2681  }
2682 
2689  int SetBPolyOrder(int option)
2690  {
2691  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2692  PARGEMSLR_FIRM_CHKERR(option < 1);
2693  this->_gemslr_setups._level_setups._B_poly_order_B = option;
2694  return PARGEMSLR_SUCCESS;
2695  }
2696 
2705  {
2706  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2707  PARGEMSLR_FIRM_CHKERR(option < 0);
2708  PARGEMSLR_FIRM_CHKERR(option > 2);
2709  this->_gemslr_setups._level_setups._B_solve_option1 = option;
2710  return PARGEMSLR_SUCCESS;
2711  }
2712 
2721  {
2722  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2723  this->_gemslr_setups._level_setups._B_solve_option1_levels = option;
2724  return PARGEMSLR_SUCCESS;
2725  }
2726 
2735  {
2736  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2737  PARGEMSLR_FIRM_CHKERR(option < 0);
2738  PARGEMSLR_FIRM_CHKERR(option > 2);
2739  this->_gemslr_setups._level_setups._B_solve_option2 = option;
2740  return PARGEMSLR_SUCCESS;
2741  }
2742 
2751  {
2752  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2753  PARGEMSLR_FIRM_CHKERR(option < 0);
2754  PARGEMSLR_FIRM_CHKERR(option > 2);
2755  this->_gemslr_setups._level_setups._B_solve_option1 = option;
2756  this->_gemslr_setups._level_setups._B_solve_option1_levels = 0;
2757  this->_gemslr_setups._level_setups._B_solve_option2 = option;
2758  return PARGEMSLR_SUCCESS;
2759  }
2760 
2767  int SetSmoothOptionB(int option)
2768  {
2769  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2770  PARGEMSLR_FIRM_CHKERR(option < 0);
2771  PARGEMSLR_FIRM_CHKERR(option > 1);
2772  this->_gemslr_setups._level_setups._B_smooth_option1 = option;
2773  return PARGEMSLR_SUCCESS;
2774  }
2775 
2784  {
2785  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2786  PARGEMSLR_FIRM_CHKERR(option < 0);
2787  PARGEMSLR_FIRM_CHKERR(option > 1);
2788  this->_gemslr_setups._level_setups._C_solve_option = option;
2789  return PARGEMSLR_SUCCESS;
2790  }
2791 
2798  int SetIluResidualIters(int residual_iters)
2799  {
2800  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2801  this->_gemslr_setups._level_setups._ilu_residual_iters = residual_iters;
2802  return PARGEMSLR_SUCCESS;
2803  }
2804 
2811  int SetIluComplexShift(bool complex_shift)
2812  {
2813  PARGEMSLR_FIRM_CHKERR(this->CheckReadySetups("ParallelGemslrSets"));
2814  this->_gemslr_setups._level_setups._ilu_complex_shift = complex_shift;
2815  return PARGEMSLR_SUCCESS;
2816  }
2817 
2824  virtual int SetSolveLocation( const int &location);
2825 
2832  virtual int MoveData( const int &location);
2833 
2840  {
2841  return this->_gemslr_setups._solve_phase_setup;
2842  }
2843 
2844  };
2845 
2846  typedef ParallelGemslrClass<ParallelCsrMatrixClass<float>, ParallelVectorClass<float>, float> precond_gemslr_csr_par_float;
2847  typedef ParallelGemslrClass<ParallelCsrMatrixClass<double>, ParallelVectorClass<double>, double> precond_gemslr_csr_par_double;
2848  typedef ParallelGemslrClass<ParallelCsrMatrixClass<complexs>, ParallelVectorClass<complexs>, complexs> precond_gemslr_csr_par_complexs;
2849  typedef ParallelGemslrClass<ParallelCsrMatrixClass<complexd>, ParallelVectorClass<complexd>, complexd> precond_gemslr_csr_par_complexd;
2850 
2851 }
2852 
2853 #endif
pargemslr::ParallelGemslrClass::SolveApplyLowRankLevel
int SolveApplyLowRankLevel(VectorType &x, VectorType &rhs, int level)
Apply the low-rank update on a certain level.
Definition: parallel_gemslr.cpp:6249
pargemslr::ParallelGemslrClass::SetBNumLevels
int SetBNumLevels(int option)
Set the B part target number of levels of GeMSLR.
Definition: parallel_gemslr.hpp:1806
pargemslr::ParallelGemslrClass::SetSeperatorOption
int SetSeperatorOption(bool option)
Set the global separator option of GeMSLR.
Definition: parallel_gemslr.hpp:1904
pargemslr::ParallelGemslrClass::SetPartitionOption
int SetPartitionOption(int option)
Set the global partition option. 0: ND; 1: RKway.
Definition: parallel_gemslr.hpp:1732
pargemslr::ParallelGemslrSchurSolveClass::SetSolveLocation
virtual int SetSolveLocation(const int &location)
Set the data location that the preconditioner apply to.
Definition: parallel_gemslr.hpp:478
pargemslr::GemslrSetupStruct::_kfactor_setup
int _kfactor_setup
In the recursive Kway partition, from the second level, each time the number of terget subdomains is ...
Definition: gemslr.hpp:1346
pargemslr::ParallelGemslrClass::_lev_A
ParallelGemslrLevelClass< MatrixType, VectorType, DataType > _lev_A
The structure for the A level low-rank correction.
Definition: parallel_gemslr.hpp:974
pargemslr::ParallelGemslrLevelClass::_xlr1_temp_h
VectorType _xlr1_temp_h
Temp vector.
Definition: parallel_gemslr.hpp:703
pargemslr::ParallelGemslrClass::CMatVec
int CMatVec(int level, int option, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
The matvec with the C on the current level.
Definition: parallel_gemslr.cpp:7028
pargemslr::ParallelGemslrEBFCMatrixClass::Clear
int Clear()
Free the current matrix.
Definition: parallel_gemslr.cpp:102
pargemslr::ParallelGemslrClass::SetBSeperatorOption
int SetBSeperatorOption(bool option)
Set the B part separator option of GeMSLR.
Definition: parallel_gemslr.hpp:1917
pargemslr::ParallelGemslrClass::SetLowRankOptionTopLevel
int SetLowRankOptionTopLevel(int option)
Set the low-rank option on the top level. 0: Standard. 1: Thick-restart.
Definition: parallel_gemslr.hpp:1999
pargemslr::ParallelGemslrClass::SetupPermutation
int SetupPermutation()
Setup the permutation of the GeMSLR.
Definition: parallel_gemslr.cpp:1912
pargemslr::ParallelGemslrClass::SetupPermutationRKway
int SetupPermutationRKway(MatrixType &A, int nlev_setup, int &nlev_max, int &nlev_used, vector_int &map_v, vector_int &mapptr_v)
Setup the Recursive KWay partition of the GeMSLR.
Definition: parallel_gemslr.cpp:2366
pargemslr::GemslrSetupStruct::_inner_iters_maxits_setup
int _inner_iters_maxits_setup
The level of inner iteration. Solve Sx = b with preconditioned GMRES where GeMSLR is used as a precon...
Definition: gemslr.hpp:1432
pargemslr::GemslrSetupStruct::_nlev_B_setup
int _nlev_B_setup
The total number of levels user wants to have in the B part if GeMSLR is used.
Definition: gemslr.hpp:1378
pargemslr::ParallelGemslrSchurMatrixClass::GetMpiInfo
int GetMpiInfo(int &np, int &myid, MPI_Comm &comm) const
Get comm, np, and myid. Get the global one.
Definition: parallel_gemslr.hpp:326
pargemslr::ParallelGemslrClass::SetBIluDropTolC
int SetBIluDropTolC(T option)
Set the recursive GeMSLR last level threshold for ILUT of the global B part.
Definition: parallel_gemslr.hpp:2536
pargemslr::ParallelGemslrSchurMatrixClass::operator=
ParallelGemslrSchurMatrixClass< MatrixType, VectorType, DataType > & operator=(const ParallelGemslrSchurMatrixClass< MatrixType, VectorType, DataType > &precond)
The operator = of ParallelGemslrSchurMatrixClass.
Definition: parallel_gemslr.cpp:263
pargemslr::ParallelGemslrClass::SetupBSolveGemslr
int SetupBSolveGemslr(VectorType &x, VectorType &rhs, int level)
Setup the solve of B matrices of the GeMSLR with GeMSLR.
Definition: parallel_gemslr.cpp:3851
pargemslr::ParallelGemslrLevelClass::~ParallelGemslrLevelClass
~ParallelGemslrLevelClass()
The destructor of ParallelGemslrLevelClass.
Definition: parallel_gemslr.cpp:513
pargemslr::ParallelGemslrClass::SetIluDropTolEF
int SetIluDropTolEF(T option)
Set the threshold for ILUT of the EF part.
Definition: parallel_gemslr.hpp:2508
pargemslr::ParallelGemslrClass::SetupLowRankNoRestart
int SetupLowRankNoRestart(VectorType &x, VectorType &rhs, int level, int option)
Setup the low-rank part of the GeMSLR with arnodi no-restart.
Definition: parallel_gemslr.cpp:4363
pargemslr::ParallelGemslrSchurSolveClass::Solve
virtual int Solve(VectorType &x, VectorType &rhs)
Solve phase. Call this function after Setup. Solve with cusparse if unified memory/device memory is u...
Definition: parallel_gemslr.hpp:450
pargemslr::ParallelGemslrClass::Solve
virtual int Solve(VectorType &x, VectorType &rhs)
Solve phase. Call this function after Setup. Solve with cusparse if unified memory/device memory is u...
Definition: parallel_gemslr.cpp:5118
pargemslr::ParallelGemslrClass::SetLowRankFactorTopLevel
int SetLowRankFactorTopLevel(T option)
Set the low-rank factor on the top level. The actuall computed number of low-rank terms is rank * fac...
Definition: parallel_gemslr.hpp:2101
pargemslr::ParallelGemslrClass::SetGlobalPrecondOption
int SetGlobalPrecondOption(int option)
Set the global precond option. 0: BJ; 1: ISCHUR; 2: ESCHUR; 3: MLEV.
Definition: parallel_gemslr.hpp:1717
pargemslr::ParallelGemslrEBFCMatrixClass::GetNumRowsLocal
int GetNumRowsLocal()
Get the local number of rows of the matrix.
Definition: parallel_gemslr.cpp:151
pargemslr::ParallelGemslrLevelClass::_B_precond
SolverClass< CsrMatrixClass< DataType >, SequentialVectorClass< DataType >, DataType > ** _B_precond
The preconditioners for B matrix.
Definition: parallel_gemslr.hpp:591
pargemslr::DenseMatrixClass< DataType >
pargemslr::ParallelGemslrLevelClass::_pperm
IntVectorClass< int > _pperm
The row permutation vector.
Definition: parallel_gemslr.hpp:639
pargemslr::ParallelGemslrClass::SCMatVec
int SCMatVec(int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
The matvec function y = G*x = C\S*x-x. Note that alpha and beta are untouched.
Definition: parallel_gemslr.cpp:6550
pargemslr::ParallelGemslrClass::RAPEBFCMatVec
int RAPEBFCMatVec(int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
The matvec function y = G*x = (2EB^{-1}F + EB^{-1}BB^{-1}F)C^{-1}x. Note that alpha and beta are unto...
Definition: parallel_gemslr.cpp:6427
pargemslr::ParallelGemslrLevelClass
The GEMSLR information on each level, contains the solver for B and the low-rank information for S.
Definition: parallel_gemslr.hpp:516
pargemslr::ParallelGemslrClass::SetBLowRankRanksOtherLevels
int SetBLowRankRanksOtherLevels(T option)
Set the B part target number of low-rank terms on the other levels.
Definition: parallel_gemslr.hpp:2236
pargemslr::GemslrClass
The local real ilu preconditioner, only work for sequential CSR matrix.
Definition: structs.hpp:20
pargemslr::ParallelGemslrLevelClass::ParallelGemslrLevelClass
ParallelGemslrLevelClass()
The constructor of ParallelGemslrLevelClass, set everything to 0.
Definition: parallel_gemslr.cpp:500
pargemslr::ParallelGemslrClass::SetLocalGemslr
virtual int SetLocalGemslr(GemslrClass< CsrMatrixClass< DataType >, SequentialVectorClass< DataType >, DataType > &gemslr)
Setup with parameter array. This is the helper function to set the local gemslr for B solve.
Definition: parallel_gemslr.hpp:1434
pargemslr::ParallelGemslrLevelClass::_A_mat
MatrixType _A_mat
The A matrix on this level.
Definition: parallel_gemslr.hpp:561
pargemslr::ParallelGemslrClass::SetBLowRankRanksTopLevel
int SetBLowRankRanksTopLevel(T option)
Set the B part target number of low-rank terms on the top level.
Definition: parallel_gemslr.hpp:2221
pargemslr::ParallelGemslrClass::SolveLevelEsmslrU
int SolveLevelEsmslrU(VectorType &x_out, VectorType &rhs_in, int level, bool doperm)
Solve starting from a certain level.
pargemslr::ParallelGemslrClass::GetSolvePhase
int GetSolvePhase()
Get the solve phase.
Definition: parallel_gemslr.hpp:2839
pargemslr::GemslrSetupStruct
The GEMSLR options.
Definition: gemslr.hpp:1288
pargemslr::ParallelGemslrClass::SetIluFillLevelC
int SetIluFillLevelC(int option)
Set the fill level for ILUK of the last level.
Definition: parallel_gemslr.hpp:2633
pargemslr::ParallelGemslrClass::SetNumberSubdomainsReduceFactor
int SetNumberSubdomainsReduceFactor(int option)
Set the global reduce factor of subdomains on each level of GeMSLR.
Definition: parallel_gemslr.hpp:1876
pargemslr::ParallelGemslrLevelClass::_B_mat_v
std::vector< CsrMatrixClass< DataType > > _B_mat_v
The B matrix on this level. C matrix if this is the last level.
Definition: parallel_gemslr.hpp:543
pargemslr::ParallelGemslrClass::SetIluDropTolS
int SetIluDropTolS(T option)
Set the threshold for ILUT of the S part.
Definition: parallel_gemslr.hpp:2494
pargemslr::ParallelGemslrClass::SetLowerGemslr
virtual int SetLowerGemslr(ParallelGemslrClass< MatrixType, VectorType, DataType > &gemslr)
Setup with parameter array. This is the helper function to set the lower level gemslr for explicite S...
Definition: parallel_gemslr.hpp:1498
pargemslr::ParallelGemslrClass::PlotPatternGnuPlot
int PlotPatternGnuPlot(const char *datafilename)
Plot the pattern of the parallel gemslr using gnuplot. Similar to spy in the MATLAB....
Definition: parallel_gemslr.cpp:7394
pargemslr::ParallelGemslrSchurMatrixClass::_temp_v
VectorType _temp_v
Temp vector for the Arnoldi.
Definition: parallel_gemslr.hpp:234
pargemslr::ParallelGemslrEBFCMatrixClass::ParallelGemslrEBFCMatrixClass
ParallelGemslrEBFCMatrixClass()
The constructor of ParallelGemslrEBFCMatrixClass.
Definition: parallel_gemslr.cpp:20
pargemslr::ParallelGemslrClass::ParallelGemslrClass
ParallelGemslrClass()
The constructor of precondioner class.
Definition: parallel_gemslr.cpp:1062
pargemslr::ParallelGemslrClass::SetIluFillLevelB
int SetIluFillLevelB(int option)
Set the fill level for ILUK of the B part.
Definition: parallel_gemslr.hpp:2619
pargemslr::ParallelGemslrClass::operator=
ParallelGemslrClass< MatrixType, VectorType, DataType > & operator=(const ParallelGemslrClass< MatrixType, VectorType, DataType > &precond)
The operator = of ParallelGemslrClass.
Definition: parallel_gemslr.cpp:1145
pargemslr::GemslrSetupStruct::_level_setups
GemslrLevelSetupStruct< DataType > _level_setups
The global setup of low-rank correction on this level.
Definition: gemslr.hpp:1297
pargemslr::ParallelGemslrSchurMatrixClass
Class of matvec with the Schur Complement.
Definition: parallel_gemslr.hpp:205
pargemslr::ParallelGemslrClass::SetupLowRankThickRestart
int SetupLowRankThickRestart(VectorType &x, VectorType &rhs, int level, int option)
Setup the low-rank part of the GeMSLR with arnodi thick-restart.
Definition: parallel_gemslr.cpp:4502
pargemslr::ParallelGemslrEBFCMatrixClass::operator=
ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > & operator=(const ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > &precond)
The operator = of ParallelGemslrEBFCMatrixClass.
Definition: parallel_gemslr.cpp:71
pargemslr::ParallelGemslrClass::SetSmoothOptionB
int SetSmoothOptionB(int option)
Set all top levels smoother.
Definition: parallel_gemslr.hpp:2767
pargemslr::ParallelGemslrEBFCMatrixClass::GetMpiInfo
int GetMpiInfo(int &np, int &myid, MPI_Comm &comm) const
Get comm, np, and myid. Get the global one.
Definition: parallel_gemslr.hpp:162
pargemslr::ParallelGemslrSchurMatrixClass::ParallelGemslrSchurMatrixClass
ParallelGemslrSchurMatrixClass()
The constructor of ParallelGemslrSchurMatrixClass.
Definition: parallel_gemslr.cpp:212
pargemslr::ParallelGemslrClass::SetIluMaxRowNnzC
int SetIluMaxRowNnzC(int option)
Set the maxinum number of nonzeros ILUT of the last level.
Definition: parallel_gemslr.hpp:2563
pargemslr::ParallelGemslrEBFCMatrixClass::SetupVectorPtrStr
int SetupVectorPtrStr(VectorType &v)
Set the structure of a vector pointer that has same row partition as this matrix.
Definition: parallel_gemslr.cpp:139
pargemslr::ParallelGemslrLevelClass::_xlr2_temp
VectorType _xlr2_temp
Temp vector.
Definition: parallel_gemslr.hpp:697
pargemslr::ParallelGemslrClass::SetBLowRankThresholdTopLevel
int SetBLowRankThresholdTopLevel(T option)
Set B part max restarts of thick-restart Arnoldi on the top level.
Definition: parallel_gemslr.hpp:2438
pargemslr::GemslrSetupStruct::_perm_option_setup
int _perm_option_setup
Set the local B reordering option.
Definition: gemslr.hpp:1320
pargemslr::ParallelGemslrSchurSolveClass::Clear
virtual int Clear()
Free the current precondioner.
Definition: parallel_gemslr.hpp:369
pargemslr::ParallelGemslrLevelClass::_Wk
DenseMatrixClass< DataType > _Wk
The W matrix for the low-rank correction W*H*W' on this level.
Definition: parallel_gemslr.hpp:609
pargemslr::ParallelGemslrClass::SetLowRankArnoldiFactorOtherLevels
int SetLowRankArnoldiFactorOtherLevels(T option)
Set the Arnoldi factor on other levels. m steps for arnoldi is rank * rank_factor * arnoldi_factor.
Definition: parallel_gemslr.hpp:2266
pargemslr::ParallelGemslrSchurMatrixClass::SetupVectorPtrStr
int SetupVectorPtrStr(VectorType &v)
Set the structure of a vector pointer that has same row partition as this matrix.
Definition: parallel_gemslr.cpp:325
pargemslr::ParallelGemslrClass::SetLowRankArnoldiFactorA
int SetLowRankArnoldiFactorA(T option)
Set the Arnoldi factor on A. m steps for arnoldi is rank * rank_factor * arnoldi_factor.
Definition: parallel_gemslr.hpp:2281
pargemslr::ParallelGemslrClass::~ParallelGemslrClass
virtual ~ParallelGemslrClass()
The destructor of precondioner class.
Definition: parallel_gemslr.cpp:1219
pargemslr::ParallelGemslrClass::SetBMinimalNumberSubdomains
int SetBMinimalNumberSubdomains(int option)
Set the B part minimal number of subdomains on each level of GeMSLR.
Definition: parallel_gemslr.hpp:1862
pargemslr::ParallelGemslrClass::SetBLowRankOptionOtherLevels
int SetBLowRankOptionOtherLevels(int option)
Set the B part low-rank option on other levels. 0: Standard. 1: Thick-restart.
Definition: parallel_gemslr.hpp:2059
pargemslr::FlexGmresClass
The real flexgmres solver class.
Definition: fgmres.hpp:29
pargemslr::ParallelGemslrSchurSolveClass::MoveData
virtual int MoveData(const int &location)
Move the preconditioner to another location. Only can be called after Setup.
Definition: parallel_gemslr.hpp:486
pargemslr::ParallelGemslrLevelClass::_sol_temp
VectorType _sol_temp
The temp vector for permuted x.
Definition: parallel_gemslr.hpp:715
pargemslr::ParallelGemslrClass::SetLowRankOptionA
int SetLowRankOptionA(int option)
Set the low-rank option on A. 0: Standard. 1: Thick-restart.
Definition: parallel_gemslr.hpp:2029
pargemslr::GemslrSetupStruct::_vertexsep_setup
bool _vertexsep_setup
Set to true to use vertex seperator. Note that k must be power of 2 for vertex seperator.
Definition: gemslr.hpp:1352
pargemslr::ParallelGemslrClass::SolveLevelEsmslr
int SolveLevelEsmslr(VectorType &x_out, VectorType &rhs_in, int level, bool doperm)
Solve starting from a certain level.
Definition: parallel_gemslr.cpp:5680
pargemslr::ParallelGemslrClass::SetLowRankThresholdTopLevel
int SetLowRankThresholdTopLevel(T option)
Set max restarts of thick-restart Arnoldi on the top level.
Definition: parallel_gemslr.hpp:2396
pargemslr::ParallelGemslrSchurMatrixClass::~ParallelGemslrSchurMatrixClass
virtual ~ParallelGemslrSchurMatrixClass()
The destructor of GemslrEBFCMatrixClass.
Definition: parallel_gemslr.cpp:224
pargemslr::ParallelGemslrLevelClass::_rhs2_temp
VectorType _rhs2_temp
The temp vector for permuted rhs.
Definition: parallel_gemslr.hpp:733
pargemslr::ParallelGemslrClass::SetupPermutationBuildLevelStructure
int SetupPermutationBuildLevelStructure(MatrixType &A, int level_start, vector_int &map_v, vector_int &mapptr_v)
Setup the level structure of the GeMSLR.
Definition: parallel_gemslr.cpp:2496
pargemslr::ParallelGemslrClass::SetPreconditionerOption1Levels
int SetPreconditionerOption1Levels(int option)
Set top level preconditioner apply levels.
Definition: parallel_gemslr.hpp:2720
pargemslr::ParallelGemslrClass::MoveData
virtual int MoveData(const int &location)
Move the preconditioner to another location. Only can be called after Setup.
Definition: parallel_gemslr.cpp:7279
pargemslr::ParallelGemslrClass::CheckParameters
int CheckParameters()
Check the input parameters, avoid invalid settings.
Definition: parallel_gemslr.cpp:1440
pargemslr::ParallelGemslrClass::PCLRMatVec
int PCLRMatVec(int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
The matvec function y = (EsC^{-1})^m*x. Note that alpha and beta are untouched.
Definition: parallel_gemslr.cpp:6690
pargemslr::ParallelGemslrClass::SetLowRankRandomInitGuess
int SetLowRankRandomInitGuess(bool option)
Set if we use random initial guess for Arnoldi. Otherwise we use 1 as initial guess.
Definition: parallel_gemslr.hpp:2074
gemslr.hpp
Sequential GeMSLR preconditioner.
pargemslr::ParallelGemslrLevelClass::_cHk
DenseMatrixClass< DataType > _cHk
The H matrix for the low-rank correction W*H*W' on the last level.
Definition: parallel_gemslr.hpp:621
pargemslr::ParallelGemslrLevelClass::_EBFC
ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > _EBFC
The EBFC matrix on this level.
Definition: parallel_gemslr.hpp:585
pargemslr::ParallelGemslrClass::SetInnerIterationThreshold
int SetInnerIterationThreshold(T option)
Set the stop threshold of inner iteration of GeMSLR.
Definition: parallel_gemslr.hpp:1957
pargemslr::ParallelGemslrEBFCMatrixClass::GetDataLocation
int GetDataLocation() const
Get the data location of the matrix.
Definition: parallel_gemslr.hpp:183
pargemslr::ParallelGemslrClass::SetBLowRankArnoldiFactorTopLevel
int SetBLowRankArnoldiFactorTopLevel(T option)
Set the B part Arnoldi factor on the top level. m steps for arnoldi is rank * rank_factor * arnoldi_f...
Definition: parallel_gemslr.hpp:2296
pargemslr::ParallelGemslrClass::Clear
virtual int Clear()
Free the current precondioner.
Definition: parallel_gemslr.cpp:1229
pargemslr::ParallelGemslrClass::SetWithParameterArray
virtual int SetWithParameterArray(double *params)
Setup with parameter array.
Definition: parallel_gemslr.hpp:1595
pargemslr::GemslrSetupStruct::_perm_option_B_setup
int _perm_option_B_setup
Set the local B reordering option. For B part is GeMSLR is used.
Definition: gemslr.hpp:1372
pargemslr::ParallelGemslrClass::SetBLowRankFactorTopLevel
int SetBLowRankFactorTopLevel(T option)
Set the B part low-rank factor on the top level. The actuall computed number of low-rank terms is ran...
Definition: parallel_gemslr.hpp:2146
pargemslr::ParallelGemslrLevelClass::_xlr2_temp_h
VectorType _xlr2_temp_h
Temp vector.
Definition: parallel_gemslr.hpp:709
pargemslr::ParallelGemslrClass::SolveB
int SolveB(VectorType &x, VectorType &rhs, int option, int level)
Solve with B on a certain level.
Definition: parallel_gemslr.cpp:6072
pargemslr::ParallelGemslrClass::SetupBSolve
int SetupBSolve(VectorType &x, VectorType &rhs)
Setup the solve of B matrices of the GeMSLR.
Definition: parallel_gemslr.cpp:3540
pargemslr::ParallelGemslrLevelClass::_B_solver
SolverClass< CsrMatrixClass< DataType >, SequentialVectorClass< DataType >, DataType > ** _B_solver
The solvers for B matrix.
Definition: parallel_gemslr.hpp:597
pargemslr::ParallelGemslrClass::SetPreconditionerOption1
int SetPreconditionerOption1(int option)
Set top level preconditioner.
Definition: parallel_gemslr.hpp:2704
pargemslr::ParallelGemslrClass::SetIluComplexShift
int SetIluComplexShift(bool complex_shift)
Set if we turn on the complex shift or not (complex version only).
Definition: parallel_gemslr.hpp:2811
pargemslr::ParallelVectorClass
The class of parallel real/complex vector.
Definition: structs.hpp:14
pargemslr::ParallelGemslrClass::SolveLevelEsmslrMul
int SolveLevelEsmslrMul(VectorType &x_out, VectorType &rhs_in, int level, bool doperm)
Solve starting from a certain level.
pargemslr::SequentialVectorClass< DataType >
pargemslr::GemslrSetupStruct::_inner_iters_tol_setup
std::conditional< PargemslrIsDoublePrecision< DataType >::value, double, float >::type _inner_iters_tol_setup
The default convergence_tolorance to lock the eigenvalue.
Definition: gemslr.hpp:1440
pargemslr::ParallelGemslrClass::GetNumNonzeros
virtual long int GetNumNonzeros()
Get the total number of nonzeros the ILU.
Definition: parallel_gemslr.cpp:7219
pargemslr::ParallelGemslrClass::SetNumSubdomains
int SetNumSubdomains(int option)
Set the global target number of subdomains on each level of GeMSLR.
Definition: parallel_gemslr.hpp:1820
pargemslr::ParallelGemslrLevelClass::_rhs_temp
VectorType _rhs_temp
The temp vector for permuted rhs.
Definition: parallel_gemslr.hpp:721
pargemslr::ParallelGemslrClass::SetLowRankThresholdA
int SetLowRankThresholdA(T option)
Set max restarts of thick-restart Arnoldi on A.
Definition: parallel_gemslr.hpp:2424
pargemslr::ParallelGemslrClass::SetupPermutationND
int SetupPermutationND(MatrixType &A, int nlev_setup, int &nlev_max, int &nlev_used, vector_int &map_v, vector_int &mapptr_v)
Setup the Nested Dissection partition of the GeMSLR.
Definition: parallel_gemslr.cpp:2439
pargemslr::ParallelGemslrClass::SolveLevelGemslrU
int SolveLevelGemslrU(VectorType &x_out, VectorType &rhs_in, int level, bool doperm)
Solve starting from a certain level.
pargemslr::CommunicationHelperClass
The data structure for parallel matvec helper, store communication inforamtion for parallel matvec,...
Definition: parallel_csr_matrix.hpp:27
pargemslr::ParallelGemslrLevelClass::_sol2_temp
VectorType _sol2_temp
The temp vector for permuted x.
Definition: parallel_gemslr.hpp:727
pargemslr::ParallelGemslrClass::SetBLowRankMaxNumberIterationsTopLevel
int SetBLowRankMaxNumberIterationsTopLevel(int option)
Set B part max restarts of thick-restart Arnoldi on the top level.
Definition: parallel_gemslr.hpp:2367
pargemslr::GemslrSetupStruct::_vertexsep_B_setup
bool _vertexsep_B_setup
Set to true to use vertex seperator. Note that k must be power of 2 for vertex seperator....
Definition: gemslr.hpp:1404
pargemslr::ParallelGemslrClass::_global_precond_option
int _global_precond_option
The Schur complement option.
Definition: parallel_gemslr.hpp:952
pargemslr::ParallelGemslrClass::SetInnerIterationMaxNumberIterations
int SetInnerIterationMaxNumberIterations(int option)
Set the max number of iterations of inner iteration of GeMSLR.
Definition: parallel_gemslr.hpp:1970
pargemslr::ParallelGemslrSchurMatrixClass::MatVec
int MatVec(char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
In place csr Matrix-Vector product ==> y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y.
Definition: parallel_gemslr.cpp:337
pargemslr::ParallelGemslrClass::SetBPermutationOption
int SetBPermutationOption(int option)
Set the B part permutation option. 0: No; 1: RCM; 2: AMD.
Definition: parallel_gemslr.hpp:1777
pargemslr::ParallelGemslrLevelClass::_parlog
parallel_log _parlog
The parallel log data structure.
Definition: parallel_gemslr.hpp:523
pargemslr::ParallelGemslrLevelClass::operator=
ParallelGemslrLevelClass< MatrixType, VectorType, DataType > & operator=(const ParallelGemslrLevelClass< MatrixType, VectorType, DataType > &str)
The operator= of ParallelGemslrLevelClass.
Definition: parallel_gemslr.cpp:732
pargemslr::ParallelGemslrSchurMatrixClass::Setup
int Setup(int level, int option, ParallelGemslrClass< MatrixType, VectorType, DataType > &gemslr)
Set the current matrix to a certain GEMSLR level.
Definition: parallel_gemslr.cpp:308
pargemslr::ParallelGemslrClass::SetupBSolveILUK
int SetupBSolveILUK(VectorType &x, VectorType &rhs, int level)
Setup the solve of B matrices of the GeMSLR with ILUK.
Definition: parallel_gemslr.cpp:3780
pargemslr::ParallelGemslrClass::SetSolveOption
int SetSolveOption(int option)
Set the solve option. 0: additive LU solve; 1: additive L solve; 2: multi-solve.
Definition: parallel_gemslr.hpp:1984
pargemslr::ParallelGemslrClass::SetPreconditionerOptionB
int SetPreconditionerOptionB(int option)
Set all top levels preconditioner.
Definition: parallel_gemslr.hpp:2750
pargemslr::ParallelGemslrClass::SolveLevelPslr
int SolveLevelPslr(VectorType &x_out, VectorType &rhs_in, int level, bool doperm)
Solve starting from a certain level.
Definition: parallel_gemslr.cpp:6062
pargemslr::ParallelGemslrSchurMatrixClass::GetComm
MPI_Comm GetComm() const
Get the MPI_comm.
Definition: parallel_gemslr.hpp:337
pargemslr::GemslrSetupStruct::_ncomp_B_setup
int _ncomp_B_setup
The target number of subdomians on each level in the B part if GeMSLR is used.
Definition: gemslr.hpp:1384
pargemslr::ParallelGemslrLevelClass::_rhs3_temp
VectorType _rhs3_temp
The temp vector for permuted rhs for the upper level.
Definition: parallel_gemslr.hpp:745
pargemslr::ParallelGemslrClass::SetInnerIterationOption
int SetInnerIterationOption(bool option)
Set the inner iteration option of GeMSLR.
Definition: parallel_gemslr.hpp:1943
pargemslr::ParallelGemslrClass::SetPreconditionerOptionC
int SetPreconditionerOptionC(int option)
Set last level preconditioner.
Definition: parallel_gemslr.hpp:2783
pargemslr::ParallelGemslrClass::SetPolyOrder
int SetPolyOrder(int option)
Set poly order for Poly solve of the B part.
Definition: parallel_gemslr.hpp:2675
pargemslr::ParallelGemslrEBFCMatrixClass::~ParallelGemslrEBFCMatrixClass
virtual ~ParallelGemslrEBFCMatrixClass()
The destructor of ParallelGemslrEBFCMatrixClass.
Definition: parallel_gemslr.cpp:32
pargemslr::ParallelGemslrLevelClass::_lrc
int _lrc
The size of low-rank correction on this level.
Definition: parallel_gemslr.hpp:531
pargemslr::ParallelGemslrLevelClass::_S_mat
MatrixType _S_mat
The S matrix on this level.
Definition: parallel_gemslr.hpp:573
pargemslr::SolverClass::_ready
bool _ready
If the solver is ready.
Definition: solver.hpp:108
pargemslr::SolverClass
The base solver class.
Definition: solver.hpp:47
pargemslr::ComplexValueClass
The template class complex.
Definition: complex.hpp:24
pargemslr::ParallelGemslrClass::EBFCMatVec
int EBFCMatVec(int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
The matvec function y = G*x = I - Ci*(Ci\x) + Ei*(UBi(LBi(Fi*(Ci\x). Note that alpha and beta are unt...
Definition: parallel_gemslr.cpp:6329
pargemslr::ParallelGemslrClass::SetLowRankA
int SetLowRankA(T option)
Set the target number of low-rank terms for A.
Definition: parallel_gemslr.hpp:2206
pargemslr::IntVectorClass< int >
pargemslr::ParallelGemslrLevelClass::_qperm
IntVectorClass< int > _qperm
The column permutation vector.
Definition: parallel_gemslr.hpp:646
pargemslr::ParallelGemslrClass::SetLowRankArnoldiFactorTopLevel
int SetLowRankArnoldiFactorTopLevel(T option)
Set the Arnoldi factor on the top level. m steps for arnoldi is rank * rank_factor * arnoldi_factor.
Definition: parallel_gemslr.hpp:2251
pargemslr::ParallelGemslrLevelClass::_C_mat
MatrixType _C_mat
The C matrix on this level.
Definition: parallel_gemslr.hpp:567
pargemslr::GemslrSetupStruct::_solve_option_setup
int _solve_option_setup
The GEMSLR options.
Definition: gemslr.hpp:1446
pargemslr::ParallelGemslrLevelClass::_E_mat
MatrixType _E_mat
The E matrix on this level.
Definition: parallel_gemslr.hpp:549
pargemslr::ParallelGemslrClass::SetIluResidualIters
int SetIluResidualIters(int residual_iters)
Set the number of residual iterations of B solves in the setup phase. Set to <= 1 to turn off.
Definition: parallel_gemslr.hpp:2798
pargemslr::GemslrSetupStruct::_solve_phase_setup
int _solve_phase_setup
Set the solve phase of the preconditioner.
Definition: gemslr.hpp:1412
pargemslr::ParallelGemslrClass::SolveLevelGemslrMul
int SolveLevelGemslrMul(VectorType &x_out, VectorType &rhs_in, int level, bool doperm)
Solve starting from a certain level.
Definition: parallel_gemslr.cpp:5438
pargemslr::ParallelGemslrClass::GetNumRows
int GetNumRows(int level)
Get the local number of rows on certain level for the low-rank part.
Definition: parallel_gemslr.cpp:6314
pargemslr::ParallelGemslrSchurSolveClass::ParallelGemslrSchurSolveClass
ParallelGemslrSchurSolveClass()
The constructor of precondioner class.
Definition: parallel_gemslr.hpp:362
pargemslr::ParallelGemslrClass::SetGlobalPartitionOption
int SetGlobalPartitionOption(bool option)
Set the global partition option of GeMSLR.
Definition: parallel_gemslr.hpp:1930
pargemslr::ParallelGemslrLevelClass::_xlr1_temp
VectorType _xlr1_temp
Temp vector.
Definition: parallel_gemslr.hpp:691
pargemslr::ParallelGemslrLevelClass::_nI
int _nI
Number of interior nodes on the top level.
Definition: parallel_gemslr.hpp:579
pargemslr::ParallelGemslrClass::SetBIluMaxRowNnzB
int SetBIluMaxRowNnzB(int option)
Set the recursive GeMSLR B part maxinum number of nonzeros ILUT.
Definition: parallel_gemslr.hpp:2591
pargemslr::ParallelGemslrLevelClass::_x_temp
VectorType _x_temp
Temp vector, length equal to the size of this level, used to setup the Ptr for this level.
Definition: parallel_gemslr.hpp:679
pargemslr::SolverClass::_print_option
int _print_option
The print option.
Definition: solver.hpp:114
pargemslr::ParallelGemslrEBFCMatrixClass
Class of matvec for low-rank correction, not necessarily EB^{-1}FC^{-1}.
Definition: parallel_gemslr.hpp:35
pargemslr::ParallelGemslrLevelClass::_work_vector
SequentialVectorClass< DataType > _work_vector
Temp vector on this level.
Definition: parallel_gemslr.hpp:658
pargemslr::ParallelGemslrClass::SetupLowRankBuildLowRank
int SetupLowRankBuildLowRank(VectorType &x, VectorType &rhs, DenseMatrixClass< DataType > &V, DenseMatrixClass< DataType > &H, int m, int rank, int level, int option)
Given the V and H from Arnoldi, compute the final low-rank correction of S^{-1} - C^{-1}.
Definition: parallel_gemslr.cpp:4829
pargemslr::ParallelGemslrSchurSolveClass::operator=
ParallelGemslrSchurSolveClass< MatrixType, VectorType, DataType > & operator=(ParallelGemslrSchurSolveClass< MatrixType, VectorType, DataType > &&precond)
The operator = of ParallelGemslrSchurSolveClass class.
Definition: parallel_gemslr.hpp:404
pargemslr::GemslrSetupStruct::_enable_inner_iters_setup
bool _enable_inner_iters_setup
The level of inner iteration. Solve Sx = b with preconditioned GMRES where GeMSLR is used as a precon...
Definition: gemslr.hpp:1425
pargemslr::ParallelGemslrClass::SetPreconditionerOption2
int SetPreconditionerOption2(int option)
Set mid level preconditioner.
Definition: parallel_gemslr.hpp:2734
pargemslr::parallel_log
class pargemslr::ParallelLogClass parallel_log
The data structure for parallel computing, including data structures for MPI and CUDA.
pargemslr::ParallelGemslrClass::RAPMatVec
int RAPMatVec(int level, int option, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
The matvec with the Schur Complement via RAP.
Definition: parallel_gemslr.cpp:6921
pargemslr::ParallelGemslrSchurSolveClass::ParallelGemslrSchurSolveClass
ParallelGemslrSchurSolveClass(ParallelGemslrSchurSolveClass< MatrixType, VectorType, DataType > &&precond)
The move constructor of ParallelGemslrSchurSolveClass class.
Definition: parallel_gemslr.hpp:384
pargemslr::ParallelGemslrClass::SetBLowRankFactorOtherLevels
int SetBLowRankFactorOtherLevels(T option)
Set the B part low-rank factor on the other levels. The actuall computed number of low-rank terms is ...
Definition: parallel_gemslr.hpp:2161
pargemslr::ParallelGemslrClass::SetupPartialILUT
int SetupPartialILUT(VectorType &x, VectorType &rhs)
Setup the local partial ILUT.
Definition: parallel_gemslr.cpp:7827
pargemslr::ParallelGemslrLevelClass::_work_vector_unit_length
int _work_vector_unit_length
The unit length of the work vector.
Definition: parallel_gemslr.hpp:664
pargemslr::ParallelGemslrEBFCMatrixClass::GetNumColsLocal
int GetNumColsLocal()
Get the local number of columns of the matrix.
Definition: parallel_gemslr.cpp:162
pargemslr::ParallelGemslrClass::GetSize
int GetSize()
Get the size of the problem.
Definition: parallel_gemslr.cpp:7209
pargemslr::ParallelGemslrClass::SetPermutationOption
int SetPermutationOption(int option)
Set the global permutation option. 0: No; 1: RCM; 2: AMD.
Definition: parallel_gemslr.hpp:1762
pargemslr::ParallelGemslrLevelClass::_comm_helper
CommunicationHelperClass _comm_helper
The communication helper.
Definition: parallel_gemslr.hpp:652
pargemslr::GemslrSetupStruct::_partition_option_B_setup
int _partition_option_B_setup
Set the partition option. For B part is GeMSLR is used.
Definition: gemslr.hpp:1366
pargemslr::ParallelGemslrClass::SetLowRankFactorA
int SetLowRankFactorA(T option)
Set the low-rank factor on A. The actuall computed number of low-rank terms is rank * factor >= rank.
Definition: parallel_gemslr.hpp:2131
pargemslr::ParallelGemslrClass::SetIluMaxRowNnzS
int SetIluMaxRowNnzS(int option)
Set the maxinum number of nonzeros ILUT of the S part.
Definition: parallel_gemslr.hpp:2577
pargemslr::ParallelGemslrSchurMatrixClass::Clear
int Clear()
Free the current matrix.
Definition: parallel_gemslr.cpp:294
pargemslr::ParallelGemslrClass::SetLowRankMaxNumberIterationsA
int SetLowRankMaxNumberIterationsA(int option)
Set max restarts of thick-restart Arnoldi on A.
Definition: parallel_gemslr.hpp:2353
pargemslr::ParallelGemslrClass::SetBLowRankArnoldiFactorOtherLevels
int SetBLowRankArnoldiFactorOtherLevels(T option)
Set the B part Arnoldi factor on other levels. m steps for arnoldi is rank * rank_factor * arnoldi_fa...
Definition: parallel_gemslr.hpp:2311
pargemslr::ParallelGemslrClass::BMatVec
int BMatVec(int level, int option, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
The matvec with the B on the current level.
Definition: parallel_gemslr.cpp:7159
pargemslr::ParallelGemslrEBFCMatrixClass::MatVec
int MatVec(char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
In place csr Matrix-Vector product ==> y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y.
Definition: parallel_gemslr.cpp:173
pargemslr::ParallelGemslrClass::ACMatVec
int ACMatVec(int level, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
The matvec function y = x-A*M^{-1}*x. Note that alpha and beta are untouched.
Definition: parallel_gemslr.cpp:6618
pargemslr::ParallelGemslrLevelClass::_cWHk
DenseMatrixClass< DataType > _cWHk
The WH matrix for the low-rank correction (W*H)*W' on the last level.
Definition: parallel_gemslr.hpp:633
pargemslr::ParallelGemslrClass::SetLowRankFactorOtherLevels
int SetLowRankFactorOtherLevels(T option)
Set the low-rank factor on the other levels. The actuall computed number of low-rank terms is rank * ...
Definition: parallel_gemslr.hpp:2116
pargemslr::ParallelGemslrClass::SetLowRankMaxNumberIterationsOtherLevels
int SetLowRankMaxNumberIterationsOtherLevels(int option)
Set max restarts of thick-restart Arnoldi on other levels.
Definition: parallel_gemslr.hpp:2339
pargemslr::GemslrSetupStruct::_nlev_setup
int _nlev_setup
The total number of levels user wants to have.
Definition: gemslr.hpp:1326
pargemslr::GemslrSetupStruct::_kmin_B_setup
int _kmin_B_setup
The minimal number of subdomains user wants on each level in the recursive Kway partition in the B pa...
Definition: gemslr.hpp:1390
pargemslr::ParallelGemslrLevelClass::_sol3_temp
VectorType _sol3_temp
The temp vector for permuted x for the upper level.
Definition: parallel_gemslr.hpp:739
pargemslr::ParallelGemslrClass::SetLowRankRanksTopLevel
int SetLowRankRanksTopLevel(T option)
Set the target number of low-rank terms on the top level.
Definition: parallel_gemslr.hpp:2176
pargemslr::GemslrSetupStruct::_diag_shift_milu
DataType _diag_shift_milu
The diagonal shift for the modified ILU.
Definition: gemslr.hpp:1458
pargemslr::ParallelGemslrSchurSolveClass::ParallelGemslrSchurSolveClass
ParallelGemslrSchurSolveClass(ParallelGemslrSchurSolveClass< MatrixType, VectorType, DataType > &precond)
The move constructor of ParallelGemslrSchurSolveClass class.
Definition: parallel_gemslr.hpp:375
pargemslr::ParallelGemslrClass::SetIluDropTolB
int SetIluDropTolB(T option)
Set the threshold for ILUT of the B part.
Definition: parallel_gemslr.hpp:2466
pargemslr::SolverClass::_matrix
MatrixType * _matrix
The matrix.
Definition: solver.hpp:72
pargemslr::ParallelGemslrClass::SetLowRankThresholdOtherLevels
int SetLowRankThresholdOtherLevels(T option)
Set max restarts of thick-restart Arnoldi on other levels.
Definition: parallel_gemslr.hpp:2410
pargemslr::ParallelGemslrClass::SetBLowRankRandomInitGuess
int SetBLowRankRandomInitGuess(bool option)
Set if we use random initial guess for Arnoldi in the B part. Otherwise we use 1 as initial guess.
Definition: parallel_gemslr.hpp:2087
pargemslr::ParallelGemslrClass::SetLowRankRanksOtherLevels
int SetLowRankRanksOtherLevels(T option)
Set the target number of low-rank terms on the other levels.
Definition: parallel_gemslr.hpp:2191
pargemslr::ParallelGemslrClass::SetBIluDropTolB
int SetBIluDropTolB(T option)
Set the recursive GeMSLR B part threshold for ILUT of the global B part.
Definition: parallel_gemslr.hpp:2522
pargemslr::ParallelGemslrClass::SetBIluMaxRowNnzC
int SetBIluMaxRowNnzC(int option)
Set the recursive GeMSLR last level maxinum number of nonzeros ILUT.
Definition: parallel_gemslr.hpp:2605
pargemslr::ParallelGemslrClass::SetSolveLocation
virtual int SetSolveLocation(const int &location)
Set the data location that the preconditioner apply to.
Definition: parallel_gemslr.cpp:7261
pargemslr::ParallelGemslrClass::SetLowRankMaxNumberIterationsTopLevel
int SetLowRankMaxNumberIterationsTopLevel(int option)
Set max restarts of thick-restart Arnoldi on the top level.
Definition: parallel_gemslr.hpp:2325
pargemslr::ParallelGemslrClass::SetBLowRankThresholdOtherLevels
int SetBLowRankThresholdOtherLevels(T option)
Set B part max restarts of thick-restart Arnoldi on other levels.
Definition: parallel_gemslr.hpp:2452
pargemslr::ParallelGemslrClass::SetNumLevels
int SetNumLevels(int option)
Set the global target number of levels of GeMSLR.
Definition: parallel_gemslr.hpp:1792
pargemslr::ParallelGemslrEBFCMatrixClass::Setup
int Setup(int level, int option, ParallelGemslrClass< MatrixType, VectorType, DataType > &gemslr)
Set the current matrix to a certain GEMSLR level.
Definition: parallel_gemslr.cpp:116
pargemslr::GemslrSetupStruct::_kmin_setup
int _kmin_setup
The minimal number of subdomains user wants on each level in the recursive Kway partition.
Definition: gemslr.hpp:1338
pargemslr::ParallelGemslrSchurSolveClass::GetNumNonzeros
virtual long int GetNumNonzeros()
Get the total number of nonzeros the preconditioner.
Definition: parallel_gemslr.hpp:470
pargemslr::ParallelGemslrEBFCMatrixClass::GetComm
MPI_Comm GetComm() const
Get the MPI_comm.
Definition: parallel_gemslr.hpp:173
pargemslr::ParallelGemslrLevelClass::_ncomps
int _ncomps
Number of subdomains on this level.
Definition: parallel_gemslr.hpp:537
pargemslr::GemslrSetupStruct::_global_partition_setup
bool _global_partition_setup
Set to true to use vertex seperator. Note that k must be power of 2 for vertex seperator.
Definition: gemslr.hpp:1358
pargemslr::ParallelGemslrClass::SetBLowRankMaxNumberIterationsOtherLevels
int SetBLowRankMaxNumberIterationsOtherLevels(int option)
Set B part max restarts of thick-restart Arnoldi on other levels.
Definition: parallel_gemslr.hpp:2381
pargemslr::ParallelGemslrClass::SetBNumSubdomains
int SetBNumSubdomains(int option)
Set the B part target number of subdomains on each level of GeMSLR.
Definition: parallel_gemslr.hpp:1834
pargemslr::ParallelGemslrClass::SetIluMaxRowNnzB
int SetIluMaxRowNnzB(int option)
Set the maxinum number of nonzeros for ILUT of the B part.
Definition: parallel_gemslr.hpp:2549
pargemslr::ParallelGemslrSchurSolveClass::operator=
ParallelGemslrSchurSolveClass< MatrixType, VectorType, DataType > & operator=(const ParallelGemslrSchurSolveClass< MatrixType, VectorType, DataType > &precond)
The operator = of ParallelGemslrSchurSolveClass class.
Definition: parallel_gemslr.hpp:393
pargemslr::ParallelGemslrSchurMatrixClass::Solve
int Solve(VectorType &x, VectorType &rhs)
Solve phase. Call this function after Setup. Solve with cusparse if unified memory/device memory is u...
Definition: parallel_gemslr.cpp:368
pargemslr::ParallelGemslrLevelClass::GetNumNonzeros
int GetNumNonzeros(long int &nnz_bsolver, long int &nnz_lr)
Get the number of nonzeros in the low-rank correction and the ILU factorization on this level.
Definition: parallel_gemslr.cpp:1020
pargemslr::GemslrSetupStruct::_kfactor_B_setup
int _kfactor_B_setup
In the recursive Kway partition, from the second level, each time the number of terget subdomains is ...
Definition: gemslr.hpp:1398
pargemslr::ParallelGemslrClass::SetBIluFillLevelB
int SetBIluFillLevelB(int option)
Set the fill level for ILUK of the B part.
Definition: parallel_gemslr.hpp:2647
pargemslr::ParallelGemslrClass::SetBLowRankOptionTopLevel
int SetBLowRankOptionTopLevel(int option)
Set the B part low-rank option on the top level. 0: Standard. 1: Thick-restart.
Definition: parallel_gemslr.hpp:2044
pargemslr::ParallelGemslrClass::SetBNumberSubdomainsReduceFactor
int SetBNumberSubdomainsReduceFactor(int option)
Set the B part reduce factor of subdomains on each level of GeMSLR.
Definition: parallel_gemslr.hpp:1890
pargemslr::GemslrSetupStruct::_partition_option_setup
int _partition_option_setup
Set the partition option.
Definition: gemslr.hpp:1312
pargemslr::ParallelGemslrLevelClass::_cWk
DenseMatrixClass< DataType > _cWk
The W matrix for the low-rank correction W*H*W' on the last level.
Definition: parallel_gemslr.hpp:627
pargemslr::ParallelGemslrClass::SolveLevelGemslr
int SolveLevelGemslr(VectorType &x_out, VectorType &rhs_in, int level, bool doperm)
Solve starting from a certain level.
Definition: parallel_gemslr.cpp:5185
pargemslr::ParallelGemslrClass
The local real ilu preconditioner, only work for sequential CSR matrix.
Definition: parallel_gemslr.hpp:26
pargemslr::ParallelGemslrSchurSolveClass::SetWithParameterArray
virtual int SetWithParameterArray(double *params)
Setup with parameter array.
Definition: parallel_gemslr.hpp:496
pargemslr::ParallelGemslrClass::SetupLowRank
int SetupLowRank(VectorType &x, VectorType &rhs)
Setup the low-rank part of the GeMSLR.
Definition: parallel_gemslr.cpp:3902
pargemslr::CsrMatrixClass< DataType >
pargemslr::ParallelGemslrLevelClass::_xlr_temp
VectorType _xlr_temp
Temp vector.
Definition: parallel_gemslr.hpp:685
pargemslr::ParallelGemslrClass::SetBPolyOrder
int SetBPolyOrder(int option)
Set poly order for Poly solve of the B part of the recursive GeMSLR.
Definition: parallel_gemslr.hpp:2689
pargemslr::ParallelGemslrLevelClass::_WHk
DenseMatrixClass< DataType > _WHk
The WH matrix for the low-rank correction (W*H)*W' on this level.
Definition: parallel_gemslr.hpp:615
pargemslr::ParallelGemslrEBFCMatrixClass::_temp_v
VectorType _temp_v
Temp vector for the Arnoldi.
Definition: parallel_gemslr.hpp:65
pargemslr::ParallelGemslrLevelClass::_Hk
DenseMatrixClass< DataType > _Hk
The H matrix for the low-rank correction W*H*W' on this level.
Definition: parallel_gemslr.hpp:603
pargemslr::ParallelGemslrLevelClass::Clear
int Clear()
Free the current level structure, set everything to 0.
Definition: parallel_gemslr.cpp:947
pargemslr::GemslrSetupStruct::_ncomp_setup
int _ncomp_setup
The target number of subdomians on each level.
Definition: gemslr.hpp:1332
pargemslr::ParallelGemslrClass::SetBPartitionOption
int SetBPartitionOption(int option)
Set the B part partition option. 0: ND; 1: RKway.
Definition: parallel_gemslr.hpp:1747
pargemslr::ParallelGemslrClass::_levs_v
std::vector< ParallelGemslrLevelClass< MatrixType, VectorType, DataType > > _levs_v
Vector holding the level struct for all levels starting from the second level. The size of this vecto...
Definition: parallel_gemslr.hpp:968
pargemslr::ParallelGemslrClass::SetMinimalNumberSubdomains
int SetMinimalNumberSubdomains(int option)
Set the global minimal number of subdomains on each level of GeMSLR.
Definition: parallel_gemslr.hpp:1848
pargemslr::SolverClass::operator=
SolverClass< MatrixType, VectorType, DataType > & operator=(const SolverClass< MatrixType, VectorType, DataType > &solver)
The = operator of solver class.
Definition: solver.hpp:210
pargemslr::ParallelGemslrSchurSolveClass
Class of schur matvec.
Definition: parallel_gemslr.hpp:355
pargemslr::ParallelGemslrClass::SetLowRankOptionOtherLevels
int SetLowRankOptionOtherLevels(int option)
Set the low-rank option on other levels. 0: Standard. 1: Thick-restart.
Definition: parallel_gemslr.hpp:2014
pargemslr::ParallelGemslrLevelClass::_F_mat
MatrixType _F_mat
The F matrix on this level.
Definition: parallel_gemslr.hpp:555
pargemslr::ParallelGemslrClass::SetBIluFillLevelC
int SetBIluFillLevelC(int option)
Set the fill level for ILUK of the last level.
Definition: parallel_gemslr.hpp:2661
pargemslr::ParallelGemslrClass::SchurMatVec
int SchurMatVec(int level, int option, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
The matvec with the Schur Complement.
Definition: parallel_gemslr.cpp:6808
pargemslr::ParallelGemslrClass::SetupLowRankSubspaceIteration
int SetupLowRankSubspaceIteration(VectorType &x, VectorType &rhs, int level, int option)
Setup the low-rank part of the GeMSLR with subspace iteration.
Definition: parallel_gemslr.cpp:4269
pargemslr::ParallelGemslrClass::SetIluDropTolC
int SetIluDropTolC(T option)
Set the threshold for ILUT of the last level.
Definition: parallel_gemslr.hpp:2480
pargemslr::ParallelGemslrClass::Setup
virtual int Setup(VectorType &x, VectorType &rhs)
Setup the precondioner phase. Will be called by the solver if not called directly.
Definition: parallel_gemslr.cpp:1577
pargemslr::ParallelGemslrSchurSolveClass::~ParallelGemslrSchurSolveClass
virtual ~ParallelGemslrSchurSolveClass()
The destructor of precondioner class.
Definition: parallel_gemslr.hpp:415
pargemslr::ParallelGemslrClass::SetupBSolveILUT
int SetupBSolveILUT(VectorType &x, VectorType &rhs, int level)
Setup the solve of B matrices of the GeMSLR with ILUT.
Definition: parallel_gemslr.cpp:3704
pargemslr::SolverClass::Clear
virtual int Clear()
Free the current solver.
Definition: solver.hpp:264
pargemslr::ParallelGemslrSchurSolveClass::Setup
virtual int Setup(VectorType &x, VectorType &rhs)
Setup the precondioner phase. Will be called by the solver if not called directly.
Definition: parallel_gemslr.hpp:424