]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a bit of error checking.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 26 May 1998 12:58:41 +0000 (12:58 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 26 May 1998 12:58:41 +0000 (12:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@367 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 7d41e06ac6e1263f0bccf947e26434a9d0d93039..79ea4e7166f9212909e57076eb9700e99cf4247f 100644 (file)
@@ -103,6 +103,9 @@ Remove the this-> coding in tria_iterator.templates.h. These were
   egcs  snapshot.
 
 
+Re-enable printing of a preamble to ucd files in data_io.cc.
+
+
 
 
 DEAL:
index d781afaaf301fa0c07ad9dbee08f1c14fd3d2676..ccdfe0204ab10137bca0a9eab8c9ded20b4ebc41 100644 (file)
@@ -425,6 +425,15 @@ class DataOut {
                                      * Exception
                                      */
     DeclException0 (ExcNoDoFHandlerSelected);
+                                    /**
+                                     * Exception
+                                     */
+    DeclException2 (ExcInvalidVectorSize,
+                   int, int,
+                   << "The vector has size " << arg1
+                   << " but the DoFHandler objects says there are " << arg2
+                   << " degrees of freedom.");
+    
   private:
 
                                     /**
index 44eb3a8700eed3cbcc70df118f736e1ac173cde4..b3d2d571354634f54df286a7f77ee12e3229b313 100644 (file)
@@ -212,6 +212,9 @@ template <int dim>
 void DataOut<dim>::add_data_vector (const dVector &vec,
                                    const string  &name,
                                    const string  &units) {
+  Assert (dofs != 0, ExcNoDoFHandlerSelected ());
+  Assert (vec.size() == dofs->n_dofs(),
+         ExcInvalidVectorSize (vec.size(), dofs->n_dofs()));
   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.