]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve error messages. 671/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 18 Mar 2015 23:40:07 +0000 (18:40 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 18 Mar 2015 23:40:07 +0000 (18:40 -0500)
In this context also note that the documentation was at odds with the actual implementation.

include/deal.II/base/quadrature_selector.h
source/base/quadrature_selector.cc

index 2b7b5fa1c230d6140ddda78c89d44f872c52b62a..40a491609aaaf3140a06dc50541303119871daa1 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2003 - 2014 by the deal.II authors
+// Copyright (C) 2003 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -42,8 +42,8 @@ class QuadratureSelector : public Quadrature<dim>
 public:
   /**
    * Constructor. Takes the name of the quadrature rule (one of "gauss",
-   * "milne", "weddle", etc) and, if it iss "gauss", the order of the
-   * quadrature rule as argument.
+   * "milne", "weddle", etc) and, if it is "gauss", the number of quadrature
+   * points in each coordinate direction.
    */
   QuadratureSelector (const std::string &s,
                       const unsigned int order=0);
@@ -66,8 +66,11 @@ public:
    */
   DeclException1 (ExcInvalidQGaussOrder,
                   int,
-                  << "You tried to generate QGauss with an invalid order of "
-                  << arg1 << " (must be >= 2)");
+                  << "You tried to generate a QGauss object with an invalid "
+                  << "number " << arg1
+                  << " of quadrature points in each coordinate "
+                  << "direction. This number must be greater than or equal "
+                  << "to 1.");
   /**
    * Exception
    */
@@ -75,15 +78,15 @@ public:
                   std::string,
                   unsigned int,
                   << "You tried to generate a " << arg1
-                  << " object; no order is needed (" << arg2
-                  << " was given as parameter)");
+                  << " object; no order is needed for objects of this kind, but "
+                  << arg2 << " was given as argument.");
   /**
    * Exception
    */
   DeclException1 (ExcInvalidQuadrature,
                   std::string,
                   << arg1
-                  << " is not a valid quadrature name for a quadrature rule");
+                  << " is not a valid name for a quadrature rule.");
   //@}
 private:
   /**
index 9006b9d92afe8203e0973a6b78884a633c74fe0c..f503556ad469a8350093f91bca927c21704efddf 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2003 - 2014 by the deal.II authors
+// Copyright (C) 2003 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -27,7 +27,7 @@ create_quadrature (const std::string &s,
 {
   if (s == "gauss")
     {
-      AssertThrow(order >= 2, ExcInvalidQGaussOrder(order));
+      AssertThrow(order >= 1, ExcInvalidQGaussOrder(order));
       return QGauss<dim>(order);
     }
   else

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.