aAMG
This class is used to manage the adaptive AMG preconditioner. More…
#include "aAMG.h"
Inherits from Preconditioner, MatrixProd
Public Functions
Name | |
---|---|
aAMG() Constructs the object. |
|
~aAMG() Deletes the object. |
|
virtual iReg | get_nrows() const Retrieve the number of rows. |
virtual iGlo | Get_Globalnrows() const Retrieve the global number of rows. |
void | print_OperStats(FILE * ofile) Prints the operator statistics for the whole hierarchy. |
void | print_Times(FILE * ofile) Prints the times needed to compute the whole hierarchy. |
virtual void | Compute(DSMat &restrict mat_A, DDMat *const restrict V0 =nullptr) Computes the AMG preconditioner in a distributed memory environment. |
virtual void | Prepare_MxV(const iReg nRHS) Prepares the preconditioner application to a vector (DDMat). |
virtual void | UndoPrepare_MxV() Undo the data structure necessary for MxV. |
virtual void | MxV(DDMat &restrict RHS, DDMat &restrict SOL, bool Barrier_flag) Applies the preconditioner to a vector (DDMat): prec(A) * RHS = SOL. |
virtual void | MxM(DSMat &restrict Mat, DSMat &restrict PrecMat) Applies the preconditioner to a matrix (DSMat). |
virtual void | fPrintAll_ASCII(const string & filename) const Prints the Operator in ASCII format. |
virtual void | Set_Parameters(const void * params) Sets the aAMG parameters. |
virtual iExt | Get_nnz() const Returns an estimate of the number of non-zeroes of the preconditioner application. |
virtual iExt | Get_FlopEst() const Returns an estimate of the number of FLOPS needed to perform the preconditioner application. |
void | Set_CycleType(const iReg restrict input_CycleType) Sets the multigrid cycle type. |
void | Set_maxNlevel(const iReg restrict input_maxNlevel) Sets the maximum number of levels. |
void | Set_maxCoarseSize(const iReg restrict input_maxCoarseSize) Sets the maximum size of the coarsen grid. |
void | TSPACE_Set_ntv(const iReg restrict input_ntv) Sets the Tspace’s number of test vectors. |
void | TSPACE_Set_method(const iReg restrict input_method) Sets the Eigensolver used to compute test vectors. |
void | TSPACE_Set_maxITER(const iReg restrict input_maxITER) Sets the Tspace’s Maximum number of iterations. |
void | TSPACE_Set_exitTOL(const rExt restrict input_exitTOL) Sets the Tspace’s exit tolerance. |
void | TSPACE_Set_orth_freq(const iReg restrict input_orth_freq) Sets the Tspace’s orth_freq. |
void | TSPACE_Set_ritz_freq(const iReg restrict input_ritz_freq) Sets the Tspace’s ritz_freq. |
void | COARSEN_Set_type(const iReg restrict input_type) Sets the Coarsen’s type. |
void | COARSEN_Set_tau(const rExt restrict input_tau) Sets the Coarsen’s tolerance for filtering. |
void | COARSEN_Set_tau_jump(const rExt restrict input_tau_jump) Sets the Coarsen’s tolerance for filtering. |
void | PROLONGATION_Set_type(const iReg input_type) Sets the Prolongation’s type. |
void | PROLONGATION_Set_nPow(const iReg input_nPow) Sets the Prolongation’s power pattern. |
void | PROLONGATION_Set_smooth(iReg restrict input_smooth) Sets the Prolongation’s smoothing. |
void | PROLONGATION_Set_stronly(const iReg restrict input_stronly) Sets the Prolongartion’s stronly. |
void | PROLONGATION_Set_maxrownrm(const rExt restrict input_maxrownrm) Sets the Prolongartion’s maxrownrm. |
void | PROLONGATION_Set_maxcond(const rExt restrict input_maxcond) Sets the Prolongartion’s maxcond. |
void | PROLONGATION_Set_itmax_vol(const iReg restrict input_itmax_vol) Sets the Prolongartion’s itmax_vol. |
void | PROLONGATION_Set_tol_vol(const rExt restrict input_tol_vol) Sets the Prolongartion’s tol_vol. |
void | PROLONGATION_Set_eps(const rExt restrict input_eps) Sets the Prolongartion’s eps. |
void | PROLONGATION_Set_dist_min(const iReg restrict input_dist_min) Sets the Prolongartion’s dist_min. |
void | PROLONGATION_Set_dist_max(const iReg restrict input_dist_max) Sets the Prolongartion’s dist_max. |
void | PROLONGATION_Set_mmax(const iReg restrict input_mmax) Sets the Prolongartion’s mmax. |
void | FILTER_Set_Prol_Weight(const rExt input_Prol_Weight) Sets Prol_Weight. |
void | FILTER_Set_Prol_Tol(const rExt input_Prol_Tol) Sets Prol_Tol. |
void | FILTER_Set_Oper_Weight(const rExt input_Oper_Weight) Sets Oper_Weight. |
void | SMOOTHER_Set_type(const iReg restrict input_type) Sets the Smoother’s type. |
void | SMOOTHER_Set_omega(const rExt restrict input_omega) Sets the Smoother’s weight. |
void | SMOOTHER_Set_itmax_maxeig(const iReg restrict input_itmax_maxeig) Sets the Maximum number of iterations to compute max eigenvalue (estimate omega). |
void | SMOOTHER_Set_tol_maxeig(const rExt restrict input_tol_maxeig) Sets the Exit tolerance to compute max eigenvalue (estimate omega). |
void | SMOOTHER_Set_nupre(const iReg restrict input_nupre) Sets the Number of pre-smoothing steps. |
void | SMOOTHER_Set_nupost(const iReg restrict input_nupost) Sets the Number of post-smoothing steps. |
void | SMOOTHER_Set_aFSAI_TargetPower(const iReg restrict input_afsai_TargetPower) Sets the Requested power for the communication Graph. |
void | SMOOTHER_Set_aFSAI_nstep(const iReg restrict input_afsai_nstep) Sets the Number of steps for computing the adaptive FSAI Smoother. |
void | SMOOTHER_Set_aFSAI_step_size(const iReg restrict input_afsai_step_size) Sets the Step size for computing the adaptive FSAI Smoother. |
void | SMOOTHER_Set_aFSAI_eps(const rExt restrict input_afsai_eps) Sets the Exit tolerance for computing the adaptive FSAI Smoother. |
Additional inherited members
Public Functions inherited from Preconditioner
Name | |
---|---|
void | copy_Preconditioner(Preconditioner & other) Copy members. |
Preconditioner & | operator=(Preconditioner & other) Copy operator. |
virtual | ~Preconditioner() =0 Deletes the object. |
Public Functions inherited from MatrixProd
Name | |
---|---|
void | copy_MatrixProd(MatrixProd & other) Copy members. |
MatrixProd & | operator=(MatrixProd & other) Copy operator. |
bool | get_Prepared_flag() const Get flag for MxV prepare. |
iReg | get_nRHS_prep() const Get the number of rhs the matrix is prepared for. |
virtual | ~MatrixProd() =0 Deletes the object. |
Protected Attributes inherited from MatrixProd
Name | |
---|---|
bool | Prepared_flag flag for MxV prepare. |
iReg | nRHS_prep number of rhs the matrix is prepared for |
Detailed Description
class aAMG;
This class is used to manage the adaptive AMG preconditioner.
class aAMG.
Public Functions Documentation
function aAMG
aAMG()
Constructs the object.
function ~aAMG
~aAMG()
Deletes the object.
function get_nrows
inline virtual iReg get_nrows() const
Retrieve the number of rows.
Reimplements: Preconditioner::get_nrows
function Get_Globalnrows
virtual iGlo Get_Globalnrows() const
Retrieve the global number of rows.
Reimplements: Preconditioner::Get_Globalnrows
function print_OperStats
void print_OperStats(
FILE * ofile
)
Prints the operator statistics for the whole hierarchy.
Parameters:
- *ofile output file.
function print_Times
void print_Times(
FILE * ofile
)
Prints the times needed to compute the whole hierarchy.
Parameters:
- *ofile output file.
function Compute
virtual void Compute(
DSMat &__restrict__ mat_A,
DDMat *const __restrict__ V0 =nullptr
)
Computes the AMG preconditioner in a distributed memory environment.
Parameters:
- mat_A system matrix.
Reimplements: Preconditioner::Compute
function Prepare_MxV
virtual void Prepare_MxV(
const iReg nRHS
)
Prepares the preconditioner application to a vector (DDMat).
Parameters:
- nRHS number of Right Hand Sides.
Reimplements: Preconditioner::Prepare_MxV
function UndoPrepare_MxV
virtual void UndoPrepare_MxV()
Undo the data structure necessary for MxV.
Reimplements: Preconditioner::UndoPrepare_MxV
function MxV
virtual void MxV(
DDMat &__restrict__ RHS,
DDMat &__restrict__ SOL,
bool Barrier_flag
)
Applies the preconditioner to a vector (DDMat): prec(A) * RHS = SOL.
Parameters:
- x vector that multiplies the Preconditioner.
- b vector where result is stored.
- Barrier_flag if true global Barrier is called before return.
Reimplements: Preconditioner::MxV
function MxM
virtual void MxM(
DSMat &__restrict__ Mat,
DSMat &__restrict__ PrecMat
)
Applies the preconditioner to a matrix (DSMat).
Parameters:
- Mat system matrix.
- PrecMat.
Reimplements: Preconditioner::MxM
function fPrintAll_ASCII
inline virtual void fPrintAll_ASCII(
const string & filename
) const
Prints the Operator in ASCII format.
Reimplements: Preconditioner::fPrintAll_ASCII
function Set_Parameters
virtual void Set_Parameters(
const void * params
)
Sets the aAMG parameters.
Parameters:
- params input parameters.
Reimplements: Preconditioner::Set_Parameters
function Get_nnz
inline virtual iExt Get_nnz() const
Returns an estimate of the number of non-zeroes of the preconditioner application.
Reimplements: Preconditioner::Get_nnz
function Get_FlopEst
inline virtual iExt Get_FlopEst() const
Returns an estimate of the number of FLOPS needed to perform the preconditioner application.
Reimplements: Preconditioner::Get_FlopEst
function Set_CycleType
inline void Set_CycleType(
const iReg __restrict__ input_CycleType
)
Sets the multigrid cycle type.
function Set_maxNlevel
inline void Set_maxNlevel(
const iReg __restrict__ input_maxNlevel
)
Sets the maximum number of levels.
function Set_maxCoarseSize
inline void Set_maxCoarseSize(
const iReg __restrict__ input_maxCoarseSize
)
Sets the maximum size of the coarsen grid.
function TSPACE_Set_ntv
inline void TSPACE_Set_ntv(
const iReg __restrict__ input_ntv
)
Sets the Tspace’s number of test vectors.
function TSPACE_Set_method
inline void TSPACE_Set_method(
const iReg __restrict__ input_method
)
Sets the Eigensolver used to compute test vectors.
function TSPACE_Set_maxITER
inline void TSPACE_Set_maxITER(
const iReg __restrict__ input_maxITER
)
Sets the Tspace’s Maximum number of iterations.
function TSPACE_Set_exitTOL
inline void TSPACE_Set_exitTOL(
const rExt __restrict__ input_exitTOL
)
Sets the Tspace’s exit tolerance.
function TSPACE_Set_orth_freq
inline void TSPACE_Set_orth_freq(
const iReg __restrict__ input_orth_freq
)
Sets the Tspace’s orth_freq.
function TSPACE_Set_ritz_freq
inline void TSPACE_Set_ritz_freq(
const iReg __restrict__ input_ritz_freq
)
Sets the Tspace’s ritz_freq.
function COARSEN_Set_type
inline void COARSEN_Set_type(
const iReg __restrict__ input_type
)
Sets the Coarsen’s type.
function COARSEN_Set_tau
inline void COARSEN_Set_tau(
const rExt __restrict__ input_tau
)
Sets the Coarsen’s tolerance for filtering.
function COARSEN_Set_tau_jump
inline void COARSEN_Set_tau_jump(
const rExt __restrict__ input_tau_jump
)
Sets the Coarsen’s tolerance for filtering.
function PROLONGATION_Set_type
inline void PROLONGATION_Set_type(
const iReg input_type
)
Sets the Prolongation’s type.
function PROLONGATION_Set_nPow
inline void PROLONGATION_Set_nPow(
const iReg input_nPow
)
Sets the Prolongation’s power pattern.
function PROLONGATION_Set_smooth
inline void PROLONGATION_Set_smooth(
iReg __restrict__ input_smooth
)
Sets the Prolongation’s smoothing.
function PROLONGATION_Set_stronly
inline void PROLONGATION_Set_stronly(
const iReg __restrict__ input_stronly
)
Sets the Prolongartion’s stronly.
function PROLONGATION_Set_maxrownrm
inline void PROLONGATION_Set_maxrownrm(
const rExt __restrict__ input_maxrownrm
)
Sets the Prolongartion’s maxrownrm.
function PROLONGATION_Set_maxcond
inline void PROLONGATION_Set_maxcond(
const rExt __restrict__ input_maxcond
)
Sets the Prolongartion’s maxcond.
function PROLONGATION_Set_itmax_vol
inline void PROLONGATION_Set_itmax_vol(
const iReg __restrict__ input_itmax_vol
)
Sets the Prolongartion’s itmax_vol.
function PROLONGATION_Set_tol_vol
inline void PROLONGATION_Set_tol_vol(
const rExt __restrict__ input_tol_vol
)
Sets the Prolongartion’s tol_vol.
function PROLONGATION_Set_eps
inline void PROLONGATION_Set_eps(
const rExt __restrict__ input_eps
)
Sets the Prolongartion’s eps.
function PROLONGATION_Set_dist_min
inline void PROLONGATION_Set_dist_min(
const iReg __restrict__ input_dist_min
)
Sets the Prolongartion’s dist_min.
function PROLONGATION_Set_dist_max
inline void PROLONGATION_Set_dist_max(
const iReg __restrict__ input_dist_max
)
Sets the Prolongartion’s dist_max.
function PROLONGATION_Set_mmax
inline void PROLONGATION_Set_mmax(
const iReg __restrict__ input_mmax
)
Sets the Prolongartion’s mmax.
function FILTER_Set_Prol_Weight
inline void FILTER_Set_Prol_Weight(
const rExt input_Prol_Weight
)
Sets Prol_Weight.
function FILTER_Set_Prol_Tol
inline void FILTER_Set_Prol_Tol(
const rExt input_Prol_Tol
)
Sets Prol_Tol.
function FILTER_Set_Oper_Weight
inline void FILTER_Set_Oper_Weight(
const rExt input_Oper_Weight
)
Sets Oper_Weight.
function SMOOTHER_Set_type
inline void SMOOTHER_Set_type(
const iReg __restrict__ input_type
)
Sets the Smoother’s type.
function SMOOTHER_Set_omega
inline void SMOOTHER_Set_omega(
const rExt __restrict__ input_omega
)
Sets the Smoother’s weight.
function SMOOTHER_Set_itmax_maxeig
inline void SMOOTHER_Set_itmax_maxeig(
const iReg __restrict__ input_itmax_maxeig
)
Sets the Maximum number of iterations to compute max eigenvalue (estimate omega).
function SMOOTHER_Set_tol_maxeig
inline void SMOOTHER_Set_tol_maxeig(
const rExt __restrict__ input_tol_maxeig
)
Sets the Exit tolerance to compute max eigenvalue (estimate omega).
function SMOOTHER_Set_nupre
inline void SMOOTHER_Set_nupre(
const iReg __restrict__ input_nupre
)
Sets the Number of pre-smoothing steps.
function SMOOTHER_Set_nupost
inline void SMOOTHER_Set_nupost(
const iReg __restrict__ input_nupost
)
Sets the Number of post-smoothing steps.
function SMOOTHER_Set_aFSAI_TargetPower
inline void SMOOTHER_Set_aFSAI_TargetPower(
const iReg __restrict__ input_afsai_TargetPower
)
Sets the Requested power for the communication Graph.
function SMOOTHER_Set_aFSAI_nstep
inline void SMOOTHER_Set_aFSAI_nstep(
const iReg __restrict__ input_afsai_nstep
)
Sets the Number of steps for computing the adaptive FSAI Smoother.
function SMOOTHER_Set_aFSAI_step_size
inline void SMOOTHER_Set_aFSAI_step_size(
const iReg __restrict__ input_afsai_step_size
)
Sets the Step size for computing the adaptive FSAI Smoother.
function SMOOTHER_Set_aFSAI_eps
inline void SMOOTHER_Set_aFSAI_eps(
const rExt __restrict__ input_afsai_eps
)
Sets the Exit tolerance for computing the adaptive FSAI Smoother.
Updated on 12 February 2021 at 11:59:50 CET