]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Clean up a leftover from the format change.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Apr 2005 22:32:50 +0000 (22:32 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Apr 2005 22:32:50 +0000 (22:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@10518 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/data_out_base.cc

index d3f5262424ca6f0b567588a72093980c63c900dc..ef9d553b639632d870ba59963721c7437d5f1396 100644 (file)
 #endif
 
 
-DeclException2(ExcUnexpectedInput,
-              std::string, std::string,
-              << "Unexpected input: expected line\n  <"
-              << arg1
-              << ">\nbut got\n  <"
-              << arg2 << ">");
+DeclException2 (ExcUnexpectedInput,
+                std::string, std::string,
+                << "Unexpected input: expected line\n  <"
+                << arg1
+                << ">\nbut got\n  <"
+                << arg2 << ">");
 
+DeclException4 (ExcIncompatibleDimensions,
+                int, int, int, int,
+                << "Either the dimensions <" << arg1 << "> and <"
+                << arg2 << "> or the space dimensions <"
+                << arg3 << "> and <" << arg4
+                << "> do not match!");
 
 
 template <int dim, int spacedim>
@@ -4559,10 +4565,25 @@ DataOutReader<dim,spacedim>::read (std::istream &in)
     tmp.swap (dataset_names);
   }
 
-                                  // then check that we have the
-                                  // correct header of this
-                                  // file. both the first and second
-                                  // lines have to match
+                                  // then check that we have the correct
+                                  // header of this file. both the first and
+                                  // second real lines have to match, as well
+                                  // as the dimension information written
+                                  // before that
+  {
+    std::pair<unsigned int, unsigned int>
+      dimension_info
+      = ::DataOutBase::determine_intermediate_format_dimensions (in);
+    AssertThrow ((dimension_info.first  == dim) &&
+                 (dimension_info.second == spacedim),
+                 ExcIncompatibleDimensions (dimension_info.first, dim,
+                                            dimension_info.second, spacedim));
+
+                                     // read to the end of the line
+    std::string tmp;
+    getline (in, tmp);
+  }
+  
   {
     std::string header;
     getline (in, header);

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.