MatrixProd

This class is used to the Matrix by vector Product. More…

#include "MatrixProd.h"

Inherited by DSMat, IDMat, Preconditioner, SPMat

Public Functions

Name
MatrixProd & operator=(MatrixProd const & 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.
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 void copy(MatrixProd const & other) =0
virtual iReg get_nrows() const =0
Retrieve the number of rows.
virtual void Prepare_MxV(const iReg nRHS) =0
Create all the data structure needed for MxV.
virtual void UndoPrepare_MxV() =0
Undo the data structure necessary for MxV.
virtual void MxV(DDMat & x, DDMat & b, bool Barrier_flag) =0
Computes the Matrix by vector Product.
virtual bool isOnGPU() const =0
Check if the matrix is on GPU.
virtual ~MatrixProd() =0
Deletes the object.

Protected Functions

Name
void copy_MatrixProd(MatrixProd const & other)
Copy members.
virtual iGlo Get_Globalnrows_inner() const =0
Retrieve the global number of rows using a reduction.
virtual bool Check_inner() const =0
Internal check that is specific to all derived types.

Protected Attributes

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 MatrixProd;

This class is used to the Matrix by vector Product.

class MatrixProd.

Public Functions Documentation

function operator=

MatrixProd & operator=(
    MatrixProd const & other
)

Copy operator.

function get_Prepared_flag

bool get_Prepared_flag() const

Get flag for MxV prepare.

function get_nRHS_prep

iReg get_nRHS_prep() const

Get the number of rhs the matrix is prepared for.

function Get_Globalnrows

iGlo Get_Globalnrows() const

Retrieve the global number of rows using internal variable.

function Get_Globalnrows

iGlo Get_Globalnrows()

Retrieve the global number of rows using internal variable.

function set_Prepared_flag

void set_Prepared_flag(
    const bool input_Prepared_flag
)

Get flag for MxV prepare.

function Check

bool Check()

Checks that the MatrixProd instance has been correctly constructed.

function copy

virtual void copy(
    MatrixProd const & other
) =0

Reimplemented by: ReverseAugmentedStab_CPU::copy, SPMat_CPU::copy, IDMat::copy, aFSAI_CPU::copy, ReverseAugmented::copy, ReverseAugmentedStab::copy, DSMat_CPU::copy, aAMG::copy, Preconditioner::copy, aFSAI::copy, DSMat::copy

@ brief Copy.

function get_nrows

virtual iReg get_nrows() const =0

Retrieve the number of rows.

Reimplemented by: IDMat::get_nrows, ReverseAugmented::get_nrows, ReverseAugmentedStab::get_nrows, aAMG::get_nrows, aFSAI::get_nrows, SPMat::get_nrows, DSMat::get_nrows, Preconditioner::get_nrows

function Prepare_MxV

virtual void Prepare_MxV(
    const iReg nRHS
) =0

Create all the data structure needed for MxV.

Parameters:

  • nRHS number of Right Hand Sides.

Reimplemented by: ReverseAugmented::Prepare_MxV, IDMat::Prepare_MxV, ReverseAugmentedStab::Prepare_MxV, aFSAI::Prepare_MxV, aAMG::Prepare_MxV, DSMat_CPU::Prepare_MxV, SPMat::Prepare_MxV, Preconditioner::Prepare_MxV, DSMat::Prepare_MxV

function UndoPrepare_MxV

virtual void UndoPrepare_MxV() =0

Undo the data structure necessary for MxV.

Reimplemented by: ReverseAugmented::UndoPrepare_MxV, ReverseAugmentedStab::UndoPrepare_MxV, IDMat::UndoPrepare_MxV, aFSAI::UndoPrepare_MxV, aAMG::UndoPrepare_MxV, DSMat_CPU::UndoPrepare_MxV, SPMat::UndoPrepare_MxV, Preconditioner::UndoPrepare_MxV, DSMat::UndoPrepare_MxV

function MxV

virtual void MxV(
    DDMat & x,
    DDMat & b,
    bool Barrier_flag
) =0

Computes the Matrix by vector Product.

Parameters:

  • x vector that multiplies the matrix.
  • b vector where result is stored.
  • Barrier_flag if true global Barrier is called before return.

Reimplemented by: aFSAI::MxV, aAMG::MxV, Preconditioner::MxV, IDMat::MxV, ReverseAugmented::MxV, ReverseAugmentedStab::MxV, DSMat_CPU::MxV, SPMat::MxV, DSMat::MxV

function isOnGPU

virtual bool isOnGPU() const =0

Check if the matrix is on GPU.

Reimplemented by: ReverseAugmentedStab_CPU::isOnGPU, SPMat_CPU::isOnGPU, aFSAI_CPU::isOnGPU, IDMat::isOnGPU, aAMG::isOnGPU, DSMat_CPU::isOnGPU, ReverseAugmented::isOnGPU, Preconditioner::isOnGPU, SPMat::isOnGPU, aFSAI::isOnGPU, DSMat::isOnGPU, ReverseAugmentedStab::isOnGPU

function ~MatrixProd

virtual ~MatrixProd() =0

Deletes the object.

Protected Functions Documentation

function copy_MatrixProd

void copy_MatrixProd(
    MatrixProd const & other
)

Copy members.

function Get_Globalnrows_inner

virtual iGlo Get_Globalnrows_inner() const =0

Retrieve the global number of rows using a reduction.

Reimplemented by: IDMat::Get_Globalnrows_inner, aAMG::Get_Globalnrows_inner, aFSAI::Get_Globalnrows_inner, ReverseAugmented::Get_Globalnrows_inner, ReverseAugmentedStab::Get_Globalnrows_inner, SPMat::Get_Globalnrows_inner, DSMat::Get_Globalnrows_inner, Preconditioner::Get_Globalnrows_inner

function Check_inner

virtual bool Check_inner() const =0

Internal check that is specific to all derived types.

Reimplemented by: IDMat::Check_inner, aAMG::Check_inner, aFSAI::Check_inner, ReverseAugmented::Check_inner, ReverseAugmentedStab::Check_inner, DSMat::Check_inner, SPMat::Check_inner, Preconditioner::Check_inner

Protected Attributes Documentation

variable glob_nrows

iGlo glob_nrows = 0;

total number of rows (matrix size).

variable Prepared_flag

bool Prepared_flag = false;

flag for MxV prepare.

variable nRHS_prep

iReg nRHS_prep = 0;

number of rhs the matrix is prepared for


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