[cig-commits] commit 2296 by bangerth to /var/svn/dealii/aspect

dealii.demon at gmail.com dealii.demon at gmail.com
Wed Feb 12 06:58:24 PST 2014


Revision 2296

Better error checking when choosing the polynomial degree.

U   trunk/aspect/source/simulator/parameters.cc


http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2296&peg=2296

Diff:
Modified: trunk/aspect/source/simulator/parameters.cc
===================================================================
--- trunk/aspect/source/simulator/parameters.cc	2014-02-12 03:06:50 UTC (rev 2295)
+++ trunk/aspect/source/simulator/parameters.cc	2014-02-12 14:58:20 UTC (rev 2296)
@@ -719,6 +719,18 @@
         stabilization_beta  = prm.get_double ("beta");
       }
       prm.leave_subsection ();
+
+      AssertThrow (use_locally_conservative_discretization ||
+                   (stokes_velocity_degree > 1),
+                   ExcMessage ("The polynomial degree for the velocity field "
+                       "specified in the 'Stokes velocity polynomial degree' "
+                       "parameter must be at least 2, unless you are using "
+                       "a locally conservative discretization as specified by the "
+                       "'Use locally conservative discretization' parameter. "
+                       "This is because in the former case, the pressure element "
+                       "is of one degree lower and continuous, and if you selected "
+                       "a linear element for the velocity, you'd need a continuous "
+                       "element of degree zero for the pressure, which does not exist."))
     }
     prm.leave_subsection ();
 


More information about the CIG-COMMITS mailing list