SMOOTHER

This class is used to manage the smoother for AMG. More…

#include "SMOOTHER.h"

Public Functions

Name
SMOOTHER(const SMOOTHER_params & input_params)
Constructs the object.
~SMOOTHER()
Deletes the object.
void Compute(DSMat &restrict mat_A)
Computes the operator.
void Prepare_Apply(const iReg nRHS)
Prepares the operator application.
void UndoPrepare_Apply()
Undo the data structure necessary for the application.
void fPrintAll_ASCII(const string & filename) const
Prints the Smoother Operator in ASCII format.
rExt Get_omega() const
Retrieves omega (smoother damping factor).
rExt Get_niter_S() const
Retrieves number of iterations to compute omega.
rExt Get_nrm_omega() const
Retrieves number of iterations to compute omega.
rExt Get_nnz_S() const
Retrieves number of non-zeroes of the smoother.
rExt Get_FlopEst_S() const
Retrieves Flop estimate for the application of the preconditioning matrix.
rExt Get_time_PR() const
Retrieves Computation time for the preconditioner.
rExt Get_time_OM() const
Retrieves Computation time for omega.
Preconditioner * Get_ptr_Prec()
Retrieves pointer to the preconditioner.
void Apply_Step(type_OMP_iReg nthreads, VEC< iReg > &restrict vecstart, const iReg nRHS, DSMat &restrict mat_A, DDMat &restrict RHS, DDMat &restrict iSOL, DDMat &restrict oSOL, DDMat &restrict WR1, DDMat &restrict WR2)
Applies a single step of the smoother.
void Apply_Pre_Smoothing(DSMat &restrict mat_A, DDMat &restrict RHS, DDMat &restrict SOL, DDMat &restrict WR1, DDMat &restrict WR2)
Applies an input number of pre-smoothing steps to a given vector.
void Apply_Post_Smoothing(DSMat &restrict mat_A, DDMat &restrict RHS, DDMat &restrict SOL, DDMat &restrict WR1, DDMat &restrict WR2)
Applies an input number of post-smoothing steps to a given vector.

Detailed Description

class SMOOTHER;

This class is used to manage the smoother for AMG.

class SMOOTHER.

Public Functions Documentation

function SMOOTHER

SMOOTHER(
    const SMOOTHER_params & input_params
)

Constructs the object.

function ~SMOOTHER

~SMOOTHER()

Deletes the object.

function Compute

void Compute(
    DSMat &__restrict__ mat_A
)

Computes the operator.

Parameters:

  • mat_A system matrix.

function Prepare_Apply

void Prepare_Apply(
    const iReg nRHS
)

Prepares the operator application.

Parameters:

  • nRHS number of Right Hand Sides.

function UndoPrepare_Apply

void UndoPrepare_Apply()

Undo the data structure necessary for the application.

function fPrintAll_ASCII

inline void fPrintAll_ASCII(
    const string & filename
) const

Prints the Smoother Operator in ASCII format.

function Get_omega

inline rExt Get_omega() const

Retrieves omega (smoother damping factor).

function Get_niter_S

inline rExt Get_niter_S() const

Retrieves number of iterations to compute omega.

function Get_nrm_omega

inline rExt Get_nrm_omega() const

Retrieves number of iterations to compute omega.

function Get_nnz_S

inline rExt Get_nnz_S() const

Retrieves number of non-zeroes of the smoother.

function Get_FlopEst_S

inline rExt Get_FlopEst_S() const

Retrieves Flop estimate for the application of the preconditioning matrix.

function Get_time_PR

inline rExt Get_time_PR() const

Retrieves Computation time for the preconditioner.

function Get_time_OM

inline rExt Get_time_OM() const

Retrieves Computation time for omega.

function Get_ptr_Prec

inline Preconditioner * Get_ptr_Prec()

Retrieves pointer to the preconditioner.

function Apply_Step

void Apply_Step(
    type_OMP_iReg nthreads,
    VEC< iReg > &__restrict__ vecstart,
    const iReg nRHS,
    DSMat &__restrict__ mat_A,
    DDMat &__restrict__ RHS,
    DDMat &__restrict__ iSOL,
    DDMat &__restrict__ oSOL,
    DDMat &__restrict__ WR1,
    DDMat &__restrict__ WR2
)

Applies a single step of the smoother.

Parameters:

  • nthreads number of computational omp threads.
  • vecstart pointer to the first unknown of each thread.
  • nRHS number of Right Hand Side.
  • mat_A system matrix.
  • RHS input vector to be smoothed.
  • iSOL input smoothed vector.
  • oSOL output smoothed vector.
  • WR1 global scratch vector 1.
  • WR2 global scratch vector 2.

function Apply_Pre_Smoothing

void Apply_Pre_Smoothing(
    DSMat &__restrict__ mat_A,
    DDMat &__restrict__ RHS,
    DDMat &__restrict__ SOL,
    DDMat &__restrict__ WR1,
    DDMat &__restrict__ WR2
)

Applies an input number of pre-smoothing steps to a given vector.

Parameters:

  • mat_A system matrix.
  • RHS input vector to be smoothed.
  • SOL output smoothed vector.
  • WR1 global scratch vector 1.
  • WR2 global scratch vector 2.

function Apply_Post_Smoothing

void Apply_Post_Smoothing(
    DSMat &__restrict__ mat_A,
    DDMat &__restrict__ RHS,
    DDMat &__restrict__ SOL,
    DDMat &__restrict__ WR1,
    DDMat &__restrict__ WR2
)

Applies an input number of post-smoothing steps to a given vector.

Parameters:

  • mat_A system matrix.
  • RHS input vector to be smoothed.
  • SOL output smoothed vector.
  • WR1 global scratch vector 1.
  • WR2 global scratch vector 2.

Updated on 12 February 2021 at 11:59:50 CET