#include <MatrixData.h>

Public Member Functions | |
| template<class TYPE > | |
| void | addValuesByGlobalID (size_t num_rows, size_t num_cols, const size_t *rows, const size_t *cols, const TYPE *values) |
| Add values to those in the matrix. | |
| virtual void | addValuesByGlobalID (size_t num_rows, size_t num_cols, const size_t *rows, const size_t *cols, const void *values, const typeID &id)=0 |
| Add values to those in the matrix. | |
| virtual size_t | beginCol () const |
| Get the global id of first column in diagonal block. | |
| virtual size_t | beginRow () const |
| Get the global id of the beginning row. | |
| virtual std::shared_ptr< MatrixData > | cloneMatrixData () const =0 |
| Clone the data. | |
| virtual size_t | endCol () const |
| Get the global id of last column in diagonal block. | |
| virtual size_t | endRow () const |
| Get the global id of the ending row. | |
| virtual AMP::Utilities::Backend | getBackend () const |
| Get the backend. | |
| virtual typeID | getCoeffType () const =0 |
| Return the typeid of the matrix coeffs. | |
| virtual std::vector< size_t > | getColumnIDs (size_t row) const =0 |
| Given a row, retrieve the non-zero column indices of the matrix in compressed format. | |
| virtual AMP_MPI | getComm () const |
| Get the comm. | |
| uint64_t | getID () const |
| Get a unique id hash for the vector. | |
| virtual std::shared_ptr< Discretization::DOFManager > | getLeftDOFManager () const =0 |
| Get the DOFManager associated with a left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(\mathbf{y}\) is a left vector ) | |
| virtual std::shared_ptr< Variable > | getLeftVariable () const |
| Get the variable associated with a left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(\mathbf{y}\) is a left vector ) | |
| virtual std::shared_ptr< Discretization::DOFManager > | getRightDOFManager () const =0 |
| Get the DOFManager associated with a right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(\mathbf{x}\) is a right vector ) | |
| virtual std::shared_ptr< Variable > | getRightVariable () const |
| Get the variable associated with a right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(\mathbf{x}\) is a right vector ) | |
| virtual void | getRowByGlobalID (size_t row, std::vector< size_t > &cols, std::vector< double > &values) const =0 |
| Retrieve a row of the matrix in compressed format. | |
| template<class TYPE > | |
| void | getValuesByGlobalID (size_t num_rows, size_t num_cols, const size_t *rows, const size_t *cols, TYPE *values) const |
| Get values in the matrix. | |
| virtual void | getValuesByGlobalID (size_t num_rows, size_t num_cols, const size_t *rows, const size_t *cols, void *values, const typeID &id) const =0 |
| Get values in the matrix. | |
| virtual void | makeConsistent (AMP::LinearAlgebra::ScatterType t)=0 |
| Perform communication to ensure values in the matrix are the same across cores. | |
| MatrixData () | |
| Empty constructor. | |
| MatrixData (const MatrixData &)=delete | |
| Copy constructor. | |
| MatrixData (int64_t fid, AMP::IO::RestartManager *manager) | |
| MatrixData (std::shared_ptr< MatrixParametersBase > params) | |
| Constructor. | |
| virtual std::uint16_t | mode () const |
| Return CSR mode of the matrix. | |
| virtual size_t | numberColumnIDs (size_t row) const =0 |
| Given a row, retrieve the number of non-zero column indices of the matrix. | |
| virtual size_t | numGlobalColumns () const |
| Get the number of global columns in the matrix. | |
| virtual size_t | numGlobalRows () const |
| Get the number of global rows in the matrix. | |
| virtual size_t | numLocalColumns () const |
| Get the number of local columns in the matrix. | |
| virtual size_t | numLocalRows () const |
| Get the number of local rows in the matrix. | |
| virtual void | registerChildObjects (AMP::IO::RestartManager *manager) const |
| Register any child objects. | |
| virtual void | removeRange (AMP::Scalar bnd_lo, AMP::Scalar bnd_up)=0 |
| Remove matrix entries within given range. | |
| virtual void | setBackend (AMP::Utilities::Backend backend) |
| template<class TYPE > | |
| void | setValuesByGlobalID (size_t num_rows, size_t num_cols, const size_t *rows, const size_t *cols, const TYPE *values) |
| Set values in the matrix. | |
| virtual void | setValuesByGlobalID (size_t num_rows, size_t num_cols, const size_t *rows, const size_t *cols, const void *values, const typeID &id)=0 |
| Set values in the matrix. | |
| std::shared_ptr< MatrixData > | shared_from_this () |
| std::shared_ptr< const MatrixData > | shared_from_this () const |
| virtual std::shared_ptr< MatrixData > | transpose () const =0 |
| Transpose. | |
| virtual std::string | type () const =0 |
| Return the type of the matrix. | |
| virtual void | writeRestart (int64_t fid) const |
| Write restart data to file. | |
| virtual | ~MatrixData () |
| Destructor. | |
Protected Attributes | |
| uint64_t | d_hash = 0 |
| std::shared_ptr< MatrixParametersBase > | d_pParameters |
| std::weak_ptr< MatrixData > | weak_ptr_ |
Definition at line 27 of file MatrixData.h.
|
explicit |
Constructor.
| [in] | params | Description of the matrix |
|
virtual |
Destructor.
| AMP::LinearAlgebra::MatrixData::MatrixData | ( | ) |
Empty constructor.
|
delete |
Copy constructor.
| AMP::LinearAlgebra::MatrixData::MatrixData | ( | int64_t | fid, |
| AMP::IO::RestartManager * | manager | ||
| ) |
| void AMP::LinearAlgebra::MatrixData::addValuesByGlobalID | ( | size_t | num_rows, |
| size_t | num_cols, | ||
| const size_t * | rows, | ||
| const size_t * | cols, | ||
| const TYPE * | values | ||
| ) |
Add values to those in the matrix.
| [in] | num_rows | The number of rows represented in values |
| [in] | num_cols | The number of cols represented in values |
| [in] | rows | The row ids of values |
| [in] | cols | The column ids of values |
| [in] | values | The values to add to the matrix (row-major ordering) |
This method may fail if the matrix has not allocated a particular (row,col) specified, depending on the actual subclass of matrix used.
|
pure virtual |
Add values to those in the matrix.
| [in] | num_rows | The number of rows represented in values |
| [in] | num_cols | The number of cols represented in values |
| [in] | rows | The row ids of values |
| [in] | cols | The column ids of values |
| [in] | values | The values to add to the matrix (row-major ordering) |
| [in] | id | typeID of raw data |
This method may fail if the matrix has not allocated a particular (row,col) specified, depending on the actual subclass of matrix used.
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::EpetraMatrixData, and AMP::LinearAlgebra::NativePetscMatrixData.
|
virtual |
Get the global id of first column in diagonal block.
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >.
|
virtual |
Get the global id of the beginning row.
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >.
|
pure virtual |
Clone the data.
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
virtual |
Get the global id of last column in diagonal block.
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >.
|
virtual |
Get the global id of the ending row.
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >.
|
inlinevirtual |
Get the backend.
Definition at line 268 of file MatrixData.h.
References AMP_ASSERT, and d_pParameters.
|
pure virtual |
Return the typeid of the matrix coeffs.
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
pure virtual |
Given a row, retrieve the non-zero column indices of the matrix in compressed format.
| [in] | row | Which row |
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::EpetraMatrixData, and AMP::LinearAlgebra::NativePetscMatrixData.
|
inlinevirtual |
Get the comm.
Reimplemented in AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
Definition at line 261 of file MatrixData.h.
References AMP_ASSERT, and d_pParameters.
| uint64_t AMP::LinearAlgebra::MatrixData::getID | ( | ) | const |
Get a unique id hash for the vector.
|
pure virtual |
Get the DOFManager associated with a left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(\mathbf{y}\) is a left vector )
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
inlinevirtual |
Get the variable associated with a left vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(\mathbf{y}\) is a left vector )
Definition at line 215 of file MatrixData.h.
References d_pParameters.
|
pure virtual |
Get the DOFManager associated with a right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(\mathbf{x}\) is a right vector )
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
inlinevirtual |
Get the variable associated with a right vector ( For \(\mathbf{y}^T\mathbf{Ax}\), \(\mathbf{x}\) is a right vector )
Definition at line 205 of file MatrixData.h.
References d_pParameters.
|
pure virtual |
Retrieve a row of the matrix in compressed format.
| [in] | row | Which row |
| [out] | cols | The column ids of the returned values |
| [out] | values | The values in the row |
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::EpetraMatrixData, and AMP::LinearAlgebra::NativePetscMatrixData.
| void AMP::LinearAlgebra::MatrixData::getValuesByGlobalID | ( | size_t | num_rows, |
| size_t | num_cols, | ||
| const size_t * | rows, | ||
| const size_t * | cols, | ||
| TYPE * | values | ||
| ) | const |
Get values in the matrix.
| [in] | num_rows | The number of rows represented in values |
| [in] | num_cols | The number of cols represented in values |
| [in] | rows | The row ids of values |
| [in] | cols | The column ids of values |
| [out] | values | The values to get from the matrix (row-major ordering) |
This method will return zero for any entries that have not been allocated or are not ghosts on the current processor.
|
pure virtual |
Get values in the matrix.
| [in] | num_rows | The number of rows represented in values |
| [in] | num_cols | The number of cols represented in values |
| [in] | rows | The row ids of values |
| [in] | cols | The column ids of values |
| [out] | values | The values to get from the matrix (row-major ordering) |
| [in] | id | typeID of raw data |
This method will return zero for any entries that have not been allocated or are not ghosts on the current processor.
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::EpetraMatrixData, and AMP::LinearAlgebra::NativePetscMatrixData.
|
pure virtual |
Perform communication to ensure values in the matrix are the same across cores.
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::NativePetscMatrixData, AMP::LinearAlgebra::EpetraMatrixData, and AMP::LinearAlgebra::DenseSerialMatrixData.
|
inlinevirtual |
Return CSR mode of the matrix.
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >.
Definition at line 57 of file MatrixData.h.
|
pure virtual |
Given a row, retrieve the number of non-zero column indices of the matrix.
| [in] | row | Which row |
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
virtual |
Get the number of global columns in the matrix.
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
virtual |
Get the number of global rows in the matrix.
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
virtual |
Get the number of local columns in the matrix.
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
virtual |
Get the number of local rows in the matrix.
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
virtual |
Register any child objects.
This function will register child objects with the manager
| manager | Restart manager |
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >.
|
pure virtual |
Remove matrix entries within given range.
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
inlinevirtual |
Definition at line 274 of file MatrixData.h.
References AMP_ASSERT, and d_pParameters.
| void AMP::LinearAlgebra::MatrixData::setValuesByGlobalID | ( | size_t | num_rows, |
| size_t | num_cols, | ||
| const size_t * | rows, | ||
| const size_t * | cols, | ||
| const TYPE * | values | ||
| ) |
Set values in the matrix.
| [in] | num_rows | The number of rows represented in values |
| [in] | num_cols | The number of cols represented in values |
| [in] | rows | The row ids of values |
| [in] | cols | The column ids of values |
| [in] | values | The values to set to the matrix (row-major ordering) |
This method may fail if the matrix has not allocated a particular (row,col) specified, depending on the actual subclass of matrix used.
|
pure virtual |
Set values in the matrix.
| [in] | num_rows | The number of rows represented in values |
| [in] | num_cols | The number of cols represented in values |
| [in] | rows | The row ids of values |
| [in] | cols | The column ids of values |
| [in] | values | The values to set to the matrix (row-major ordering) |
| [in] | id | typeID of raw data |
This method may fail if the matrix has not allocated a particular (row,col) specified, depending on the actual subclass of matrix used.
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::EpetraMatrixData, and AMP::LinearAlgebra::NativePetscMatrixData.
|
inlineinherited |
Definition at line 28 of file enable_shared_from_this.h.
|
inlineinherited |
Definition at line 46 of file enable_shared_from_this.h.
|
pure virtual |
|
pure virtual |
Return the type of the matrix.
Implemented in AMP::LinearAlgebra::CSRMatrixData< Config >, AMP::LinearAlgebra::DenseSerialMatrixData, AMP::LinearAlgebra::NativePetscMatrixData, and AMP::LinearAlgebra::EpetraMatrixData.
|
virtual |
Write restart data to file.
This function will write the mesh to an HDF5 file
| fid | File identifier to write |
Reimplemented in AMP::LinearAlgebra::CSRMatrixData< Config >.
|
protected |
Definition at line 311 of file MatrixData.h.
|
protected |
Definition at line 308 of file MatrixData.h.
Referenced by getBackend(), getComm(), getLeftVariable(), getRightVariable(), and setBackend().
|
mutableprotectedinherited |
Definition at line 69 of file enable_shared_from_this.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |