]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add missing fabs function call.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Mar 2007 09:12:32 +0000 (09:12 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Mar 2007 09:12:32 +0000 (09:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@14605 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/convergence_table.cc

index a24719a81d108de99901d926ca9186187ddb158a..c165e73f1fa2169b095ecc8bfc5c263849de2646 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -127,7 +127,7 @@ ConvergenceTable::evaluate_convergence_rates(const std::string &data_column_key,
                                             // first row
            add_value(rate_key, std::string("-"));
            for (unsigned int i=1; i<n; ++i)
-             add_value(rate_key, std::log(values[i-1]/values[i])/std::log(2.0));
+             add_value(rate_key, std::log(std::fabs(values[i-1]/values[i]))/std::log(2.0));
            break;
 
       default:

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.