Preconditioner

This class is used to manage the preconditioner. More…

#include "Preconditioner.h"

Inherits from MatrixProd

Inherited by aAMG, aFSAI, ReverseAugmented, ReverseAugmentedStab

Public Functions

Name
Preconditioner & operator=(Preconditioner const & other)
Copy operator.
virtual ~Preconditioner() =0
Deletes the object.
virtual void copy(MatrixProd const & other) =0
Copy operator.
virtual void Compute(DSMat & mat_A, DDMat *restrict V0 =nullptr) =0
Computes the preconditioner in a distributed memory environment.
virtual void Compute(MatrixProd & mat_A, DDMat *restrict V0 =nullptr) =0
virtual void Prepare_MxV(const iReg nRHS) =0
Prepares the preconditioner application to a vector (DDMat).
virtual void UndoPrepare_MxV() =0
Undo the data structure necessary for MxV.
virtual void MxV(DDMat & RHS, DDMat & SOL, bool Barrier_flag) =0
Applies the preconditioner to a vector (DDMat): prec(A) * RHS = SOL.
virtual void MxM(DSMat & Mat, DSMat & PrecMat) =0
Applies the preconditioner to a matrix (DSMat).
virtual iReg get_nrows() const =0
Retrieve the number of rows.
virtual iExt Get_nnz() const =0
Returns an estimate of the number of non-zeroes of the preconditioner on this process.
virtual long int Get_FlopEst() const =0
Returns an estimate of the number of FLOP needed to perform the preconditioner application on this process.
virtual void Set_Parameters(const void * params) =0
Sets the preconditioner parameters.
virtual void DumpAllParms(FILE * ofile) const =0
Dumps all of the AMG parameters.
virtual void Print_ASCII(const string & filename) const =0
Prints the Preconditioner in ASCII format.
virtual bool isOnGPU() const =0
Check if the matrix is on GPU.

Protected Functions

Name
void copy_Preconditioner(Preconditioner const & other)
Copy members.
virtual iGlo Get_Globalnrows_inner() const =0
Retrieve the global number of rows.
virtual bool Check_inner() const =0

Additional inherited members

Public Functions inherited from MatrixProd

Name
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.
iGlo Get_Globalnrows() const
Retrieve the global number of rows using internal variable.
iGlo Get_Globalnrows()
Retrieve the global number of rows using internal variable.
void set_Prepared_flag(const bool input_Prepared_flag)
Get flag for MxV prepare.
bool Check()
Checks that the MatrixProd instance has been correctly constructed.
virtual ~MatrixProd() =0
Deletes the object.

Protected Functions inherited from MatrixProd

Name
void copy_MatrixProd(MatrixProd const & other)
Copy members.

Protected Attributes inherited from MatrixProd

Name
iGlo glob_nrows
total number of rows (matrix size).
bool Prepared_flag
flag for MxV prepare.
iReg nRHS_prep
number of rhs the matrix is prepared for

Detailed Description

class Preconditioner;

This class is used to manage the preconditioner.

class Preconditioner.

Public Functions Documentation

function operator=

Preconditioner & operator=(
    Preconditioner const & other
)

Copy operator.

function ~Preconditioner

virtual ~Preconditioner() =0

Deletes the object.

function copy

virtual void copy(
    MatrixProd const & other
) =0

Copy operator.

Reimplements: MatrixProd::copy

Reimplemented by: ReverseAugmentedStab_CPU::copy, aFSAI_CPU::copy, ReverseAugmented::copy, ReverseAugmentedStab::copy, aAMG::copy, aFSAI::copy

function Compute

virtual void Compute(
    DSMat & mat_A,
    DDMat *__restrict__ V0 =nullptr
) =0

Computes the preconditioner in a distributed memory environment.

Parameters:

  • mat_A system matrix.

Reimplemented by: aFSAI_CPU::Compute, aFSAI::Compute, aAMG::Compute, ReverseAugmented::Compute, ReverseAugmentedStab::Compute

function Compute

virtual void Compute(
    MatrixProd & mat_A,
    DDMat *__restrict__ V0 =nullptr
) =0

Reimplemented by: aFSAI_CPU::Compute, aFSAI::Compute, aAMG::Compute, ReverseAugmented::Compute, ReverseAugmentedStab::Compute

function Prepare_MxV

virtual void Prepare_MxV(
    const iReg nRHS
) =0

Prepares the preconditioner application to a vector (DDMat).

Parameters:

  • nRHS number of Right Hand Sides.

Reimplements: MatrixProd::Prepare_MxV

Reimplemented by: ReverseAugmented::Prepare_MxV, ReverseAugmentedStab::Prepare_MxV, aFSAI::Prepare_MxV, aAMG::Prepare_MxV

function UndoPrepare_MxV

virtual void UndoPrepare_MxV() =0

Undo the data structure necessary for MxV.

Reimplements: MatrixProd::UndoPrepare_MxV

Reimplemented by: ReverseAugmented::UndoPrepare_MxV, ReverseAugmentedStab::UndoPrepare_MxV, aFSAI::UndoPrepare_MxV, aAMG::UndoPrepare_MxV

function MxV

virtual void MxV(
    DDMat & RHS,
    DDMat & SOL,
    bool Barrier_flag
) =0

Applies the preconditioner to a vector (DDMat): prec(A) * RHS = SOL.

Parameters:

  • RHS vector that multiplies the Preconditioner.
  • SOL vector where result is stored.
  • Barrier_flag if true global Barrier is called before return.

Reimplements: MatrixProd::MxV

Reimplemented by: aFSAI::MxV, aAMG::MxV, ReverseAugmented::MxV, ReverseAugmentedStab::MxV

function MxM

virtual void MxM(
    DSMat & Mat,
    DSMat & PrecMat
) =0

Applies the preconditioner to a matrix (DSMat).

Parameters:

  • Mat system matrix.
  • PrecMat.

Reimplemented by: ReverseAugmented::MxM, ReverseAugmentedStab::MxM, aFSAI::MxM, aAMG::MxM

function get_nrows

virtual iReg get_nrows() const =0

Retrieve the number of rows.

Reimplements: MatrixProd::get_nrows

Reimplemented by: ReverseAugmented::get_nrows, ReverseAugmentedStab::get_nrows, aAMG::get_nrows, aFSAI::get_nrows

function Get_nnz

virtual iExt Get_nnz() const =0

Returns an estimate of the number of non-zeroes of the preconditioner on this process.

Reimplemented by: ReverseAugmented::Get_nnz, ReverseAugmentedStab::Get_nnz, aAMG::Get_nnz, aFSAI::Get_nnz

function Get_FlopEst

virtual long int Get_FlopEst() const =0

Returns an estimate of the number of FLOP needed to perform the preconditioner application on this process.

Reimplemented by: ReverseAugmented::Get_FlopEst, ReverseAugmentedStab::Get_FlopEst, aAMG::Get_FlopEst, aFSAI::Get_FlopEst

function Set_Parameters

virtual void Set_Parameters(
    const void * params
) =0

Sets the preconditioner parameters.

Parameters:

  • params input parameters.

Reimplemented by: ReverseAugmented::Set_Parameters, ReverseAugmentedStab::Set_Parameters, aAMG::Set_Parameters, aFSAI::Set_Parameters

function DumpAllParms

virtual void DumpAllParms(
    FILE * ofile
) const =0

Dumps all of the AMG parameters.

Reimplemented by: ReverseAugmented::DumpAllParms, ReverseAugmentedStab::DumpAllParms, aFSAI::DumpAllParms, aAMG::DumpAllParms

function Print_ASCII

virtual void Print_ASCII(
    const string & filename
) const =0

Prints the Preconditioner in ASCII format.

Reimplemented by: ReverseAugmented::Print_ASCII, ReverseAugmentedStab::Print_ASCII, aAMG::Print_ASCII, aFSAI::Print_ASCII

function isOnGPU

virtual bool isOnGPU() const =0

Check if the matrix is on GPU.

Reimplements: MatrixProd::isOnGPU

Reimplemented by: ReverseAugmentedStab_CPU::isOnGPU, aFSAI_CPU::isOnGPU, aAMG::isOnGPU, ReverseAugmented::isOnGPU, aFSAI::isOnGPU, ReverseAugmentedStab::isOnGPU

Protected Functions Documentation

function copy_Preconditioner

void copy_Preconditioner(
    Preconditioner const & other
)

Copy members.

function Get_Globalnrows_inner

virtual iGlo Get_Globalnrows_inner() const =0

Retrieve the global number of rows.

Reimplements: MatrixProd::Get_Globalnrows_inner

Reimplemented by: aAMG::Get_Globalnrows_inner, aFSAI::Get_Globalnrows_inner, ReverseAugmented::Get_Globalnrows_inner, ReverseAugmentedStab::Get_Globalnrows_inner

function Check_inner

virtual bool Check_inner() const =0

Reimplements: MatrixProd::Check_inner

Reimplemented by: aAMG::Check_inner, aFSAI::Check_inner, ReverseAugmented::Check_inner, ReverseAugmentedStab::Check_inner

Internal check of consistency of the Preconditioner instance.


Updated on 19 November 2024 at 10:20:48 CET