]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Go through all error messages for the data_out_* assertions.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 15 Mar 2015 05:38:39 +0000 (00:38 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 17 Mar 2015 23:27:41 +0000 (18:27 -0500)
include/deal.II/numerics/data_out_rotation.h
include/deal.II/numerics/data_out_stack.h
source/numerics/data_out_stack.cc

index af9c5688cf505828e5f18a236700daa3e07f3c1f..5677465b2b1454bce27d698acf9a1fb4f2a802b4 100644 (file)
@@ -184,13 +184,21 @@ public:
   DeclException1 (ExcInvalidNumberOfSubdivisions,
                   int,
                   << "The number of subdivisions per patch, " << arg1
-                  << ", is not valid.");
+                  << ", is not valid. It needs to be greater or equal to "
+                  "one, or zero if you want it to be determined "
+                  "automatically.");
   /**
    * Exception
    */
   DeclException1 (ExcRadialVariableHasNegativeValues,
                   double,
-                  << "The radial variable attains a negative value of " << arg1);
+                  << "You are attempting to use this class on a triangulation "
+                  "in which some vertices have a negative radial coordinate "
+                  "value of "
+                  << arg1
+                  << ". If you rotate such a triangulation around an "
+                  "axis, you will get (dim+1)-dimensional meshes "
+                  "that are not likely what you hoped to see.");
 
 private:
   /**
index 5874e0b73835b92fdc0a3adf7bc304a5afc72462..c74e52ea5e99e3c726755e7dbb520a52cee78e5c 100644 (file)
@@ -247,16 +247,21 @@ public:
   /**
    * Exception
    */
-  DeclException0 (ExcNoDoFHandlerSelected);
+  DeclExceptionMsg (ExcNoDoFHandlerSelected,
+                    "For the operation you are attempting, you first need to "
+                    "tell the DataOut or related object which DoFHandler "
+                    "you would like to work on.");
   /**
    * Exception
    */
   DeclException3 (ExcInvalidVectorSize,
                   int, int, int,
                   << "The vector has size " << arg1
-                  << " but the DoFHandler objects says there are " << arg2
+                  << " but the DoFHandler object says that there are " << arg2
                   << " degrees of freedom and there are " << arg3
-                  << " active cells.");
+                  << " active cells. The size of your vector needs to be"
+                  << " either equal to the number of degrees of freedom, or"
+                  << " equal to the number of active cells.");
   /**
    * Exception
    */
@@ -266,7 +271,7 @@ public:
                   << "description strings since some graphics formats will only accept these."
                   << std::endl
                   << "The string you gave was <" << arg1
-                  << ">, the invalid character is <" << arg1[arg2]
+                  << ">, within which the invalid character is <" << arg1[arg2]
                   << ">." << std::endl);
   /**
    * Exception
@@ -282,15 +287,20 @@ public:
   DeclException1 (ExcVectorNotDeclared,
                   std::string,
                   << "The data vector for which the first component has the name "
-                  << arg1 << " has not been declared before.");
+                  << arg1 << " has not been added before.");
   /**
    * Exception
    */
-  DeclException0 (ExcDataNotCleared);
+  DeclExceptionMsg (ExcDataNotCleared,
+                    "You cannot start a new time/parameter step before calling "
+                    "finish_parameter_value() on the previous step.");
   /**
    * Exception
    */
-  DeclException0 (ExcDataAlreadyAdded);
+  DeclExceptionMsg (ExcDataAlreadyAdded,
+                    "You cannot declare additional vectors after already calling "
+                    "build_patches(). All data vectors need to be declared "
+                    "before you call this function the first time.");
   /**
    * Exception
    */
@@ -304,7 +314,8 @@ public:
   DeclException1 (ExcInvalidNumberOfSubdivisions,
                   int,
                   << "The number of subdivisions per patch, " << arg1
-                  << ", is not valid.");
+                  << ", is not valid. It needs to be greater or equal "
+                  << "to one.");
 
 private:
   /**
index 4cc8c5beea2709c0bbecc6df59ae55bb573971d6..32b2a272db7e33279e6b1e096e80f24da3907a62 100644 (file)
@@ -53,11 +53,10 @@ void DataOutStack<dim,spacedim,DH>::new_parameter_value (const double p,
   parameter      = p;
   parameter_step = dp;
 
-  // check whether the user called @p{finish_...}
-  // at the end of the previous parameter step
+  // check whether the user called finish_parameter_value() at the end of the previous
+  // parameter step
   //
-  // this is to prevent serious waste of
-  // memory
+  // this is to prevent serious waste of memory
   for (typename std::vector<DataVector>::const_iterator i=dof_data.begin();
        i!=dof_data.end(); ++i)
     Assert (i->data.size() == 0,

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.