Public Types | |
typedef Allocator::value_type | value_type |
typedef Allocator::pointer | pointer |
typedef Allocator::const_pointer | const_pointer |
typedef Allocator::reference | reference |
typedef Allocator::const_reference | const_reference |
typedef Allocator::value_type | entry_type |
typedef Allocator::value_type | access_type |
typedef Allocator::value_type | const_access_type |
Public Member Functions | |
Matrix () | |
Default constructor. | |
Matrix (int i, int j) | |
Main constructor. | |
Matrix (Mat &A) | |
Copy constructor. | |
Matrix (const Matrix< T, Prop, PETScMPIAIJ, Allocator > &A) | |
Copy constructor. | |
void | Reallocate (int i, int j, int local_i=PETSC_DECIDE, int local_j=PETSC_DECIDE) |
Reallocates memory to resize the matrix. | |
value_type | operator() (int i, int j) |
Access operator. | |
value_type | operator() (int i, int j) const |
Access operator. | |
void | Copy (const Matrix< T, Prop, PETScMPIAIJ, Allocator > &A) |
Duplicates a matrix. | |
Matrix< T, Prop, PETScMPIAIJ, Allocator > & | operator= (const Matrix< T, Prop, PETScMPIAIJ, Allocator > &A) |
Duplicates a matrix (assignment operator). | |
template<class T0 , class Allocator0 > | |
void | Copy (const Matrix< T0, General, RowSparse, Allocator0 > &A) |
Duplicates a matrix. | |
int | GetLocalM () const |
Returns the number of local rows of the inner PETSc matrix. | |
int | GetLocalN () const |
Gets the number of local columns of the inner PETSc matrix. | |
void | Print () const |
Displays the matrix on the standard output. | |
void | SetCommunicator (MPI_Comm mpi_communicator) |
MPI_Comm | GetCommunicator () const |
void | Clear () |
void | Nullify () |
Mat & | GetPetscMatrix () |
const Mat & | GetPetscMatrix () const |
void | Resize (int i, int j) |
void | SetData (int i, int j, pointer data) |
const_reference | Val (int i, int j) const |
reference | Val (int i, int j) |
reference | operator[] (int i) |
const_reference | operator[] (int i) const |
void | Set (int, int, T) |
void | SetBuffer (int, int, T, InsertMode) |
void | Flush () const |
void | GetProcessorRowRange (int &i, int &j) const |
void | Copy (const Mat &A) |
void | Zero () |
void | SetIdentity () |
void | Fill () |
void | Fill (const T0 &x) |
void | FillRand () |
void | Print (int a, int b, int m, int n) const |
void | Print (int l) const |
void | Write (string FileName, bool with_size) const |
void | Write (ostream &FileStream, bool with_size) const |
void | WriteText (string FileName) const |
void | WriteText (ostream &FileStream) const |
void | Read (string FileName) |
void | Read (istream &FileStream) |
void | ReadText (string FileName) |
void | ReadText (istream &FileStream) |
int | GetM () const |
Returns the number of rows. | |
int | GetM (const Seldon::SeldonTranspose &status) const |
Returns the number of rows of the matrix possibly transposed. | |
int | GetN () const |
Returns the number of columns. | |
int | GetN (const Seldon::SeldonTranspose &status) const |
Returns the number of columns of the matrix possibly transposed. | |
int | GetSize () const |
Returns the number of elements in the matrix. | |
pointer | GetData () const |
Returns a pointer to the data array. | |
const_pointer | GetDataConst () const |
Returns a const pointer to the data array. | |
void * | GetDataVoid () const |
Returns a pointer of type "void*" to the data array. | |
const void * | GetDataConstVoid () const |
Returns a pointer of type "const void*" to the data array. | |
Allocator & | GetAllocator () |
Returns the allocator of the matrix. | |
Protected Attributes | |
Mat | petsc_matrix_ |
Encapsulated PETSc matrix. | |
MPI_Comm | mpi_communicator_ |
The MPI communicator to use. | |
bool | petsc_matrix_deallocated_ |
Boolean to indicate if the inner PETSc matrix is destroyed or not. | |
int | m_ |
int | n_ |
pointer | data_ |
Static Protected Attributes | |
static Allocator | allocator_ |
Definition at line 186 of file PetscMatrix.hxx.
Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::Matrix | ( | ) | [inline] |
Default constructor.
On exit, the matrix is an empty 0x0 matrix.
Definition at line 1011 of file PetscMatrix.cxx.
Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::Matrix | ( | int | i, | |
int | j | |||
) | [inline] |
Main constructor.
Builds a i x j collection matrix.
[in] | i | number of rows of matrices. |
[in] | j | number of columns of matrices. |
Definition at line 1023 of file PetscMatrix.cxx.
Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::Matrix | ( | Mat & | A | ) | [inline] |
Copy constructor.
[in] | A | PETCs matrix to be copied. |
Definition at line 1036 of file PetscMatrix.cxx.
Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::Matrix | ( | const Matrix< T, Prop, PETScMPIAIJ, Allocator > & | A | ) | [inline] |
Copy constructor.
[in] | A | matrix to be copied. |
Definition at line 1048 of file PetscMatrix.cxx.
void Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::Copy | ( | const Matrix< T, Prop, PETScMPIAIJ, Allocator > & | A | ) | [inline] |
Duplicates a matrix.
A | matrix to be copied. |
Definition at line 1154 of file PetscMatrix.cxx.
void Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::Copy | ( | const Matrix< T0, General, RowSparse, Allocator0 > & | A | ) | [inline] |
Duplicates a matrix.
A | matrix to be copied. |
Definition at line 1187 of file PetscMatrix.cxx.
Allocator & Seldon::Matrix_Base< T, Allocator >::GetAllocator | ( | ) | [inherited] |
Returns the allocator of the matrix.
Definition at line 258 of file Matrix_Base.cxx.
Matrix_Base< T, Allocator >::pointer Seldon::Matrix_Base< T, Allocator >::GetData | ( | ) | const [inherited] |
Returns a pointer to the data array.
Returns a pointer to data, i.e. the data array 'data_'.
Definition at line 208 of file Matrix_Base.cxx.
Matrix_Base< T, Allocator >::const_pointer Seldon::Matrix_Base< T, Allocator >::GetDataConst | ( | ) | const [inherited] |
Returns a const pointer to the data array.
Returns a const pointer to data, i.e. the data array 'data_'.
Definition at line 221 of file Matrix_Base.cxx.
const void * Seldon::Matrix_Base< T, Allocator >::GetDataConstVoid | ( | ) | const [inherited] |
Returns a pointer of type "const void*" to the data array.
Returns a pointer of type "const void*" to data, i.e. the data array 'data_'.
Definition at line 247 of file Matrix_Base.cxx.
void * Seldon::Matrix_Base< T, Allocator >::GetDataVoid | ( | ) | const [inherited] |
Returns a pointer of type "void*" to the data array.
Returns a pointer of type "void*" to data, i.e. the data array 'data_'.
Definition at line 234 of file Matrix_Base.cxx.
int Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::GetLocalM | ( | ) | const |
Returns the number of local rows of the inner PETSc matrix.
Definition at line 1230 of file PetscMatrix.cxx.
int Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::GetLocalN | ( | ) | const |
Gets the number of local columns of the inner PETSc matrix.
Definition at line 1245 of file PetscMatrix.cxx.
int Seldon::Matrix_Base< T, Allocator >::GetM | ( | ) | const [inherited] |
Returns the number of rows.
Reimplemented in Seldon::HeterogeneousMatrixCollection< Prop0, Storage0, Prop1, Storage1, Allocator >, Seldon::MatrixCollection< T, Prop, Storage, Allocator >, Seldon::SubMatrix_Base< T, Prop, M, Allocator >, Seldon::HeterogeneousMatrixCollection< General, RowMajor, General, RowSparse, Allocator >, Seldon::MatrixCollection< T, Prop, RowMajor, Allocator >, Seldon::MatrixCollection< T, Prop, ColMajor, Allocator >, Seldon::MatrixCollection< T, Prop, ColSymPacked, Allocator >, and Seldon::MatrixCollection< T, Prop, RowSymPacked, Allocator >.
Definition at line 107 of file Matrix_Base.cxx.
int Seldon::Matrix_Base< T, Allocator >::GetM | ( | const Seldon::SeldonTranspose & | status | ) | const [inherited] |
Returns the number of rows of the matrix possibly transposed.
status | assumed status about the transposition of the matrix. |
Reimplemented in Seldon::SubMatrix_Base< T, Prop, M, Allocator >.
Definition at line 130 of file Matrix_Base.cxx.
int Seldon::Matrix_Base< T, Allocator >::GetN | ( | const Seldon::SeldonTranspose & | status | ) | const [inherited] |
Returns the number of columns of the matrix possibly transposed.
status | assumed status about the transposition of the matrix. |
Reimplemented in Seldon::SubMatrix_Base< T, Prop, M, Allocator >.
Definition at line 145 of file Matrix_Base.cxx.
int Seldon::Matrix_Base< T, Allocator >::GetN | ( | ) | const [inherited] |
Returns the number of columns.
Reimplemented in Seldon::HeterogeneousMatrixCollection< Prop0, Storage0, Prop1, Storage1, Allocator >, Seldon::MatrixCollection< T, Prop, Storage, Allocator >, Seldon::SubMatrix_Base< T, Prop, M, Allocator >, Seldon::HeterogeneousMatrixCollection< General, RowMajor, General, RowSparse, Allocator >, Seldon::MatrixCollection< T, Prop, RowMajor, Allocator >, Seldon::MatrixCollection< T, Prop, ColMajor, Allocator >, Seldon::MatrixCollection< T, Prop, ColSymPacked, Allocator >, and Seldon::MatrixCollection< T, Prop, RowSymPacked, Allocator >.
Definition at line 118 of file Matrix_Base.cxx.
int Seldon::Matrix_Base< T, Allocator >::GetSize | ( | ) | const [inherited] |
Returns the number of elements in the matrix.
Returns the number of elements in the matrix, i.e. the number of rows multiplied by the number of columns.
Reimplemented in Seldon::HeterogeneousMatrixCollection< Prop0, Storage0, Prop1, Storage1, Allocator >, Seldon::MatrixCollection< T, Prop, Storage, Allocator >, Seldon::HeterogeneousMatrixCollection< General, RowMajor, General, RowSparse, Allocator >, Seldon::MatrixCollection< T, Prop, RowMajor, Allocator >, Seldon::MatrixCollection< T, Prop, ColMajor, Allocator >, Seldon::MatrixCollection< T, Prop, ColSymPacked, Allocator >, and Seldon::MatrixCollection< T, Prop, RowSymPacked, Allocator >.
Definition at line 195 of file Matrix_Base.cxx.
Matrix< T, Prop, PETScMPIAIJ, Allocator >::value_type Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::operator() | ( | int | i, | |
int | j | |||
) | [inline] |
Access operator.
Returns the value of element (i, j).
i | row index. | |
j | column index. |
Definition at line 1087 of file PetscMatrix.cxx.
Matrix< T, Prop, PETScMPIAIJ, Allocator >::value_type Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::operator() | ( | int | i, | |
int | j | |||
) | const [inline] |
Access operator.
Returns the value of element (i, j).
i | row index. | |
j | column index. |
Definition at line 1121 of file PetscMatrix.cxx.
Matrix< T, Prop, PETScMPIAIJ, Allocator > & Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::operator= | ( | const Matrix< T, Prop, PETScMPIAIJ, Allocator > & | A | ) | [inline] |
Duplicates a matrix (assignment operator).
A | matrix to be copied. |
Definition at line 1171 of file PetscMatrix.cxx.
void Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::Print | ( | ) | const |
Displays the matrix on the standard output.
Displays elements on the standard output, in text format. Each row is displayed on a single line and elements of a row are delimited by tabulations.
Definition at line 1262 of file PetscMatrix.cxx.
void Seldon::Matrix< T, Prop, PETScMPIAIJ, Allocator >::Reallocate | ( | int | i, | |
int | j, | |||
int | local_i = PETSC_DECIDE , |
|||
int | local_j = PETSC_DECIDE | |||
) | [inline] |
Reallocates memory to resize the matrix.
On exit, the matrix is a i x i matrix.
i | number of rows. | |
j | number of columns. |
Definition at line 1064 of file PetscMatrix.cxx.