]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Minor efficiency improvement. 16681/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 Feb 2024 17:53:40 +0000 (10:53 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 Feb 2024 17:53:40 +0000 (10:53 -0700)
include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h
source/lac/petsc_matrix_base.cc

index 55e7436ce93345830721d4d18569d57cfa97e6ca..50e7aab6ae6d6fa52b3e7b2556aa372ab4aede08 100644 (file)
@@ -1050,7 +1050,7 @@ namespace LinearAlgebra
     SparseMatrix<Number, MemorySpace>::clear_row(const size_type row,
                                                  const Number    new_diag_value)
     {
-      clear_rows(ArrayView<const size_type>{&row, 1}, new_diag_value);
+      clear_rows(ArrayView<const size_type>(row), new_diag_value);
     }
 
 
index 9f27ee352c794d90fc42a2d77b70b08fdb26bced..a160e2c67a81734b8913586440c5f6ed2e9fea31 100644 (file)
@@ -147,8 +147,7 @@ namespace PETScWrappers
   void
   MatrixBase::clear_row(const size_type row, const PetscScalar new_diag_value)
   {
-    std::vector<size_type> rows(1, row);
-    clear_rows(rows, new_diag_value);
+    clear_rows(ArrayView<const size_type>(row), new_diag_value);
   }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.