42 #ifndef MATRIX_SPARSE_COOR_SERIAL_H
43 #define MATRIX_SPARSE_COOR_SERIAL_H
45 #include "AbstractLinAlgPack_MatrixOp.hpp"
46 #include "AbstractLinAlgPack_VectorSpaceSerial.hpp"
47 #include "AbstractLinAlgPack_MatrixLoadSparseElements.hpp"
48 #include "AbstractLinAlgPack_MatrixExtractSparseElements.hpp"
49 #include "ReleaseResource.hpp"
51 namespace AbstractLinAlgPack {
95 value_type* val() {
return val_; }
96 index_type* row_i() {
return row_i_; }
97 index_type* col_j() {
return col_j_; }
177 ,
bool check_input =
false
198 const value_type*
val()
const;
202 const index_type*
row_i()
const;
206 const index_type*
col_j()
const;
234 std::ostream&
output(std::ostream& out)
const;
238 ,
const Vector& v_rhs2, value_type beta)
const;
280 ,
const index_type inv_row_perm[]
281 ,
const index_type inv_col_perm[]
282 ,
const Range1D &row_rng
283 ,
const Range1D &col_rng
290 ,
const index_type inv_row_perm[]
291 ,
const index_type inv_col_perm[]
292 ,
const Range1D &row_rng
293 ,
const Range1D &col_rng
297 ,
const index_type len_Aval
299 ,
const index_type len_Aij
302 ,
const index_type row_offset
303 ,
const index_type col_offset
328 VectorSpaceSerial space_cols_;
329 VectorSpaceSerial space_rows_;
332 bool reload_val_only_;
338 void make_storage_unique();
351 make_storage_unique();
364 make_storage_unique();
377 make_storage_unique();
391 return self_allocate_ ? release_resource_null_ : release_resource_;
396 #endif // MATRIX_SPARSE_COOR_SERIAL_H
void reset_to_load_values()
Reinitialize internal counter to load new nonzero values.
void commit_load_nonzeros_buffers(size_type nz_commit, value_type **val, index_type **row_i, index_type **col_j)
Mix-in interface for loading nonzero elements into a sparse matrix data structure.
void finish_construction(bool test_setup)
void release_ownership()
Release ownership of memory.
Coordinate matrix subclass.
Teuchos::RCP< MemMngPack::ReleaseResource > release_resource_ptr_t
Subclass to delete dynamically allocated memory with delete[].
const release_resource_ptr_t & release_resource() const
std::ostream & output(std::ostream &out) const
const VectorSpace & space_rows() const
void Vp_StMtV(VectorMutable *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const
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 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
void get_load_nonzeros_buffers(size_type max_nz_load, value_type **val, index_type **row_i, index_type **col_j)
ReleaseValRowColArrays(value_type *val, index_type *row_i, index_type *col_j)
Gives pointers to buffers to delete[].
Base class for all matrices that support basic matrix operations.
bool resource_is_bound() const
Overridden from ReleaseResource.
void set_uninitialized()
Release all owned memory and make uninitialized.
MatrixSparseCOORSerial()
Let this allocate its own memory.
MatrixOp & operator=(const MatrixOp &M)
const VectorSpace & space_cols() const
void reinitialize(size_type rows, size_type cols, size_type max_nz, EAssumeElementUniqueness element_uniqueness)
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