]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Clean up code somewhat.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Oct 2011 18:49:45 +0000 (18:49 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Oct 2011 18:49:45 +0000 (18:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@24529 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-32/step-32.cc

index 6d5fc9cbcabe50da42919dbf4553b3b61802c820..14cc93c82f4e9de42bb7306e17354a929727f65a 100644 (file)
@@ -3275,7 +3275,7 @@ namespace Step32
        const double old_Ts
          = (use_bdf2_scheme ?
             (scratch.old_temperature_values[q] *
-             (time_step + old_time_step) / old_time_step
+             (1 + time_step/old_time_step)
              -
              scratch.old_old_temperature_values[q] *
              (time_step * time_step) /
@@ -3283,30 +3283,46 @@ namespace Step32
             :
             scratch.old_temperature_values[q]);
 
+       const double ext_T
+         = (use_bdf2_scheme ?
+            (scratch.old_temperature_values[q] *
+             (1 + time_step/old_time_step)
+             -
+             scratch.old_old_temperature_values[q] *
+             time_step/old_time_step)
+            :
+            scratch.old_temperature_values[q]);
+
        const Tensor<1,dim> ext_grad_T
          = (use_bdf2_scheme ?
             (scratch.old_temperature_grads[q] *
-             (1+time_step/old_time_step)
+             (1 + time_step/old_time_step)
              -
              scratch.old_old_temperature_grads[q] *
-             time_step / old_time_step)
+             time_step/old_time_step)
             :
             scratch.old_temperature_grads[q]);
 
        const Tensor<1,dim> extrapolated_u
          = (use_bdf2_scheme ?
-            (scratch.old_velocity_values[q] * (1+time_step/old_time_step) -
-             scratch.old_old_velocity_values[q] * time_step/old_time_step)
+            (scratch.old_velocity_values[q] *
+             (1 + time_step/old_time_step)
+             -
+             scratch.old_old_velocity_values[q] *
+             time_step/old_time_step)
             :
             scratch.old_velocity_values[q]);
+
        const SymmetricTensor<2,dim> extrapolated_strain_rate
          = (use_bdf2_scheme ?
-            (scratch.old_strain_rates[q] * (1+time_step/old_time_step) -
-             scratch.old_old_strain_rates[q] * time_step/old_time_step)
+            (scratch.old_strain_rates[q] *
+             (1 + time_step/old_time_step)
+             -
+             scratch.old_old_strain_rates[q] *
+             time_step/old_time_step)
             :
             scratch.old_strain_rates[q]);
 
-// @todo ?????? why old_Ts?
        const double gamma
          = ((EquationData::radiogenic_heating * EquationData::density(old_Ts)
              +

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.