From: bangerth Date: Tue, 4 Oct 2011 18:49:45 +0000 (+0000) Subject: Clean up code somewhat. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3388a5387d9fb172085238082940bde5fabf270;p=dealii-svn.git Clean up code somewhat. git-svn-id: https://svn.dealii.org/trunk@24529 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index 6d5fc9cbca..14cc93c82f 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -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) +