ParGeMSLR
|
The local real ilu preconditioner, only work for sequential CSR matrix. More...
#include <parallel_gemslr.hpp>
Public Member Functions | |
int | SetupPartialILUT (VectorType &x, VectorType &rhs) |
Setup the local partial ILUT. More... | |
ParallelGemslrClass () | |
The constructor of precondioner class. More... | |
virtual int | Clear () |
Free the current precondioner. More... | |
virtual | ~ParallelGemslrClass () |
The destructor of precondioner class. More... | |
ParallelGemslrClass (const ParallelGemslrClass< MatrixType, VectorType, DataType > &precond) | |
The copy constructor of ParallelGemslrClass. More... | |
ParallelGemslrClass (ParallelGemslrClass< MatrixType, VectorType, DataType > &&precond) | |
The move constructor of ParallelGemslrClass. More... | |
ParallelGemslrClass< MatrixType, VectorType, DataType > & | operator= (const ParallelGemslrClass< MatrixType, VectorType, DataType > &precond) |
The operator = of ParallelGemslrClass. More... | |
ParallelGemslrClass< MatrixType, VectorType, DataType > & | operator= (ParallelGemslrClass< MatrixType, VectorType, DataType > &&precond) |
The operator = of ParallelGemslrClass. More... | |
int | CheckParameters () |
Check the input parameters, avoid invalid settings. More... | |
virtual int | Setup (VectorType &x, VectorType &rhs) |
Setup the precondioner phase. Will be called by the solver if not called directly. More... | |
int | SetupPermutation () |
Setup the permutation of the GeMSLR. More... | |
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. More... | |
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. More... | |
int | SetupPermutationBuildLevelStructure (MatrixType &A, int level_start, vector_int &map_v, vector_int &mapptr_v) |
Setup the level structure of the GeMSLR. More... | |
int | SetupBSolve (VectorType &x, VectorType &rhs) |
Setup the solve of B matrices of the GeMSLR. More... | |
int | SetupBSolveILUT (VectorType &x, VectorType &rhs, int level) |
Setup the solve of B matrices of the GeMSLR with ILUT. More... | |
int | SetupBSolveILUK (VectorType &x, VectorType &rhs, int level) |
Setup the solve of B matrices of the GeMSLR with ILUK. More... | |
int | SetupBSolveGemslr (VectorType &x, VectorType &rhs, int level) |
Setup the solve of B matrices of the GeMSLR with GeMSLR. More... | |
int | SetupLowRank (VectorType &x, VectorType &rhs) |
Setup the low-rank part of the GeMSLR. More... | |
int | SetupLowRankSubspaceIteration (VectorType &x, VectorType &rhs, int level, int option) |
Setup the low-rank part of the GeMSLR with subspace iteration. More... | |
int | SetupLowRankNoRestart (VectorType &x, VectorType &rhs, int level, int option) |
Setup the low-rank part of the GeMSLR with arnodi no-restart. More... | |
int | SetupLowRankThickRestart (VectorType &x, VectorType &rhs, int level, int option) |
Setup the low-rank part of the GeMSLR with arnodi thick-restart. More... | |
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}. More... | |
virtual int | Solve (VectorType &x, VectorType &rhs) |
Solve phase. Call this function after Setup. Solve with cusparse if unified memory/device memory is used. More... | |
int | SolveLevelGemslr (VectorType &x_out, VectorType &rhs_in, int level, bool doperm) |
Solve starting from a certain level. More... | |
int | SolveLevelGemslrU (VectorType &x_out, VectorType &rhs_in, int level, bool doperm) |
Solve starting from a certain level. More... | |
int | SolveLevelGemslrMul (VectorType &x_out, VectorType &rhs_in, int level, bool doperm) |
Solve starting from a certain level. More... | |
int | SolveLevelEsmslr (VectorType &x_out, VectorType &rhs_in, int level, bool doperm) |
Solve starting from a certain level. More... | |
int | SolveLevelEsmslrU (VectorType &x_out, VectorType &rhs_in, int level, bool doperm) |
Solve starting from a certain level. More... | |
int | SolveLevelEsmslrMul (VectorType &x_out, VectorType &rhs_in, int level, bool doperm) |
Solve starting from a certain level. More... | |
int | SolveLevelPslr (VectorType &x_out, VectorType &rhs_in, int level, bool doperm) |
Solve starting from a certain level. More... | |
int | SolveB (VectorType &x, VectorType &rhs, int option, int level) |
Solve with B on a certain level. More... | |
int | SolveApplyLowRankLevel (VectorType &x, VectorType &rhs, int level) |
Apply the low-rank update on a certain level. More... | |
int | GetNumRows (int level) |
Get the local number of rows on certain level for the low-rank part. More... | |
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 untouched. More... | |
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 untouched. More... | |
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. More... | |
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. More... | |
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. More... | |
int | SchurMatVec (int level, int option, char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y) |
The matvec with the Schur Complement. More... | |
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. More... | |
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. More... | |
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. More... | |
int | GetSize () |
Get the size of the problem. More... | |
virtual long int | GetNumNonzeros () |
Get the total number of nonzeros the ILU. More... | |
long int | GetNumNonzeros (long int &nnz_bsolver, long int &nnz_lr) |
Get the total number of nonzeros the ILU. More... | |
int | PlotPatternGnuPlot (const char *datafilename) |
Plot the pattern of the parallel gemslr using gnuplot. Similar to spy in the MATLAB. Function for testing purpose. More... | |
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. More... | |
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 Schur solve. More... | |
virtual int | SetWithParameterArray (double *params) |
Setup with parameter array. More... | |
int | SetGlobalPrecondOption (int option) |
Set the global precond option. 0: BJ; 1: ISCHUR; 2: ESCHUR; 3: MLEV. More... | |
int | SetPartitionOption (int option) |
Set the global partition option. 0: ND; 1: RKway. More... | |
int | SetBPartitionOption (int option) |
Set the B part partition option. 0: ND; 1: RKway. More... | |
int | SetPermutationOption (int option) |
Set the global permutation option. 0: No; 1: RCM; 2: AMD. More... | |
int | SetBPermutationOption (int option) |
Set the B part permutation option. 0: No; 1: RCM; 2: AMD. More... | |
int | SetNumLevels (int option) |
Set the global target number of levels of GeMSLR. More... | |
int | SetBNumLevels (int option) |
Set the B part target number of levels of GeMSLR. More... | |
int | SetNumSubdomains (int option) |
Set the global target number of subdomains on each level of GeMSLR. More... | |
int | SetBNumSubdomains (int option) |
Set the B part target number of subdomains on each level of GeMSLR. More... | |
int | SetMinimalNumberSubdomains (int option) |
Set the global minimal number of subdomains on each level of GeMSLR. More... | |
int | SetBMinimalNumberSubdomains (int option) |
Set the B part minimal number of subdomains on each level of GeMSLR. More... | |
int | SetNumberSubdomainsReduceFactor (int option) |
Set the global reduce factor of subdomains on each level of GeMSLR. More... | |
int | SetBNumberSubdomainsReduceFactor (int option) |
Set the B part reduce factor of subdomains on each level of GeMSLR. More... | |
int | SetSeperatorOption (bool option) |
Set the global separator option of GeMSLR. More... | |
int | SetBSeperatorOption (bool option) |
Set the B part separator option of GeMSLR. More... | |
int | SetGlobalPartitionOption (bool option) |
Set the global partition option of GeMSLR. More... | |
int | SetInnerIterationOption (bool option) |
Set the inner iteration option of GeMSLR. More... | |
template<typename T > | |
int | SetInnerIterationThreshold (T option) |
Set the stop threshold of inner iteration of GeMSLR. More... | |
int | SetInnerIterationMaxNumberIterations (int option) |
Set the max number of iterations of inner iteration of GeMSLR. More... | |
int | SetSolveOption (int option) |
Set the solve option. 0: additive LU solve; 1: additive L solve; 2: multi-solve. More... | |
int | SetLowRankOptionTopLevel (int option) |
Set the low-rank option on the top level. 0: Standard. 1: Thick-restart. More... | |
int | SetLowRankOptionOtherLevels (int option) |
Set the low-rank option on other levels. 0: Standard. 1: Thick-restart. More... | |
int | SetLowRankOptionA (int option) |
Set the low-rank option on A. 0: Standard. 1: Thick-restart. More... | |
int | SetBLowRankOptionTopLevel (int option) |
Set the B part low-rank option on the top level. 0: Standard. 1: Thick-restart. More... | |
int | SetBLowRankOptionOtherLevels (int option) |
Set the B part low-rank option on other levels. 0: Standard. 1: Thick-restart. More... | |
int | SetLowRankRandomInitGuess (bool option) |
Set if we use random initial guess for Arnoldi. Otherwise we use 1 as initial guess. More... | |
int | SetBLowRankRandomInitGuess (bool option) |
Set if we use random initial guess for Arnoldi in the B part. Otherwise we use 1 as initial guess. More... | |
template<typename T > | |
int | SetLowRankFactorTopLevel (T option) |
Set the low-rank factor on the top level. The actuall computed number of low-rank terms is rank * factor >= rank. More... | |
template<typename T > | |
int | SetLowRankFactorOtherLevels (T option) |
Set the low-rank factor on the other levels. The actuall computed number of low-rank terms is rank * factor >= rank. More... | |
template<typename T > | |
int | SetLowRankFactorA (T option) |
Set the low-rank factor on A. The actuall computed number of low-rank terms is rank * factor >= rank. More... | |
template<typename T > | |
int | SetBLowRankFactorTopLevel (T option) |
Set the B part low-rank factor on the top level. The actuall computed number of low-rank terms is rank * factor >= rank. More... | |
template<typename T > | |
int | SetBLowRankFactorOtherLevels (T option) |
Set the B part low-rank factor on the other levels. The actuall computed number of low-rank terms is rank * factor >= rank. More... | |
template<typename T > | |
int | SetLowRankRanksTopLevel (T option) |
Set the target number of low-rank terms on the top level. More... | |
template<typename T > | |
int | SetLowRankRanksOtherLevels (T option) |
Set the target number of low-rank terms on the other levels. More... | |
template<typename T > | |
int | SetLowRankA (T option) |
Set the target number of low-rank terms for A. More... | |
template<typename T > | |
int | SetBLowRankRanksTopLevel (T option) |
Set the B part target number of low-rank terms on the top level. More... | |
template<typename T > | |
int | SetBLowRankRanksOtherLevels (T option) |
Set the B part target number of low-rank terms on the other levels. More... | |
template<typename T > | |
int | SetLowRankArnoldiFactorTopLevel (T option) |
Set the Arnoldi factor on the top level. m steps for arnoldi is rank * rank_factor * arnoldi_factor. More... | |
template<typename T > | |
int | SetLowRankArnoldiFactorOtherLevels (T option) |
Set the Arnoldi factor on other levels. m steps for arnoldi is rank * rank_factor * arnoldi_factor. More... | |
template<typename T > | |
int | SetLowRankArnoldiFactorA (T option) |
Set the Arnoldi factor on A. m steps for arnoldi is rank * rank_factor * arnoldi_factor. More... | |
template<typename T > | |
int | SetBLowRankArnoldiFactorTopLevel (T option) |
Set the B part Arnoldi factor on the top level. m steps for arnoldi is rank * rank_factor * arnoldi_factor. More... | |
template<typename T > | |
int | SetBLowRankArnoldiFactorOtherLevels (T option) |
Set the B part Arnoldi factor on other levels. m steps for arnoldi is rank * rank_factor * arnoldi_factor. More... | |
int | SetLowRankMaxNumberIterationsTopLevel (int option) |
Set max restarts of thick-restart Arnoldi on the top level. More... | |
int | SetLowRankMaxNumberIterationsOtherLevels (int option) |
Set max restarts of thick-restart Arnoldi on other levels. More... | |
int | SetLowRankMaxNumberIterationsA (int option) |
Set max restarts of thick-restart Arnoldi on A. More... | |
int | SetBLowRankMaxNumberIterationsTopLevel (int option) |
Set B part max restarts of thick-restart Arnoldi on the top level. More... | |
int | SetBLowRankMaxNumberIterationsOtherLevels (int option) |
Set B part max restarts of thick-restart Arnoldi on other levels. More... | |
template<typename T > | |
int | SetLowRankThresholdTopLevel (T option) |
Set max restarts of thick-restart Arnoldi on the top level. More... | |
template<typename T > | |
int | SetLowRankThresholdOtherLevels (T option) |
Set max restarts of thick-restart Arnoldi on other levels. More... | |
template<typename T > | |
int | SetLowRankThresholdA (T option) |
Set max restarts of thick-restart Arnoldi on A. More... | |
template<typename T > | |
int | SetBLowRankThresholdTopLevel (T option) |
Set B part max restarts of thick-restart Arnoldi on the top level. More... | |
template<typename T > | |
int | SetBLowRankThresholdOtherLevels (T option) |
Set B part max restarts of thick-restart Arnoldi on other levels. More... | |
template<typename T > | |
int | SetIluDropTolB (T option) |
Set the threshold for ILUT of the B part. More... | |
template<typename T > | |
int | SetIluDropTolC (T option) |
Set the threshold for ILUT of the last level. More... | |
template<typename T > | |
int | SetIluDropTolS (T option) |
Set the threshold for ILUT of the S part. More... | |
template<typename T > | |
int | SetIluDropTolEF (T option) |
Set the threshold for ILUT of the EF part. More... | |
template<typename T > | |
int | SetBIluDropTolB (T option) |
Set the recursive GeMSLR B part threshold for ILUT of the global B part. More... | |
template<typename T > | |
int | SetBIluDropTolC (T option) |
Set the recursive GeMSLR last level threshold for ILUT of the global B part. More... | |
int | SetIluMaxRowNnzB (int option) |
Set the maxinum number of nonzeros for ILUT of the B part. More... | |
int | SetIluMaxRowNnzC (int option) |
Set the maxinum number of nonzeros ILUT of the last level. More... | |
int | SetIluMaxRowNnzS (int option) |
Set the maxinum number of nonzeros ILUT of the S part. More... | |
int | SetBIluMaxRowNnzB (int option) |
Set the recursive GeMSLR B part maxinum number of nonzeros ILUT. More... | |
int | SetBIluMaxRowNnzC (int option) |
Set the recursive GeMSLR last level maxinum number of nonzeros ILUT. More... | |
int | SetIluFillLevelB (int option) |
Set the fill level for ILUK of the B part. More... | |
int | SetIluFillLevelC (int option) |
Set the fill level for ILUK of the last level. More... | |
int | SetBIluFillLevelB (int option) |
Set the fill level for ILUK of the B part. More... | |
int | SetBIluFillLevelC (int option) |
Set the fill level for ILUK of the last level. More... | |
int | SetPolyOrder (int option) |
Set poly order for Poly solve of the B part. More... | |
int | SetBPolyOrder (int option) |
Set poly order for Poly solve of the B part of the recursive GeMSLR. More... | |
int | SetPreconditionerOption1 (int option) |
Set top level preconditioner. More... | |
int | SetPreconditionerOption1Levels (int option) |
Set top level preconditioner apply levels. More... | |
int | SetPreconditionerOption2 (int option) |
Set mid level preconditioner. More... | |
int | SetPreconditionerOptionB (int option) |
Set all top levels preconditioner. More... | |
int | SetSmoothOptionB (int option) |
Set all top levels smoother. More... | |
int | SetPreconditionerOptionC (int option) |
Set last level preconditioner. More... | |
int | SetIluResidualIters (int residual_iters) |
Set the number of residual iterations of B solves in the setup phase. Set to <= 1 to turn off. More... | |
int | SetIluComplexShift (bool complex_shift) |
Set if we turn on the complex shift or not (complex version only). More... | |
virtual int | SetSolveLocation (const int &location) |
Set the data location that the preconditioner apply to. More... | |
virtual int | MoveData (const int &location) |
Move the preconditioner to another location. Only can be called after Setup. More... | |
int | GetSolvePhase () |
Get the solve phase. More... | |
Public Attributes | |
int | _global_precond_option |
The Schur complement option. More... | |
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 vector is equal to _nlev_used, and is the number of true levels. More... | |
ParallelGemslrLevelClass< MatrixType, VectorType, DataType > | _lev_A |
The structure for the A level low-rank correction. More... | |
The local real ilu preconditioner, only work for sequential CSR matrix. Matrix type is the type of the matrix, VectorType is the type of the vector. DataType is the data type.
template pargemslr::precond_gemslr_csr_par_complexd::ParallelGemslrClass | ( | ) |
The constructor of precondioner class.
|
virtual |
The destructor of precondioner class.
pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::ParallelGemslrClass | ( | const ParallelGemslrClass< MatrixType, VectorType, DataType > & | precond | ) |
The copy constructor of ParallelGemslrClass.
pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::ParallelGemslrClass | ( | ParallelGemslrClass< MatrixType, VectorType, DataType > && | precond | ) |
The move constructor of ParallelGemslrClass.
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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.
We are finding AM^{-1}(I-X)^{-1} = I -> X = I - A^M{-1}. After that, we can apply the preconditioner as M^{-1}(I-X)^{-1}x.
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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.
[in] | level | The matvec level. |
[in] | option | The matvec option. 0: standard; 1: use -C_offd instad of C. |
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
template int pargemslr::precond_gemslr_csr_par_complexd::CheckParameters | ( | ) |
Check the input parameters, avoid invalid settings.
|
virtual |
Free the current precondioner.
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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.
[in] | level | The matvec level. |
[in] | option | The matvec option. 0: standard; 1: use -C_offd instad of C. |
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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 untouched.
[in] | level | The matvec level. |
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
|
virtual |
Get the total number of nonzeros the ILU.
template long int pargemslr::precond_gemslr_csr_par_complexd::GetNumNonzeros | ( | long int & | nnz_bsolver, |
long int & | nnz_lr | ||
) |
Get the total number of nonzeros the ILU.
template int pargemslr::precond_gemslr_csr_par_complexd::GetNumRows | ( | int | level | ) |
Get the local number of rows on certain level for the low-rank part.
template int pargemslr::precond_gemslr_csr_par_complexd::GetSize | ( | ) |
Get the size of the problem.
|
inline |
Get the solve phase.
|
virtual |
Move the preconditioner to another location. Only can be called after Setup.
[in] | location | The target solver location. |
ParallelGemslrClass< MatrixType, VectorType, DataType > & pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::operator= | ( | const ParallelGemslrClass< MatrixType, VectorType, DataType > & | precond | ) |
The operator = of ParallelGemslrClass.
ParallelGemslrClass< MatrixType, VectorType, DataType > & pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::operator= | ( | ParallelGemslrClass< MatrixType, VectorType, DataType > && | precond | ) |
The operator = of ParallelGemslrClass.
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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.
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
template int pargemslr::precond_gemslr_csr_par_complexd::PlotPatternGnuPlot | ( | const char * | datafilename | ) |
Plot the pattern of the parallel gemslr using gnuplot. Similar to spy in the MATLAB. Function for testing purpose.
[in] | datafilename | The filename of the temp file holding the data. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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 untouched.
[in] | level | The matvec level. |
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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.
[in] | level | The matvec level. |
[in] | option | The matvec option. 0: use B_solve; 1: use B_precond. |
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SchurMatVec | ( | int | level, |
int | option, | ||
char | trans, | ||
const DataType & | alpha, | ||
VectorType & | x, | ||
const DataType & | beta, | ||
VectorType & | y | ||
) |
The matvec with the Schur Complement.
[in] | level | The matvec level. |
[in] | option | The matvec option. 0: standard; 1: use -C_offd instad of C. |
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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.
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The left vector. |
[in] | beta | The beta value. |
[in,out] | y | The product vector. |
|
inline |
Set the recursive GeMSLR B part threshold for ILUT of the global B part.
[in] | option | The new option. |
|
inline |
Set the recursive GeMSLR last level threshold for ILUT of the global B part.
[in] | option | The new option. |
|
inline |
Set the fill level for ILUK of the B part.
[in] | option | The new option. |
|
inline |
Set the fill level for ILUK of the last level.
[in] | option | The new option. |
|
inline |
Set the recursive GeMSLR B part maxinum number of nonzeros ILUT.
[in] | option | The new option. |
|
inline |
Set the recursive GeMSLR last level maxinum number of nonzeros ILUT.
[in] | option | The new option. |
|
inline |
Set the B part Arnoldi factor on other levels. m steps for arnoldi is rank * rank_factor * arnoldi_factor
[in] | option | The new option. |
|
inline |
Set the B part Arnoldi factor on the top level. m steps for arnoldi is rank * rank_factor * arnoldi_factor
[in] | option | The new option. |
|
inline |
Set the B part low-rank factor on the other levels. The actuall computed number of low-rank terms is rank * factor >= rank.
[in] | option | The new option. |
|
inline |
Set the B part low-rank factor on the top level. The actuall computed number of low-rank terms is rank * factor >= rank.
[in] | option | The new option. |
|
inline |
Set B part max restarts of thick-restart Arnoldi on other levels.
[in] | option | The new option. |
|
inline |
Set B part max restarts of thick-restart Arnoldi on the top level.
[in] | option | The new option. |
|
inline |
Set the B part low-rank option on other levels. 0: Standard. 1: Thick-restart.
[in] | option | The new option. |
|
inline |
Set the B part low-rank option on the top level. 0: Standard. 1: Thick-restart.
[in] | option | The new option. |
|
inline |
Set if we use random initial guess for Arnoldi in the B part. Otherwise we use 1 as initial guess.
[in] | option | The new option. |
|
inline |
Set the B part target number of low-rank terms on the other levels.
[in] | option | The new option. |
|
inline |
Set the B part target number of low-rank terms on the top level.
[in] | option | The new option. |
|
inline |
Set B part max restarts of thick-restart Arnoldi on other levels.
[in] | option | The new option. |
|
inline |
Set B part max restarts of thick-restart Arnoldi on the top level.
[in] | option | The new option. |
|
inline |
Set the B part minimal number of subdomains on each level of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the B part reduce factor of subdomains on each level of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the B part target number of levels of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the B part target number of subdomains on each level of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the B part partition option. 0: ND; 1: RKway.
[in] | option | The new option. |
|
inline |
Set the B part permutation option. 0: No; 1: RCM; 2: AMD.
[in] | option | The new option. |
|
inline |
Set poly order for Poly solve of the B part of the recursive GeMSLR.
[in] | option | The new option. |
|
inline |
Set the B part separator option of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the global partition option of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the global precond option. 0: BJ; 1: ISCHUR; 2: ESCHUR; 3: MLEV.
[in] | option | The new option. |
|
inline |
Set if we turn on the complex shift or not (complex version only).
[in] | complex_shift | The new drop tol for ILUT. |
|
inline |
Set the threshold for ILUT of the B part.
[in] | option | The new option. |
|
inline |
Set the threshold for ILUT of the last level.
[in] | option | The new option. |
|
inline |
Set the threshold for ILUT of the EF part.
[in] | option | The new option. |
|
inline |
Set the threshold for ILUT of the S part.
[in] | option | The new option. |
|
inline |
Set the fill level for ILUK of the B part.
[in] | option | The new option. |
|
inline |
Set the fill level for ILUK of the last level.
[in] | option | The new option. |
|
inline |
Set the maxinum number of nonzeros for ILUT of the B part.
[in] | option | The new option. |
|
inline |
Set the maxinum number of nonzeros ILUT of the last level.
[in] | option | The new option. |
|
inline |
Set the maxinum number of nonzeros ILUT of the S part.
[in] | option | The new option. |
|
inline |
Set the number of residual iterations of B solves in the setup phase. Set to <= 1 to turn off.
[in] | residual_iters | The number of residual iterations of B solves. |
|
inline |
Set the max number of iterations of inner iteration of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the inner iteration option of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the stop threshold of inner iteration of GeMSLR.
[in] | option | The new option. |
|
inlinevirtual |
Setup with parameter array. This is the helper function to set the local gemslr for B solve.
[in] | params | The parameter array. |
|
inlinevirtual |
Setup with parameter array. This is the helper function to set the lower level gemslr for explicite Schur solve.
[in] | params | The parameter array. |
|
inline |
Set the target number of low-rank terms for A.
[in] | option | The new option. |
|
inline |
Set the Arnoldi factor on A. m steps for arnoldi is rank * rank_factor * arnoldi_factor
[in] | option | The new option. |
|
inline |
Set the Arnoldi factor on other levels. m steps for arnoldi is rank * rank_factor * arnoldi_factor
[in] | option | The new option. |
|
inline |
Set the Arnoldi factor on the top level. m steps for arnoldi is rank * rank_factor * arnoldi_factor
[in] | option | The new option. |
|
inline |
Set the low-rank factor on A. The actuall computed number of low-rank terms is rank * factor >= rank.
[in] | option | The new option. |
|
inline |
Set the low-rank factor on the other levels. The actuall computed number of low-rank terms is rank * factor >= rank.
[in] | option | The new option. |
|
inline |
Set the low-rank factor on the top level. The actuall computed number of low-rank terms is rank * factor >= rank.
[in] | option | The new option. |
|
inline |
Set max restarts of thick-restart Arnoldi on A.
[in] | option | The new option. |
|
inline |
Set max restarts of thick-restart Arnoldi on other levels.
[in] | option | The new option. |
|
inline |
Set max restarts of thick-restart Arnoldi on the top level.
[in] | option | The new option. |
|
inline |
Set the low-rank option on A. 0: Standard. 1: Thick-restart.
[in] | option | The new option. |
|
inline |
Set the low-rank option on other levels. 0: Standard. 1: Thick-restart.
[in] | option | The new option. |
|
inline |
Set the low-rank option on the top level. 0: Standard. 1: Thick-restart.
[in] | option | The new option. |
|
inline |
Set if we use random initial guess for Arnoldi. Otherwise we use 1 as initial guess.
[in] | option | The new option. |
|
inline |
Set the target number of low-rank terms on the other levels.
[in] | option | The new option. |
|
inline |
Set the target number of low-rank terms on the top level.
[in] | option | The new option. |
|
inline |
Set max restarts of thick-restart Arnoldi on A.
[in] | option | The new option. |
|
inline |
Set max restarts of thick-restart Arnoldi on other levels.
[in] | option | The new option. |
|
inline |
Set max restarts of thick-restart Arnoldi on the top level.
[in] | option | The new option. |
|
inline |
Set the global minimal number of subdomains on each level of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the global reduce factor of subdomains on each level of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the global target number of levels of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the global target number of subdomains on each level of GeMSLR.
[in] | option | The new option. |
|
inline |
Set the global partition option. 0: ND; 1: RKway.
[in] | option | The new option. |
|
inline |
Set the global permutation option. 0: No; 1: RCM; 2: AMD.
[in] | option | The new option. |
|
inline |
Set poly order for Poly solve of the B part.
[in] | option | The new option. |
|
inline |
Set top level preconditioner.
[in] | option | The new option. |
|
inline |
Set top level preconditioner apply levels.
[in] | option | The new option. |
|
inline |
Set mid level preconditioner.
[in] | option | The new option. |
|
inline |
Set all top levels preconditioner.
[in] | option | The new option. |
|
inline |
Set last level preconditioner.
[in] | option | The new option. |
|
inline |
Set the global separator option of GeMSLR.
[in] | option | The new option. |
|
inline |
Set all top levels smoother.
[in] | option | The new option. |
|
virtual |
Set the data location that the preconditioner apply to.
[in] | location | The target solver location. |
|
inline |
Set the solve option. 0: additive LU solve; 1: additive L solve; 2: multi-solve.
[in] | option | The new option. |
|
virtual |
Setup the precondioner phase. Will be called by the solver if not called directly.
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupBSolve | ( | VectorType & | x, |
VectorType & | rhs | ||
) |
Setup the solve of B matrices of the GeMSLR.
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupBSolveGemslr | ( | VectorType & | x, |
VectorType & | rhs, | ||
int | level | ||
) |
Setup the solve of B matrices of the GeMSLR with GeMSLR.
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
[in] | level | The target level. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupBSolveILUK | ( | VectorType & | x, |
VectorType & | rhs, | ||
int | level | ||
) |
Setup the solve of B matrices of the GeMSLR with ILUK.
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
[in] | level | The target level. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupBSolveILUT | ( | VectorType & | x, |
VectorType & | rhs, | ||
int | level | ||
) |
Setup the solve of B matrices of the GeMSLR with ILUT.
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
[in] | level | The target level. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupLowRank | ( | VectorType & | x, |
VectorType & | rhs | ||
) |
Setup the low-rank part of the GeMSLR.
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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}.
For GeMSLR, H -> (I-H)^{-1} - I
For EsMSLR, X -> X^{-1} - I.
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
[in] | V | Matrix holding the orthogonal basis genrated by Arnoldi iteration. |
[in] | H | The Hessenberg matrix generated by Arnoldi iteration. |
[in] | m | The number of finished steps in Arnoldi iteration. |
[in] | rank | The number of eigenvectors to keep. |
[in] | level | The current level. |
[in] | option | The setup option. GeMSLR, ESMSLR, or PSLR. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupLowRankNoRestart | ( | VectorType & | x, |
VectorType & | rhs, | ||
int | level, | ||
int | option | ||
) |
Setup the low-rank part of the GeMSLR with arnodi no-restart.
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
[in] | level | The target level. |
[in] | option | The setup option. GeMSLR, ESMSLR, or PSLR. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupLowRankSubspaceIteration | ( | VectorType & | x, |
VectorType & | rhs, | ||
int | level, | ||
int | option | ||
) |
Setup the low-rank part of the GeMSLR with subspace iteration
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
[in] | level | The target level. |
[in] | option | The setup option. GeMSLR, ESMSLR, or PSLR. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupLowRankThickRestart | ( | VectorType & | x, |
VectorType & | rhs, | ||
int | level, | ||
int | option | ||
) |
Setup the low-rank part of the GeMSLR with arnodi thick-restart.
[in] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
[in] | level | The target level. |
[in] | option | The setup option. GeMSLR, ESMSLR, or PSLR. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupPartialILUT | ( | VectorType & | x, |
VectorType & | rhs | ||
) |
Setup the local partial ILUT.
template int pargemslr::precond_gemslr_csr_par_complexd::SetupPermutation | ( | ) |
Setup the permutation of the GeMSLR.
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SetupPermutationBuildLevelStructure | ( | MatrixType & | A, |
int | level_start, | ||
vector_int & | map_v, | ||
vector_int & | mapptr_v | ||
) |
Setup the level structure of the GeMSLR.
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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. This is a symmetric reordering algorithm work on A+A'.
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::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. This is a symmetric reordering algorithm work on A+A'.
1) On each level, partition the current adjacency graph with kway partitioning.
2) Find the adjacency graph of the interface matrix.
3) Repeat until we reach the last level or the interface matrix is too small.
|
inlinevirtual |
Setup with parameter array.
[in] | params | The parameter array. |
|
virtual |
Solve phase. Call this function after Setup. Solve with cusparse if unified memory/device memory is used.
[in,out] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SolveApplyLowRankLevel | ( | VectorType & | x, |
VectorType & | rhs, | ||
int | level | ||
) |
Apply the low-rank update on a certain level.
[in,out] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
[in] | level | The start level. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SolveB | ( | VectorType & | x, |
VectorType & | rhs, | ||
int | option, | ||
int | level | ||
) |
Solve with B on a certain level.
[in,out] | x | The initial guess. |
[in] | rhs | The right-hand-side. |
[in] | option | 0: solve with B_solver; 1: solve with B_precond; 2: apply smoothing. |
[in] | level | The start level. |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SolveLevelEsmslr | ( | VectorType & | x_out, |
VectorType & | rhs_in, | ||
int | level, | ||
bool | doperm | ||
) |
Solve starting from a certain level.
[in,out] | x_in | The initial guess. |
[in] | rhs_out | The right-hand-side. |
[in] | level | The start level. |
[in] | doperm | Do we apply permutation on this level? (Some time the system is already permuted). |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SolveLevelEsmslrMul | ( | VectorType & | x_out, |
VectorType & | rhs_in, | ||
int | level, | ||
bool | doperm | ||
) |
Solve starting from a certain level.
[in,out] | x_in | The initial guess. |
[in] | rhs_out | The right-hand-side. |
[in] | level | The start level. |
[in] | doperm | Do we apply permutation on this level? (Some time the system is already permuted). |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SolveLevelEsmslrU | ( | VectorType & | x_out, |
VectorType & | rhs_in, | ||
int | level, | ||
bool | doperm | ||
) |
Solve starting from a certain level.
[in,out] | x_in | The initial guess. |
[in] | rhs_out | The right-hand-side. |
[in] | level | The start level. |
[in] | doperm | Do we apply permutation on this level? (Some time the system is already permuted). |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SolveLevelGemslr | ( | VectorType & | x_out, |
VectorType & | rhs_in, | ||
int | level, | ||
bool | doperm | ||
) |
Solve starting from a certain level.
[in,out] | x_in | The initial guess. |
[in] | rhs_out | The right-hand-side. |
[in] | level | The start level. |
[in] | doperm | Do we apply permutation on this level? (Some time the system is already permuted). |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SolveLevelGemslrMul | ( | VectorType & | x_out, |
VectorType & | rhs_in, | ||
int | level, | ||
bool | doperm | ||
) |
Solve starting from a certain level.
[in,out] | x_in | The initial guess. |
[in] | rhs_out | The right-hand-side. |
[in] | level | The start level. |
[in] | doperm | Do we apply permutation on this level? (Some time the system is already permuted). |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SolveLevelGemslrU | ( | VectorType & | x_out, |
VectorType & | rhs_in, | ||
int | level, | ||
bool | doperm | ||
) |
Solve starting from a certain level.
[in,out] | x_in | The initial guess. |
[in] | rhs_out | The right-hand-side. |
[in] | level | The start level. |
[in] | doperm | Do we apply permutation on this level? (Some time the system is already permuted). |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::SolveLevelPslr | ( | VectorType & | x_out, |
VectorType & | rhs_in, | ||
int | level, | ||
bool | doperm | ||
) |
Solve starting from a certain level.
[in,out] | x_in | The initial guess. |
[in] | rhs_out | The right-hand-side. |
[in] | level | The start level. |
[in] | doperm | Do we apply permutation on this level? (Some time the system is already permuted). |
int pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::_global_precond_option |
The Schur complement option.
ParallelGemslrLevelClass< MatrixType, VectorType, DataType> pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::_lev_A |
The structure for the A level low-rank correction.
std::vector< ParallelGemslrLevelClass< MatrixType, VectorType, DataType> > pargemslr::ParallelGemslrClass< MatrixType, VectorType, DataType >::_levs_v |
Vector holding the level struct for all levels starting from the second level. The size of this vector is equal to _nlev_used, and is the number of true levels.