From: Peter Munch Date: Tue, 15 Oct 2024 08:13:23 +0000 (+0200) Subject: Add assert X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17779%2Fhead;p=dealii.git Add assert --- diff --git a/source/fe/fe_hermite.cc b/source/fe/fe_hermite.cc index 5e6d97c3ec..12b9e1e493 100644 --- a/source/fe/fe_hermite.cc +++ b/source/fe/fe_hermite.cc @@ -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; }