Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Types | List of all members
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config > Class Template Reference

#include <AMPCSRMatrixParameters.h>

Inheritance diagram for AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >:
Inheritance graph
[legend]

Public Member Functions

 AMPCSRMatrixParameters ()=delete
 
 AMPCSRMatrixParameters (int64_t fid, AMP::IO::RestartManager *manager)
 Read restart data from file.
 
 AMPCSRMatrixParameters (std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, AMP::Utilities::Backend backend, std::shared_ptr< GetRowHelper > getRowHelper)
 Constructor.
 
 AMPCSRMatrixParameters (std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< CommunicationList > commListLeft, std::shared_ptr< CommunicationList > commListRight, AMP::Utilities::Backend backend, std::shared_ptr< GetRowHelper > getRowHelper)
 Constructor.
 
 AMPCSRMatrixParameters (std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< CommunicationList > commListLeft, std::shared_ptr< CommunicationList > commListRight, std::shared_ptr< GetRowHelper > getRowHelper)
 Constructor.
 
 AMPCSRMatrixParameters (std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< GetRowHelper > getRowHelper)
 Constructor.
 
 AMPCSRMatrixParameters (std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight, AMP::Utilities::Backend backend, std::shared_ptr< GetRowHelper > getRowHelper)
 Constructor.
 
 AMPCSRMatrixParameters (std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight, std::shared_ptr< CommunicationList > commListLeft, std::shared_ptr< CommunicationList > commListRight, AMP::Utilities::Backend backend, std::shared_ptr< GetRowHelper > getRowHelper)
 Constructor.
 
 AMPCSRMatrixParameters (std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight, std::shared_ptr< CommunicationList > commListLeft, std::shared_ptr< CommunicationList > commListRight, std::shared_ptr< GetRowHelper > getRowHelper)
 Constructor.
 
 AMPCSRMatrixParameters (std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight, std::shared_ptr< GetRowHelper > getRowHelper)
 Constructor.
 
AMP::AMP_MPIgetComm ()
 Get the communicator for the matrix.
 
size_t getGlobalNumberOfColumns () const
 Return the global number of columns.
 
size_t getGlobalNumberOfRows () const
 Return the global number of rows.
 
uint64_t getID () const
 Get a unique id hash.
 
std::shared_ptr< CommunicationListgetLeftCommList ()
 Get the communication list for the left vector.
 
std::shared_ptr< AMP::Discretization::DOFManagergetLeftDOFManager ()
 
std::shared_ptr< VariablegetLeftVariable () const
 
size_t getLocalNumberOfColumns () const
 Return the local number of columns.
 
size_t getLocalNumberOfRows () const
 Return the local number of rows.
 
std::shared_ptr< CommunicationListgetRightCommList ()
 Get the communication list for the right vector.
 
std::shared_ptr< AMP::Discretization::DOFManagergetRightDOFManager ()
 
std::shared_ptr< VariablegetRightVariable () const
 
const std::function< std::vector< size_t >(size_t)> & getRowFunction () const
 Get the bound function that generates column IDs for each row.
 
void registerChildObjects (AMP::IO::RestartManager *manager) const override
 Register any child objects.
 
void setLeftVariable (std::shared_ptr< Variable > var)
 
void setRightVariable (std::shared_ptr< Variable > var)
 
std::string type () const override
 type of this object
 
void writeRestart (int64_t fid) const override
 Write restart data to file.
 

Public Attributes

AMP::Utilities::Backend d_backend = AMP::Utilities::Backend::Serial
 
const std::shared_ptr< GetRowHelperd_getRowHelper
 
uint64_t d_hash = 0
 

Protected Member Functions

void generateCommLists ()
 

Protected Attributes

AMP_MPI d_comm
 
std::shared_ptr< CommunicationListd_CommListLeft
 
std::shared_ptr< CommunicationListd_CommListRight
 
std::shared_ptr< AMP::Discretization::DOFManagerd_DOFManagerLeft
 
std::shared_ptr< AMP::Discretization::DOFManagerd_DOFManagerRight
 
std::function< std::vector< size_t >(size_t)> d_getRow
 Function that generates column ids for each row of the matrix.
 
std::shared_ptr< Variabled_VariableLeft
 
std::shared_ptr< Variabled_VariableRight
 

Private Types

using gidx_t = typename Config::gidx_t
 
using lidx_t = typename Config::lidx_t
 

Detailed Description

template<typename Config>
class AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >

Definition at line 16 of file AMPCSRMatrixParameters.h.

Member Typedef Documentation

◆ gidx_t

template<typename Config >
using AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::gidx_t = typename Config::gidx_t
private

Definition at line 18 of file AMPCSRMatrixParameters.h.

◆ lidx_t

template<typename Config >
using AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::lidx_t = typename Config::lidx_t
private

Definition at line 19 of file AMPCSRMatrixParameters.h.

Constructor & Destructor Documentation

◆ AMPCSRMatrixParameters() [1/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( )
delete

◆ AMPCSRMatrixParameters() [2/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( std::shared_ptr< AMP::Discretization::DOFManager dofLeft,
std::shared_ptr< AMP::Discretization::DOFManager dofRight,
const AMP_MPI comm,
std::shared_ptr< GetRowHelper getRowHelper 
)
explicit

Constructor.

Parameters
[in]dofLeftThe DOFManager for the left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )
[in]dofRightThe DOFManager for the right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )
[in]commCommunicator for the matrix
[in]getRowHelperObject providing NNZ counts and column indices per row

◆ AMPCSRMatrixParameters() [3/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( std::shared_ptr< AMP::Discretization::DOFManager dofLeft,
std::shared_ptr< AMP::Discretization::DOFManager dofRight,
const AMP_MPI comm,
AMP::Utilities::Backend  backend,
std::shared_ptr< GetRowHelper getRowHelper 
)
explicit

Constructor.

Parameters
[in]dofLeftThe DOFManager for the left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )
[in]dofRightThe DOFManager for the right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )
[in]commCommunicator for the matrix
[in]backendAcceleration backend for matrix operations
[in]getRowHelperObject providing NNZ counts and column indices per row

◆ AMPCSRMatrixParameters() [4/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( std::shared_ptr< AMP::Discretization::DOFManager dofLeft,
std::shared_ptr< AMP::Discretization::DOFManager dofRight,
const AMP_MPI comm,
std::shared_ptr< Variable varLeft,
std::shared_ptr< Variable varRight,
std::shared_ptr< GetRowHelper getRowHelper 
)
explicit

Constructor.

Parameters
[in]dofLeftThe DOFManager for the left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )
[in]dofRightThe DOFManager for the right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )
[in]commCommunicator for the matrix
[in]varLeftPointer to left variable
[in]varRightPointer to right variable
[in]getRowHelperObject providing NNZ counts and column indices per row

◆ AMPCSRMatrixParameters() [5/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( std::shared_ptr< AMP::Discretization::DOFManager dofLeft,
std::shared_ptr< AMP::Discretization::DOFManager dofRight,
const AMP_MPI comm,
std::shared_ptr< Variable varLeft,
std::shared_ptr< Variable varRight,
AMP::Utilities::Backend  backend,
std::shared_ptr< GetRowHelper getRowHelper 
)
explicit

Constructor.

Parameters
[in]dofLeftThe DOFManager for the left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )
[in]dofRightThe DOFManager for the right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )
[in]commCommunicator for the matrix
[in]varLeftPointer to left variable
[in]varRightPointer to right variable
[in]backendAcceleration backend for matrix operations
[in]getRowHelperObject providing NNZ counts and column indices per row

◆ AMPCSRMatrixParameters() [6/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( std::shared_ptr< AMP::Discretization::DOFManager dofLeft,
std::shared_ptr< AMP::Discretization::DOFManager dofRight,
const AMP_MPI comm,
std::shared_ptr< CommunicationList commListLeft,
std::shared_ptr< CommunicationList commListRight,
std::shared_ptr< GetRowHelper getRowHelper 
)
explicit

Constructor.

Parameters
[in]dofLeftThe DOFManager for the left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )
[in]dofRightThe DOFManager for the right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )
[in]commCommunicator for the matrix
[in]commListLeftCommunication list for the left vector
[in]commListRightCommunication list for the right vector
[in]getRowHelperObject providing NNZ counts and column indices per row

◆ AMPCSRMatrixParameters() [7/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( std::shared_ptr< AMP::Discretization::DOFManager dofLeft,
std::shared_ptr< AMP::Discretization::DOFManager dofRight,
const AMP_MPI comm,
std::shared_ptr< CommunicationList commListLeft,
std::shared_ptr< CommunicationList commListRight,
AMP::Utilities::Backend  backend,
std::shared_ptr< GetRowHelper getRowHelper 
)
explicit

Constructor.

Parameters
[in]dofLeftThe DOFManager for the left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )
[in]dofRightThe DOFManager for the right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )
[in]commCommunicator for the matrix
[in]commListLeftCommunication list for the left vector
[in]commListRightCommunication list for the right vector
[in]backendAcceleration backend for matrix operations
[in]getRowHelperObject providing NNZ counts and column indices per row

◆ AMPCSRMatrixParameters() [8/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( std::shared_ptr< AMP::Discretization::DOFManager dofLeft,
std::shared_ptr< AMP::Discretization::DOFManager dofRight,
const AMP_MPI comm,
std::shared_ptr< Variable varLeft,
std::shared_ptr< Variable varRight,
std::shared_ptr< CommunicationList commListLeft,
std::shared_ptr< CommunicationList commListRight,
std::shared_ptr< GetRowHelper getRowHelper 
)
explicit

Constructor.

Parameters
[in]dofLeftThe DOFManager for the left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )
[in]dofRightThe DOFManager for the right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )
[in]commCommunicator for the matrix
[in]varLeftPointer to left variable
[in]varRightPointer to right variable
[in]commListLeftCommunication list for the left vector
[in]commListRightCommunication list for the right vector
[in]getRowHelperObject providing NNZ counts and column indices per row

◆ AMPCSRMatrixParameters() [9/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( std::shared_ptr< AMP::Discretization::DOFManager dofLeft,
std::shared_ptr< AMP::Discretization::DOFManager dofRight,
const AMP_MPI comm,
std::shared_ptr< Variable varLeft,
std::shared_ptr< Variable varRight,
std::shared_ptr< CommunicationList commListLeft,
std::shared_ptr< CommunicationList commListRight,
AMP::Utilities::Backend  backend,
std::shared_ptr< GetRowHelper getRowHelper 
)
explicit

Constructor.

Parameters
[in]dofLeftThe DOFManager for the left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )
[in]dofRightThe DOFManager for the right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )
[in]commCommunicator for the matrix
[in]varLeftPointer to left variable
[in]varRightPointer to right variable
[in]commListLeftCommunication list for the left vector
[in]commListRightCommunication list for the right vector
[in]backendAcceleration backend for matrix operations
[in]getRowHelperObject providing NNZ counts and column indices per row

◆ AMPCSRMatrixParameters() [10/10]

template<typename Config >
AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::AMPCSRMatrixParameters ( int64_t  fid,
AMP::IO::RestartManager manager 
)

Read restart data from file.

Parameters
fidFile identifier to write
managerRestart manager

Member Function Documentation

◆ generateCommLists()

void AMP::LinearAlgebra::MatrixParameters::generateCommLists ( )
protectedinherited

◆ getComm()

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

Get the communicator for the matrix.

Definition at line 90 of file MatrixParametersBase.h.

References AMP::LinearAlgebra::MatrixParametersBase::d_comm.

◆ getGlobalNumberOfColumns()

size_t AMP::LinearAlgebra::MatrixParameters::getGlobalNumberOfColumns ( ) const
inherited

Return the global number of columns.

◆ getGlobalNumberOfRows()

size_t AMP::LinearAlgebra::MatrixParameters::getGlobalNumberOfRows ( ) const
inherited

Return the global number of rows.

◆ getID()

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

Get a unique id hash.

Definition at line 84 of file MatrixParametersBase.h.

References AMP::LinearAlgebra::MatrixParametersBase::d_hash.

◆ getLeftCommList()

std::shared_ptr< CommunicationList > AMP::LinearAlgebra::MatrixParameters::getLeftCommList ( )
inherited

Get the communication list for the left vector.

◆ getLeftDOFManager()

std::shared_ptr< AMP::Discretization::DOFManager > AMP::LinearAlgebra::MatrixParameters::getLeftDOFManager ( )
inherited

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

◆ getLeftVariable()

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

◆ getLocalNumberOfColumns()

size_t AMP::LinearAlgebra::MatrixParameters::getLocalNumberOfColumns ( ) const
inherited

Return the local number of columns.

◆ getLocalNumberOfRows()

size_t AMP::LinearAlgebra::MatrixParameters::getLocalNumberOfRows ( ) const
inherited

Return the local number of rows.

◆ getRightCommList()

std::shared_ptr< CommunicationList > AMP::LinearAlgebra::MatrixParameters::getRightCommList ( )
inherited

Get the communication list for the right vector.

◆ getRightDOFManager()

std::shared_ptr< AMP::Discretization::DOFManager > AMP::LinearAlgebra::MatrixParameters::getRightDOFManager ( )
inherited

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

◆ getRightVariable()

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

◆ getRowFunction()

const std::function< std::vector< size_t >(size_t)> & AMP::LinearAlgebra::MatrixParameters::getRowFunction ( ) const
inlineinherited

Get the bound function that generates column IDs for each row.

Definition at line 181 of file MatrixParameters.h.

References AMP::LinearAlgebra::MatrixParameters::d_getRow.

◆ registerChildObjects()

template<typename Config >
void AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::registerChildObjects ( AMP::IO::RestartManager manager) const
overridevirtual

Register any child objects.

This function will register child objects with the manager

Parameters
managerRestart manager

Reimplemented from AMP::LinearAlgebra::MatrixParametersBase.

◆ setLeftVariable()

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

◆ setRightVariable()

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

◆ type()

template<typename Config >
std::string AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::type ( ) const
inlineoverridevirtual

type of this object

Reimplemented from AMP::LinearAlgebra::MatrixParametersBase.

Definition at line 168 of file AMPCSRMatrixParameters.h.

◆ writeRestart()

template<typename Config >
void AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::writeRestart ( int64_t  fid) const
overridevirtual

Write restart data to file.

This function will write the mesh to an HDF5 file

Parameters
fidFile identifier to write

Reimplemented from AMP::LinearAlgebra::MatrixParametersBase.

Member Data Documentation

◆ d_backend

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

Definition at line 136 of file MatrixParametersBase.h.

◆ d_comm

AMP_MPI AMP::LinearAlgebra::MatrixParametersBase::d_comm
protectedinherited

◆ d_CommListLeft

std::shared_ptr<CommunicationList> AMP::LinearAlgebra::MatrixParameters::d_CommListLeft
protectedinherited

The communication list of a left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(y\) is a left vector )

Definition at line 233 of file MatrixParameters.h.

◆ d_CommListRight

std::shared_ptr<CommunicationList> AMP::LinearAlgebra::MatrixParameters::d_CommListRight
protectedinherited

The communication list of a right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(x\) is a right vector )

Definition at line 237 of file MatrixParameters.h.

◆ d_DOFManagerLeft

std::shared_ptr<AMP::Discretization::DOFManager> AMP::LinearAlgebra::MatrixParameters::d_DOFManagerLeft
protectedinherited

Definition at line 226 of file MatrixParameters.h.

◆ d_DOFManagerRight

std::shared_ptr<AMP::Discretization::DOFManager> AMP::LinearAlgebra::MatrixParameters::d_DOFManagerRight
protectedinherited

Definition at line 229 of file MatrixParameters.h.

◆ d_getRow

std::function<std::vector<size_t>( size_t )> AMP::LinearAlgebra::MatrixParameters::d_getRow
protectedinherited

Function that generates column ids for each row of the matrix.

Definition at line 240 of file MatrixParameters.h.

Referenced by AMP::LinearAlgebra::MatrixParameters::getRowFunction().

◆ d_getRowHelper

template<typename Config >
const std::shared_ptr<GetRowHelper> AMP::LinearAlgebra::AMPCSRMatrixParameters< Config >::d_getRowHelper

Definition at line 193 of file AMPCSRMatrixParameters.h.

◆ d_hash

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

◆ d_VariableLeft

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

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 AMP::LinearAlgebra::MatrixParametersBase::getLeftVariable(), and AMP::LinearAlgebra::MatrixParametersBase::setLeftVariable().

◆ d_VariableRight

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

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 AMP::LinearAlgebra::MatrixParametersBase::getRightVariable(), and AMP::LinearAlgebra::MatrixParametersBase::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