]> https://gitweb.dealii.org/ - dealii.git/commitdiff
ensure that correct template parameters have been used 3621/head
authorKarl Ljungkvist <k.ljungkvist@gmail.com>
Mon, 21 Nov 2016 11:34:36 +0000 (12:34 +0100)
committerKarl Ljungkvist <k.ljungkvist@gmail.com>
Tue, 22 Nov 2016 07:57:38 +0000 (08:57 +0100)
include/deal.II/dofs/dof_handler.h

index bb89fba363524f571ea29e76561c7aa12a0102fd..02a6d85f2dab69201f6928cc48fbc47039a4dc7d 100644 (file)
@@ -1093,6 +1093,13 @@ private:
 
   friend struct dealii::internal::DoFHandler::Implementation;
   friend struct dealii::internal::DoFHandler::Policy::Implementation;
+
+  // explicitly check for sensible template arguments
+#ifdef DEAL_II_WITH_CXX11
+  static_assert (dim<=spacedim,
+                 "The dimension <dim> of a DoFHandler must be less than or "
+                 "equal to the space dimension <spacedim> in which it lives.");
+#endif
 };
 
 

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.