From: kronbichler Date: Thu, 27 Feb 2014 06:53:10 +0000 (+0000) Subject: Fix compile error + fix severe bug introduced in r32549 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e774e36ab5747a57388a8dac32e49867b6a407f;p=dealii-svn.git Fix compile error + fix severe bug introduced in r32549 git-svn-id: https://svn.dealii.org/trunk@32564 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/base/function_parser.cc b/deal.II/source/base/function_parser.cc index fd3d083105..ec65526d9a 100644 --- a/deal.II/source/base/function_parser.cc +++ b/deal.II/source/base/function_parser.cc @@ -172,11 +172,11 @@ void FunctionParser:: init_muparser() const } catch (mu::ParserError &e) { - cerr << "Message: " << e.GetMsg() << "\n"; - cerr << "Formula: " << e.GetExpr() << "\n"; - cerr << "Token: " << e.GetToken() << "\n"; - cerr << "Position: " << e.GetPos() << "\n"; - cerr << "Errc: " << e.GetCode() << std::endl; + std::cerr << "Message: " << e.GetMsg() << "\n"; + std::cerr << "Formula: " << e.GetExpr() << "\n"; + std::cerr << "Token: " << e.GetToken() << "\n"; + std::cerr << "Position: " << e.GetPos() << "\n"; + std::cerr << "Errc: " << e.GetCode() << std::endl; AssertThrow(false, ExcParseError(e.GetCode(), e.GetMsg().c_str())); } } @@ -306,11 +306,11 @@ double FunctionParser::value (const Point &p, } catch (mu::ParserError &e) { - cerr << "Message: " << e.GetMsg() << "\n"; - cerr << "Formula: " << e.GetExpr() << "\n"; - cerr << "Token: " << e.GetToken() << "\n"; - cerr << "Position: " << e.GetPos() << "\n"; - cerr << "Errc: " << e.GetCode() << std::endl; + std::cerr << "Message: " << e.GetMsg() << "\n"; + std::cerr << "Formula: " << e.GetExpr() << "\n"; + std::cerr << "Token: " << e.GetToken() << "\n"; + std::cerr << "Position: " << e.GetPos() << "\n"; + std::cerr << "Errc: " << e.GetCode() << std::endl; AssertThrow(false, ExcParseError(e.GetCode(), e.GetMsg().c_str())); return 0.0; } diff --git a/deal.II/source/lac/sparsity_pattern.cc b/deal.II/source/lac/sparsity_pattern.cc index 3db6cd5c21..3efbb95cba 100644 --- a/deal.II/source/lac/sparsity_pattern.cc +++ b/deal.II/source/lac/sparsity_pattern.cc @@ -800,11 +800,13 @@ SparsityPattern::add_entries (const size_type row, break; } if (has_larger_entries == false) - for ( ; it != end; ++it, ++k) + for ( ; it != end; ++it) { + if (*it == row) + continue; Assert (k <= rowstart[row+1], ExcNotEnoughSpace(row, rowstart[row+1]-rowstart[row])); - colnums[k] = *it; + colnums[k++] = *it; } else // cannot just append the new range at the end, forward to the