Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Public Attributes | Protected Attributes | List of all members
AMP::LinearAlgebra::MatrixParametersBase Class Reference

A class used to hold basic parameters for a matrix. More...

#include <MatrixParametersBase.h>

Inheritance diagram for AMP::LinearAlgebra::MatrixParametersBase:
Inheritance graph
[legend]

Public Member Functions

AMP::AMP_MPIgetComm ()
 Get the communicator for the matrix.
 
uint64_t getID () const
 Get a unique id hash.
 
std::shared_ptr< VariablegetLeftVariable () const
 
std::shared_ptr< VariablegetRightVariable () const
 
 MatrixParametersBase ()=delete
 
 MatrixParametersBase (const AMP_MPI &comm)
 Constructor, variable names set to default.
 
 MatrixParametersBase (const AMP_MPI &comm, AMP::Utilities::Backend backend)
 Constructor, variable names set to default.
 
 MatrixParametersBase (const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight)
 Constructor, variable names provided.
 
 MatrixParametersBase (const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight, AMP::Utilities::Backend backend)
 Constructor, variable names provided.
 
 MatrixParametersBase (const MatrixParametersBase &other)=default
 
 MatrixParametersBase (int64_t fid, AMP::IO::RestartManager *manager)
 Read restart data from file.
 
virtual void registerChildObjects (AMP::IO::RestartManager *manager) const
 Register any child objects.
 
void setLeftVariable (std::shared_ptr< Variable > var)
 
void setRightVariable (std::shared_ptr< Variable > var)
 
virtual std::string type () const
 type of this object
 
virtual void writeRestart (int64_t fid) const
 Write restart data to file.
 
virtual ~MatrixParametersBase ()=default
 Deconstructor.
 

Public Attributes

AMP::Utilities::Backend d_backend = AMP::Utilities::Backend::Serial
 
uint64_t d_hash = 0
 

Protected Attributes

AMP_MPI d_comm
 
std::shared_ptr< Variabled_VariableLeft
 
std::shared_ptr< Variabled_VariableRight
 

Detailed Description

A class used to hold basic parameters for a matrix.

Definition at line 14 of file MatrixParametersBase.h.

Constructor & Destructor Documentation

◆ MatrixParametersBase() [1/7]

AMP::LinearAlgebra::MatrixParametersBase::MatrixParametersBase ( )
delete

◆ MatrixParametersBase() [2/7]

AMP::LinearAlgebra::MatrixParametersBase::MatrixParametersBase ( const MatrixParametersBase other)
default

◆ MatrixParametersBase() [3/7]

AMP::LinearAlgebra::MatrixParametersBase::MatrixParametersBase ( const AMP_MPI comm)
inlineexplicit

Constructor, variable names set to default.

Parameters
[in]commCommunicator for the matrix

Definition at line 24 of file MatrixParametersBase.h.

◆ MatrixParametersBase() [4/7]

AMP::LinearAlgebra::MatrixParametersBase::MatrixParametersBase ( const AMP_MPI comm,
AMP::Utilities::Backend  backend 
)
inlineexplicit

Constructor, variable names set to default.

Parameters
[in]commCommunicator for the matrix
[in]backendAcceleration backend for matrix operations

Definition at line 37 of file MatrixParametersBase.h.

◆ MatrixParametersBase() [5/7]

AMP::LinearAlgebra::MatrixParametersBase::MatrixParametersBase ( const AMP_MPI comm,
std::shared_ptr< Variable varLeft,
std::shared_ptr< Variable varRight 
)
inlineexplicit

Constructor, variable names provided.

Parameters
[in]commCommunicator for the matrix
[in]varLeftpointer to left variable
[in]varRightpointer to right variable

Definition at line 51 of file MatrixParametersBase.h.

◆ MatrixParametersBase() [6/7]

AMP::LinearAlgebra::MatrixParametersBase::MatrixParametersBase ( const AMP_MPI comm,
std::shared_ptr< Variable varLeft,
std::shared_ptr< Variable varRight,
AMP::Utilities::Backend  backend 
)
inlineexplicit

Constructor, variable names provided.

Parameters
[in]commCommunicator for the matrix
[in]varLeftpointer to left variable
[in]varRightpointer to right variable
[in]backendAcceleration backend for matrix operations

Definition at line 68 of file MatrixParametersBase.h.

◆ ~MatrixParametersBase()

virtual AMP::LinearAlgebra::MatrixParametersBase::~MatrixParametersBase ( )
virtualdefault

Deconstructor.

◆ MatrixParametersBase() [7/7]

AMP::LinearAlgebra::MatrixParametersBase::MatrixParametersBase ( int64_t  fid,
AMP::IO::RestartManager manager 
)

Read restart data from file.

Parameters
fidFile identifier to write
managerRestart manager

Member Function Documentation

◆ getComm()

AMP::AMP_MPI & AMP::LinearAlgebra::MatrixParametersBase::getComm ( )
inline

Get the communicator for the matrix.

Definition at line 90 of file MatrixParametersBase.h.

References d_comm.

◆ getID()

uint64_t AMP::LinearAlgebra::MatrixParametersBase::getID ( ) const
inline

Get a unique id hash.

Definition at line 84 of file MatrixParametersBase.h.

References d_hash.

◆ getLeftVariable()

std::shared_ptr< Variable > AMP::LinearAlgebra::MatrixParametersBase::getLeftVariable ( ) const
inline

Definition at line 96 of file MatrixParametersBase.h.

References d_VariableLeft.

◆ getRightVariable()

std::shared_ptr< Variable > AMP::LinearAlgebra::MatrixParametersBase::getRightVariable ( ) const
inline

Definition at line 98 of file MatrixParametersBase.h.

References d_VariableRight.

◆ registerChildObjects()

virtual void AMP::LinearAlgebra::MatrixParametersBase::registerChildObjects ( AMP::IO::RestartManager manager) const
virtual

Register any child objects.

This function will register child objects with the manager

Parameters
managerRestart manager

Reimplemented in AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >, AMP::LinearAlgebra::MatrixParameters, and AMP::LinearAlgebra::RawCSRMatrixParameters< Config >.

◆ setLeftVariable()

void AMP::LinearAlgebra::MatrixParametersBase::setLeftVariable ( std::shared_ptr< Variable var)
inline

Definition at line 92 of file MatrixParametersBase.h.

References d_VariableLeft.

◆ setRightVariable()

void AMP::LinearAlgebra::MatrixParametersBase::setRightVariable ( std::shared_ptr< Variable var)
inline

Definition at line 94 of file MatrixParametersBase.h.

References d_VariableRight.

◆ type()

virtual std::string AMP::LinearAlgebra::MatrixParametersBase::type ( ) const
inlinevirtual

◆ writeRestart()

virtual void AMP::LinearAlgebra::MatrixParametersBase::writeRestart ( int64_t  fid) const
virtual

Write restart data to file.

This function will write the mesh to an HDF5 file

Parameters
fidFile identifier to write

Reimplemented in AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >, AMP::LinearAlgebra::MatrixParameters, and AMP::LinearAlgebra::RawCSRMatrixParameters< Config >.

Member Data Documentation

◆ d_backend

AMP::Utilities::Backend AMP::LinearAlgebra::MatrixParametersBase::d_backend = AMP::Utilities::Backend::Serial

Definition at line 136 of file MatrixParametersBase.h.

◆ d_comm

AMP_MPI AMP::LinearAlgebra::MatrixParametersBase::d_comm
protected

Definition at line 124 of file MatrixParametersBase.h.

Referenced by getComm().

◆ d_hash

uint64_t AMP::LinearAlgebra::MatrixParametersBase::d_hash = 0

Definition at line 139 of file MatrixParametersBase.h.

Referenced by getID().

◆ d_VariableLeft

std::shared_ptr<Variable> AMP::LinearAlgebra::MatrixParametersBase::d_VariableLeft
protected

The variable for the left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )

Definition at line 128 of file MatrixParametersBase.h.

Referenced by getLeftVariable(), and setLeftVariable().

◆ d_VariableRight

std::shared_ptr<Variable> AMP::LinearAlgebra::MatrixParametersBase::d_VariableRight
protected

The variable for the right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )

Definition at line 132 of file MatrixParametersBase.h.

Referenced by getRightVariable(), and setRightVariable().


The documentation for this class was generated from the following file:



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:42.
Comments on this page