]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix bug introduce by commit 594dc87 in function GridRefinement::refine_and_coarsen_fi...
authorLei Qiao <qiaol618@gmail.com>
Wed, 1 Jul 2015 01:34:39 +0000 (20:34 -0500)
committerLei Qiao <qiaol618@gmail.com>
Wed, 1 Jul 2015 03:18:02 +0000 (22:18 -0500)
source/grid/grid_refinement.cc

index 8b05b2455f20f489532c5fb36594a900c80ec11d..c81faed8e20f6ce09b85a2510fb188821b0356da 100644 (file)
@@ -333,7 +333,7 @@ GridRefinement::adjust_refine_and_coarsen_number_fraction (const unsigned int  c
   else if (static_cast<unsigned int>
            (current_n_cells
             + refine_cells * cell_increase_on_refine
-            - coarsen_cells / cell_decrease_on_coarsen)
+            - coarsen_cells * cell_decrease_on_coarsen)
            >
            max_n_cells)
     {
@@ -351,7 +351,7 @@ GridRefinement::adjust_refine_and_coarsen_number_fraction (const unsigned int  c
           (max_n_cells - current_n_cells)
           /
           (refine_cells * cell_increase_on_refine
-           - coarsen_cells / cell_decrease_on_coarsen);
+           - coarsen_cells * cell_decrease_on_coarsen);
 
       adjusted_fractions.first  = alpha * top_fraction;
       adjusted_fractions.second = alpha * bottom_fraction;

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.