|
AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects
Version of the Day
|
Coordinate matrix subclass. More...
#include <AbstractLinAlgPack_MatrixSparseCOORSerial.hpp>

Classes | |
| class | ReleaseValRowColArrays |
Subclass to delete dynamically allocated memory with delete[]. More... | |
Public types | |
| typedef Teuchos::RCP < MemMngPack::ReleaseResource > | release_resource_ptr_t |
| | |
Constructors / initializers | |
| MatrixSparseCOORSerial () | |
Let this allocate its own memory. | |
| void | set_buffers (size_type max_nz, value_type *val, index_type *row_i, index_type *col_j, const release_resource_ptr_t &release_resource, size_type rows=0, size_type cols=0, size_type nz=0, bool check_input=false) |
| Give memory to use to store nonzero elements. | |
| void | set_uninitialized () |
| Release all owned memory and make uninitialized. | |
Access | |
| value_type * | val () |
| | |
| const value_type * | val () const |
| | |
| index_type * | row_i () |
| | |
| const index_type * | row_i () const |
| | |
| index_type * | col_j () |
| | |
| const index_type * | col_j () const |
| | |
| const release_resource_ptr_t & | release_resource () const |
| | |
Overridden from MatrixBase | |
| size_type | rows () const |
| | |
| size_type | cols () const |
| | |
| size_type | nz () const |
| | |
Overridden from MatrixOp | |
| const VectorSpace & | space_cols () const |
| | |
| const VectorSpace & | space_rows () const |
| | |
| MatrixOp & | operator= (const MatrixOp &M) |
| | |
| std::ostream & | output (std::ostream &out) const |
| | |
| void | Vp_StMtV (VectorMutable *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const |
| | |
Overridden from MatrixLoadSparseElements | |
| void | reinitialize (size_type rows, size_type cols, size_type max_nz, EAssumeElementUniqueness element_uniqueness) |
| | |
| void | reset_to_load_values () |
| Reinitialize internal counter to load new nonzero values. | |
| void | get_load_nonzeros_buffers (size_type max_nz_load, value_type **val, index_type **row_i, index_type **col_j) |
| | |
| void | commit_load_nonzeros_buffers (size_type nz_commit, value_type **val, index_type **row_i, index_type **col_j) |
| | |
| void | finish_construction (bool test_setup) |
| | |
Overridden from MatrixExtractSparseElements | |
| index_type | count_nonzeros (EElementUniqueness element_uniqueness, const index_type inv_row_perm[], const index_type inv_col_perm[], const Range1D &row_rng, const Range1D &col_rng, index_type dl, index_type du) const |
| | |
| void | coor_extract_nonzeros (EElementUniqueness element_uniqueness, const index_type inv_row_perm[], const index_type inv_col_perm[], const Range1D &row_rng, const Range1D &col_rng, index_type dl, index_type du, value_type alpha, const index_type len_Aval, value_type Aval[], const index_type len_Aij, index_type Arow[], index_type Acol[], const index_type row_offset, const index_type col_offset) const |
| | |
Coordinate matrix subclass.
ToDo: Finish documentation!
Definition at line 57 of file AbstractLinAlgPack_MatrixSparseCOORSerial.hpp.
| typedef Teuchos::RCP< MemMngPack::ReleaseResource> AbstractLinAlgPack::MatrixSparseCOORSerial::release_resource_ptr_t |
Definition at line 69 of file AbstractLinAlgPack_MatrixSparseCOORSerial.hpp.
Let this allocate its own memory.
Definition at line 76 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| void AbstractLinAlgPack::MatrixSparseCOORSerial::set_buffers | ( | size_type | max_nz, |
| value_type * | val, | ||
| index_type * | row_i, | ||
| index_type * | col_j, | ||
| const release_resource_ptr_t & | release_resource, | ||
| size_type | rows = 0, |
||
| size_type | cols = 0, |
||
| size_type | nz = 0, |
||
| bool | check_input = false |
||
| ) |
Give memory to use to store nonzero elements.
| max_nz | [in] Size of the buffers val[], row_i[] and col_j[]. It is allowed for max_nz == 0 in which case this matrix will not have any nonzero elements (i.e. the zero matrix). |
| val | [in] Buffer to store the nonzero entry values. On input val[k], for k = 0...nz-1 must be set to valid nonzero entry values if rows > 0 && nz > 0. |
| row_i | [in] Buffer to store the nonzero entry row indexes. On input row_i[k], for k = 0...nz-1 must be set to valid nonzero entry row indexes if rows > 0 && nz > 0. |
| col_j | [in] Buffer to store the nonzero entry row indexes. On input col_j[k], for k = 0...nz-1 must be set to valid nonzero entry row indexes if rows > 0 && nz > 0. |
| release_resource | [in] Smart pointer to a MemMngPack::ReleaseResouce object that will deallocate the memory for the buffers val[], row_i[] and col_j[] when this is finished with them. It is allowed for release_resource.get() == NULL in which case the client will be responsible to free this memory. The client can use the subclass ReleaseValRowColArrays to allow this to delete memory created with new[] by setting release_resource = Teuchos::rcp( new ReleaseValRowColArrays(val,row_i,col_j) ) where val, row_i and col_j where allocated with new[]. The release_resource object represents the sharing of the data val[], row_i[] and col_j[]. |
| rows | [in] Number of rows in the matrix. Default = 0 for fully uninitialized. |
| cols | [in] Number of columns in the matrix. Ignored if rows == 0. |
| nz | [in] Number of nonzero elements in val[], row_i[] and col_j[] already set. Setting a value of nz > 0 allows the client to setup a matrix object with nonzero elements ready to go. Ignored if rows == 0. |
| check_input | [in] If true and rows > 0 && nz > 0 then the row and colunmn indexes in row_i[] and col_j[] will be checked! The defualt is false. |
Preconditions:
max_nz > 0 (throw std::invalid_argument) val != NULL (throw std::invalid_argument) row_i != NULL (throw std::invalid_argument) col_j != NULL (throw std::invalid_argument) rows >= 0 (throw std::invalid_argument) rows > 0] cols > 0 (throw std::invalid_argument) rows > 0] 0 <= nz <= max_nz (throw std::invalid_argument) nz > 0] 1 <= row_i[k] <= rows, for k = 0...nz-1 (throw std::invalid_argument) nz > 0] 1 <= col_j[k] <= cols, for k = 0...nz-1 (throw std::invalid_argument) Postconditions:
this->release_resource().get() == release_resource rows > 0] this->rows() == rows rows > 0] this->cols() == cols rows > 0] this->nz() == nz Definition at line 87 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
Release all owned memory and make uninitialized.
Postconditions:
this->reinitialize(rows,cols,max_nz) this will allocate its own memory. Definition at line 131 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| value_type * AbstractLinAlgPack::MatrixSparseCOORSerial::val | ( | ) | [inline] |
Definition at line 349 of file AbstractLinAlgPack_MatrixSparseCOORSerial.hpp.
| const value_type * AbstractLinAlgPack::MatrixSparseCOORSerial::val | ( | ) | const [inline] |
Definition at line 356 of file AbstractLinAlgPack_MatrixSparseCOORSerial.hpp.
| index_type * AbstractLinAlgPack::MatrixSparseCOORSerial::row_i | ( | ) | [inline] |
Definition at line 362 of file AbstractLinAlgPack_MatrixSparseCOORSerial.hpp.
| const index_type * AbstractLinAlgPack::MatrixSparseCOORSerial::row_i | ( | ) | const [inline] |
Definition at line 369 of file AbstractLinAlgPack_MatrixSparseCOORSerial.hpp.
| index_type * AbstractLinAlgPack::MatrixSparseCOORSerial::col_j | ( | ) | [inline] |
Definition at line 375 of file AbstractLinAlgPack_MatrixSparseCOORSerial.hpp.
| const index_type * AbstractLinAlgPack::MatrixSparseCOORSerial::col_j | ( | ) | const [inline] |
Definition at line 382 of file AbstractLinAlgPack_MatrixSparseCOORSerial.hpp.
| const MatrixSparseCOORSerial::release_resource_ptr_t & AbstractLinAlgPack::MatrixSparseCOORSerial::release_resource | ( | ) | const [inline] |
Definition at line 389 of file AbstractLinAlgPack_MatrixSparseCOORSerial.hpp.
| size_type AbstractLinAlgPack::MatrixSparseCOORSerial::rows | ( | ) | const [virtual] |
Reimplemented from AbstractLinAlgPack::MatrixBase.
Definition at line 148 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| size_type AbstractLinAlgPack::MatrixSparseCOORSerial::cols | ( | ) | const [virtual] |
Reimplemented from AbstractLinAlgPack::MatrixBase.
Definition at line 153 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| size_type AbstractLinAlgPack::MatrixSparseCOORSerial::nz | ( | ) | const [virtual] |
Reimplemented from AbstractLinAlgPack::MatrixBase.
Definition at line 158 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| const VectorSpace & AbstractLinAlgPack::MatrixSparseCOORSerial::space_cols | ( | ) | const [virtual] |
Implements AbstractLinAlgPack::MatrixBase.
Definition at line 165 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| const VectorSpace & AbstractLinAlgPack::MatrixSparseCOORSerial::space_rows | ( | ) | const [virtual] |
Implements AbstractLinAlgPack::MatrixBase.
Definition at line 170 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 175 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| std::ostream & AbstractLinAlgPack::MatrixSparseCOORSerial::output | ( | std::ostream & | out | ) | const [virtual] |
Reimplemented from AbstractLinAlgPack::MatrixOp.
Definition at line 197 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| void AbstractLinAlgPack::MatrixSparseCOORSerial::Vp_StMtV | ( | VectorMutable * | vs_lhs, |
| value_type | alpha, | ||
| BLAS_Cpp::Transp | trans_rhs1, | ||
| const Vector & | v_rhs2, | ||
| value_type | beta | ||
| ) | const [virtual] |
Implements AbstractLinAlgPack::MatrixOp.
Definition at line 224 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| void AbstractLinAlgPack::MatrixSparseCOORSerial::reinitialize | ( | size_type | rows, |
| size_type | cols, | ||
| size_type | max_nz, | ||
| EAssumeElementUniqueness | element_uniqueness | ||
| ) | [virtual] |
Implements AbstractLinAlgPack::MatrixLoadSparseElements.
Definition at line 242 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
Reinitialize internal counter to load new nonzero values.
The row and column index arrays are preserved from the last setup and here the client only wants to set the nonzero values for the same matrix structure.
ToDo: Finish documentation!
Implements AbstractLinAlgPack::MatrixLoadSparseElements.
Definition at line 286 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| void AbstractLinAlgPack::MatrixSparseCOORSerial::get_load_nonzeros_buffers | ( | size_type | max_nz_load, |
| value_type ** | val, | ||
| index_type ** | row_i, | ||
| index_type ** | col_j | ||
| ) | [virtual] |
Implements AbstractLinAlgPack::MatrixLoadSparseElements.
Definition at line 301 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| void AbstractLinAlgPack::MatrixSparseCOORSerial::commit_load_nonzeros_buffers | ( | size_type | nz_commit, |
| value_type ** | val, | ||
| index_type ** | row_i, | ||
| index_type ** | col_j | ||
| ) | [virtual] |
Implements AbstractLinAlgPack::MatrixLoadSparseElements.
Definition at line 337 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| void AbstractLinAlgPack::MatrixSparseCOORSerial::finish_construction | ( | bool | test_setup | ) | [virtual] |
Implements AbstractLinAlgPack::MatrixLoadSparseElements.
Definition at line 369 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| index_type AbstractLinAlgPack::MatrixSparseCOORSerial::count_nonzeros | ( | EElementUniqueness | element_uniqueness, |
| const index_type | inv_row_perm[], | ||
| const index_type | inv_col_perm[], | ||
| const Range1D & | row_rng, | ||
| const Range1D & | col_rng, | ||
| index_type | dl, | ||
| index_type | du | ||
| ) | const [virtual] |
Implements AbstractLinAlgPack::MatrixExtractSparseElements.
Definition at line 409 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
| void AbstractLinAlgPack::MatrixSparseCOORSerial::coor_extract_nonzeros | ( | EElementUniqueness | element_uniqueness, |
| const index_type | inv_row_perm[], | ||
| const index_type | inv_col_perm[], | ||
| const Range1D & | row_rng, | ||
| const Range1D & | col_rng, | ||
| index_type | dl, | ||
| index_type | du, | ||
| value_type | alpha, | ||
| const index_type | len_Aval, | ||
| value_type | Aval[], | ||
| const index_type | len_Aij, | ||
| index_type | Arow[], | ||
| index_type | Acol[], | ||
| const index_type | row_offset, | ||
| const index_type | col_offset | ||
| ) | const [virtual] |
Implements AbstractLinAlgPack::MatrixExtractSparseElements.
Definition at line 495 of file AbstractLinAlgPack_MatrixSparseCOORSerial.cpp.
1.7.6.1