]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add Asserts for polynomial degree of FE_TraceQ
authorangela.klewinghaus <angela.klewinghaus@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Nov 2013 13:10:56 +0000 (13:10 +0000)
committerangela.klewinghaus <angela.klewinghaus@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Nov 2013 13:10:56 +0000 (13:10 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_face_elements@31623 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/fe_trace.cc

index 390e0e0319806e4db4bbd80e7397a876fdf07e17..6e88dab7b0dc1e4ae6bebf6c77795cb74f23a636 100644 (file)
@@ -101,6 +101,9 @@ FE_TraceQ<dim,spacedim>::FE_TraceQ (const unsigned int degree)
                   FiniteElementData<dim>(get_dpo_vector(degree), 1, degree, FiniteElementData<dim>::L2),
                   std::vector<bool>(1,true))
 {  
+  Assert (degree > 0,
+          ExcMessage ("FE_Trace can only be used for polynomial degrees "
+                      "greater than zero"));
   std::vector<unsigned int> renumber (this->dofs_per_face);
   FETools::hierarchic_to_lexicographic_numbering<dim-1> (degree, renumber);
   this->poly_space.set_numbering(renumber);
@@ -232,6 +235,7 @@ template <int dim, int spacedim>
 std::vector<unsigned int>
 FE_TraceQ<dim,spacedim>::get_dpo_vector (const unsigned int deg)
 {
+  AssertThrow(deg>0,ExcMessage("FE_TraceQ needs to be of degree > 0."));
   std::vector<unsigned int> dpo(dim+1, 1U);
   dpo[dim]=0;
   dpo[0]=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.