From 9d0b8d2fdd7ad61974cc01b42358a0c7779937e1 Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 18 Apr 2005 22:32:50 +0000 Subject: [PATCH] Clean up a leftover from the format change. git-svn-id: https://svn.dealii.org/trunk@10518 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/data_out_base.cc | 41 +++++++++++++++++++++------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index d3f5262424..ef9d553b63 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -30,13 +30,19 @@ #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 @@ -4559,10 +4565,25 @@ DataOutReader::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 + 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); -- 2.39.5