]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compile error + fix severe bug introduced in r32549
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 27 Feb 2014 06:53:10 +0000 (06:53 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 27 Feb 2014 06:53:10 +0000 (06:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@32564 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/function_parser.cc
deal.II/source/lac/sparsity_pattern.cc

index fd3d083105b2826d4a7de0fd9dfd3d89e1e9c3c5..ec65526d9a017c71a56c81309ca386efb230ca71 100644 (file)
@@ -172,11 +172,11 @@ void FunctionParser<dim>:: 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<dim>::value (const Point<dim>  &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;
     }
index 3db6cd5c21c314e697c15687b37b7167c222e3d2..3efbb95cbade4585f178859b8bb828bb4d9aed00 100644 (file)
@@ -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

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.