void build_stokes_preconditioner ();
void assemble_stokes_system ();
void assemble_temperature_matrix ();
- void assemble_temperature_system ();
+ void assemble_temperature_system (const double maximal_velocity);
void project_temperature_field ();
double get_maximal_velocity () const;
std::pair<double,double> get_extrapolated_temperature_range () const;
template <int dim>
-void BoussinesqFlowProblem<dim>::assemble_temperature_system ()
+void BoussinesqFlowProblem<dim>::assemble_temperature_system (const double maximal_velocity)
{
const bool use_bdf2_scheme = (timestep_number != 0);
std::vector<double> phi_T (dofs_per_cell);
std::vector<Tensor<1,dim> > grad_phi_T (dofs_per_cell);
- const double global_u_infty = get_maximal_velocity();
const std::pair<double,double>
global_T_range = get_extrapolated_temperature_range();
old_velocity_values,
old_old_velocity_values,
gamma_values,
- global_u_infty,
+ maximal_velocity,
global_T_range.second - global_T_range.first,
cell->diameter());
computing_timer.enter_section (" Assemble temperature rhs");
- old_time_step = time_step;
+ old_time_step = time_step;
+ const double maximal_velocity = get_maximal_velocity();
time_step = 1./(1.6*dim*std::sqrt(1.*dim)) /
temperature_degree *
GridTools::minimal_cell_diameter(triangulation) /
- std::max (get_maximal_velocity(), 0.01);
+ std::max (maximal_velocity, 0.01);
pcout << " " << "Time step: " << time_step
<< std::endl;
temperature_solution = old_temperature_solution;
-
- assemble_temperature_system ();
+ assemble_temperature_system (maximal_velocity);
computing_timer.exit_section ();