]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add assert
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 3 May 2013 01:25:45 +0000 (01:25 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 3 May 2013 01:25:45 +0000 (01:25 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@29437 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_parallel_vector.cc

index 10265ea07902f2f09769ff9fba9fd52d67ce7394..ec6fc4600deb9179a504f25f49557577ddfac7a5 100644 (file)
@@ -207,6 +207,7 @@ namespace PETScWrappers
       communicator = comm;
 
       Assert(local.is_contiguous(), ExcNotImplemented());
+      Assert(local.size()>0, ExcMessage("can not create vector of size 0."));
       create_vector(local.size(), local.n_elements());
     }
 

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.