]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix assert
authorPeter Munch <peterrmuench@gmail.com>
Sun, 22 Mar 2020 15:08:25 +0000 (16:08 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 22 Mar 2020 15:08:25 +0000 (16:08 +0100)
include/deal.II/lac/la_sm_vector.templates.h

index ce89fef8b796c8f58e0e8eb3468d3442c58be609..5f1bb69ee194968fbd6618e8fb98e85c5ed1163e 100644 (file)
@@ -51,8 +51,10 @@ namespace LinearAlgebra
                    MemorySpaceData<Number> &     data,
                    const MPI_Comm &              comm_shared)
         {
-          Assert(allocated_size == 0, ExcNotImplemented());
-          Assert(data.values == nullptr, ExcNotImplemented());
+          // TODO: is assert fine?
+          Assert(((allocated_size > 0 && data.values != nullptr) ||
+                  data.values == nullptr),
+                 ExcInternalError());
 
           allocated_size = new_alloc_size;
 

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.