From d16930cb76a9c606d273dbdb52e33e69b029d1c0 Mon Sep 17 00:00:00 2001 From: heister Date: Wed, 25 Jan 2012 00:10:07 +0000 Subject: [PATCH] Fixed: parallel::distributed::refine_and_coarsen_fixed_fraction() contained a rounding bug that often produced wrong results. git-svn-id: https://svn.dealii.org/trunk@24920 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 5 +++++ deal.II/source/distributed/grid_refinement.cc | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index f7d8e7af3d..709653abf4 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -74,6 +74,11 @@ enabled due to a missing include file in file
    +
  1. Fixed: parallel::distributed::refine_and_coarsen_fixed_fraction() +contained a rounding bug that often produced wrong results. +
    +(Timo Heister, 2012/01/24) +
  2. Improved: Utilities::break_text_into_lines now also splits the string at \n.
    (Timo Heister, 2012/01/17) diff --git a/deal.II/source/distributed/grid_refinement.cc b/deal.II/source/distributed/grid_refinement.cc index a798e94549..0210f0c34d 100644 --- a/deal.II/source/distributed/grid_refinement.cc +++ b/deal.II/source/distributed/grid_refinement.cc @@ -710,9 +710,8 @@ namespace parallel RefineAndCoarsenFixedFraction:: master_compute_threshold (locally_owned_indicators, global_min_and_max, - static_cast - (top_fraction_of_error * - total_error), + top_fraction_of_error * + total_error, mpi_communicator); // compute bottom @@ -727,9 +726,8 @@ namespace parallel RefineAndCoarsenFixedFraction:: master_compute_threshold (locally_owned_indicators, global_min_and_max, - static_cast - ((1-bottom_fraction_of_error) * - total_error), + (1-bottom_fraction_of_error) * + total_error, mpi_communicator); else { -- 2.39.5