]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add assert to connectivity.h 10754/head
authorPeter Munch <peterrmuench@gmail.com>
Mon, 27 Jul 2020 12:14:06 +0000 (14:14 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Mon, 27 Jul 2020 12:14:06 +0000 (14:14 +0200)
include/deal.II/grid/connectivity.h

index 0031386b455458082bfc97bc61e80d397f83b56d..747450b7c16f1fb4fc28758333a74597868b677d 100644 (file)
@@ -1545,6 +1545,8 @@ namespace internal
     Connectivity<T>
     build_connectivity(const std::vector<CellData<dim>> &cells)
     {
+      AssertThrow(cells.size() > 0, ExcMessage("No cells have been provided!"));
+
       // vector of possible cell entity types
       std::vector<std::shared_ptr<CellTypeBase>> cell_types_impl(8);
 

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.