]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add some consistency checks to a function. 7165/head
authorDavid Wells <drwells@email.unc.edu>
Sun, 2 Sep 2018 02:34:35 +0000 (22:34 -0400)
committerDavid Wells <drwells@email.unc.edu>
Sat, 8 Sep 2018 14:30:36 +0000 (10:30 -0400)
source/distributed/shared_tria.cc

index eab717bdd853bbe629c6b22c0d8fb269f374ad2f..154ebb865b3053a553846dcdf9f5acbded1aff90 100644 (file)
@@ -333,6 +333,11 @@ namespace parallel
     Triangulation<dim, spacedim>::get_true_level_subdomain_ids_of_cells(
       const unsigned int level) const
     {
+      Assert(level < true_level_subdomain_ids_of_cells.size(),
+             ExcInternalError());
+      Assert(true_level_subdomain_ids_of_cells[level].size() ==
+               this->n_cells(level),
+             ExcInternalError());
       return true_level_subdomain_ids_of_cells[level];
     }
 

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.