]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix assert in import_elements from ReadWriteVector 16574/head
authorSebastian Kinnewig <kinnewig@ifam.uni-hannover.de>
Wed, 31 Jan 2024 09:55:52 +0000 (10:55 +0100)
committerSebastian Kinnewig <kinnewig@ifam.uni-hannover.de>
Wed, 31 Jan 2024 09:55:52 +0000 (10:55 +0100)
include/deal.II/lac/read_write_vector.templates.h

index 1ed6f1f279d22fc82b10344c53ab3a20c561b3cf..c72a04c8c7d603d5a6ced2e160fd2493db702ce0 100644 (file)
@@ -586,7 +586,7 @@ namespace LinearAlgebra
 
     using size_type = std::decay_t<decltype(size)>;
 
-    Assert(size == 0 || values != nullptr, ExcInternalError("Import failed."));
+    Assert(size == 0 || !values.empty(), ExcInternalError("Import failed."));
     AssertDimension(size, stored_elements.n_elements());
 
     switch (operation)

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.