]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add assert 17779/head
authorPeter Munch <peterrmuench@gmail.com>
Tue, 15 Oct 2024 08:13:23 +0000 (10:13 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 15 Oct 2024 08:13:23 +0000 (10:13 +0200)
source/fe/fe_hermite.cc

index 5e6d97c3ec51cec07ee2e72ed5929ee241f297ca..12b9e1e4930a7daf56e91c7dcee16be9c0bc0da5 100644 (file)
@@ -64,6 +64,8 @@ namespace internal
   inline unsigned int
   get_regularity_from_degree(const unsigned int fe_degree)
   {
+    Assert(fe_degree % 2 == 1,
+           ExcMessage("FE_Hermite only supports odd polynomial degrees."));
     return (fe_degree == 0) ? 0 : (fe_degree - 1) / 2;
   }
 

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.