]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make casts explicit, initialize all variables 3454/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 4 Nov 2016 12:49:48 +0000 (13:49 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 4 Nov 2016 13:46:08 +0000 (14:46 +0100)
source/numerics/time_dependent.cc

index 005b5c862c80a3397198d4eeb0b2fa06ed717819..be8f358aa42fb85c017ff793cbc2fc292cd08e5f 100644 (file)
@@ -250,7 +250,8 @@ TimeStepBase::TimeStepBase (const double time) :
   next_timestep (0),
   sweep_no (numbers::invalid_unsigned_int),
   timestep_no (numbers::invalid_unsigned_int),
-  time (time)
+  time (time),
+  next_action(numbers::invalid_unsigned_int)
 {}
 
 
@@ -863,7 +864,7 @@ void TimeStepBase_Tria<dim>::refine_grid (const RefinementData refinement_data)
           if (cell->refine_flag_set())
             previous_cells += (GeometryInfo<dim>::max_children_per_cell-1);
           else if (cell->coarsen_flag_set())
-            previous_cells -= (GeometryInfo<dim>::max_children_per_cell-1) /
+            previous_cells -= (double)(GeometryInfo<dim>::max_children_per_cell-1) /
                               GeometryInfo<dim>::max_children_per_cell;
 
         // @p{previous_cells} now gives the
@@ -889,7 +890,7 @@ void TimeStepBase_Tria<dim>::refine_grid (const RefinementData refinement_data)
           if (cell->refine_flag_set())
             estimated_cells += (GeometryInfo<dim>::max_children_per_cell-1);
           else if (cell->coarsen_flag_set())
-            estimated_cells -= (GeometryInfo<dim>::max_children_per_cell-1) /
+            estimated_cells -= (double)(GeometryInfo<dim>::max_children_per_cell-1) /
                                GeometryInfo<dim>::max_children_per_cell;
 
         // calculate the allowed delta in

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.