* the diagonal entries, you have to set them by hand.
*/
void
- clear_rows(const std::vector<size_type> &rows,
- const PetscScalar new_diag_value = 0);
+ clear_rows(const ArrayView<const size_type> &rows,
+ const PetscScalar new_diag_value = 0);
/**
* Same as clear_rows(), except that the function also zeros the columns.
* starting to clear rows.
*/
void
- clear_rows(const std::vector<size_type> &rows,
- const TrilinosScalar new_diag_value = 0);
+ clear_rows(const ArrayView<const size_type> &rows,
+ const TrilinosScalar new_diag_value = 0);
/**
* Sets an internal flag so that all operations performed by the matrix,
* starting to clear rows.
*/
void
- clear_rows(const std::vector<size_type> &rows,
- const Number new_diag_value = 0);
+ clear_rows(const ArrayView<const size_type> &rows,
+ const Number new_diag_value = 0);
/**
* Release all memory and return to a state just like after having called
SparseMatrix<Number, MemorySpace>::clear_row(const size_type row,
const Number new_diag_value)
{
- clear_rows(std::vector<size_type>(1, row), new_diag_value);
+ clear_rows(ArrayView<const size_type>{&row, 1}, new_diag_value);
}
template <typename Number, typename MemorySpace>
void
SparseMatrix<Number, MemorySpace>::clear_rows(
- const std::vector<size_type> &rows,
- const Number new_diag_value)
+ const ArrayView<const size_type> &rows,
+ const Number new_diag_value)
{
// If the matrix is marked as compressed, we need to
// call resumeFill() first.
void
- MatrixBase::clear_rows(const std::vector<size_type> &rows,
- const PetscScalar new_diag_value)
+ MatrixBase::clear_rows(const ArrayView<const size_type> &rows,
+ const PetscScalar new_diag_value)
{
assert_is_compressed();
void
- SparseMatrix::clear_rows(const std::vector<size_type> &rows,
- const TrilinosScalar new_diag_value)
+ SparseMatrix::clear_rows(const ArrayView<const size_type> &rows,
+ const TrilinosScalar new_diag_value)
{
for (const auto row : rows)
clear_row(row, new_diag_value);