From: Wolfgang Bangerth Date: Mon, 18 Apr 2005 22:32:50 +0000 (+0000) Subject: Clean up a leftover from the format change. X-Git-Tag: v8.0.0~14037 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30a99fad348339d51f84b1292a5f9a2407fa6274;p=dealii.git Clean up a leftover from the format change. git-svn-id: https://svn.dealii.org/trunk@10518 0785d39b-7218-0410-832d-ea1e28bc413d --- 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);