]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
throw when you create a FE_Q of degree 0 (otherwise we try to allocate a LOT of memory)
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Jul 2013 02:35:22 +0000 (02:35 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Jul 2013 02:35:22 +0000 (02:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@30179 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/fe_q_base.cc

index 77aab44e1a89b79b4d393428da2e96086c4888c2..9cae5f3dc44de3c00b43929e0c76895b4ddfb2a2 100644 (file)
@@ -993,6 +993,7 @@ template <class POLY, int dim, int spacedim>
 std::vector<unsigned int>
 FE_Q_Base<POLY,dim,spacedim>::get_dpo_vector(const unsigned int deg)
 {
+  AssertThrow(deg>0,ExcMessage("FE_Q needs to be of degree > 0."));
   std::vector<unsigned int> dpo(dim+1, 1U);
   for (unsigned int i=1; i<dpo.size(); ++i)
     dpo[i]=dpo[i-1]*(deg-1);

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.