]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a message.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 1 Nov 1998 22:25:19 +0000 (22:25 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 1 Nov 1998 22:25:19 +0000 (22:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@620 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/data_io.h
deal.II/deal.II/source/numerics/data_io.cc

index 1502aebc010d3f679aa26b5a857d961043647aca..cd84fd0546945a0ac6a1f8ce7f976e99ce6cbd17 100644 (file)
@@ -399,6 +399,14 @@ class DataOut {
                    << "The vector has size " << arg1
                    << " but the DoFHandler objects says there are " << arg2
                    << " degrees of freedom.");
+                                    /**
+                                     * Exception
+                                     */
+    DeclException1 (ExcInvalidCharacter,
+                   string,
+                   << "Please use only the characters [a-zA-Z0-9_] for" << endl
+                   << "description strings since AVS will only accept these." << endl
+                   << "The string you gave was <" << arg1 << ">.");
     
   private:
 
index 1e6fb16dec5a1a9befd3a02fd27a0ec4ce790e03..2f36c119f843ba0500c04d524b50bfaf641bd90f 100644 (file)
@@ -211,6 +211,15 @@ void DataOut<dim>::add_data_vector (const dVector &vec,
   Assert (dofs != 0, ExcNoDoFHandlerSelected ());
   Assert (vec.size() == dofs->n_dofs(),
          ExcInvalidVectorSize (vec.size(), dofs->n_dofs()));
+  Assert (name.find_first_not_of("abcdefghijklmnopqrstuvwxyz"
+                                "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+                                "0123456789_") == string::npos,
+         ExcInvalidCharacter (name));
+  Assert (units.find_first_not_of("abcdefghijklmnopqrstuvwxyz"
+                                 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+                                 "0123456789_") == string::npos,
+         ExcInvalidCharacter (units));
+  
   DataEntry new_entry (&vec, name, units);
   data.push_back (new_entry);
 };

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.