]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Optimize insertion of elements into a matrix. 15050/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Apr 2023 19:05:30 +0000 (13:05 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Apr 2023 19:05:30 +0000 (13:05 -0600)
include/deal.II/lac/sparse_matrix.h

index 3277bf85365139cf446941714b42d4ee30fd338c..9cf52a12f26a8a5bf2fe5fa06c769f3e9ab89f32 100644 (file)
@@ -1997,7 +1997,8 @@ SparseMatrix<number>::add(const size_type               row,
       col_indices.size(),
       col_indices.data(),
       values.data(),
-      elide_zero_values);
+      elide_zero_values,
+      std::is_sorted(col_indices.begin(), col_indices.end()));
 }
 
 

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.