template<int dim>
void HeatEquation<dim>::run()
{
- const unsigned int initial_refinement = (dim == 2 ? 4 : 2);
- const unsigned int n_pre_refinement_steps = 3;
+ const unsigned int initial_global_refinement = (dim == 2 ? 4 : 2);
+ const unsigned int n_adaptive_pre_refinement_steps = 3;
GridGenerator::hyper_L (triangulation);
- triangulation.refine_global (initial_refinement);
+ triangulation.refine_global (initial_global_refinement);
setup_system();
output_results();
if ((timestep_number == 1) &&
- (pre_refinement_step < n_pre_refinement_steps))
+ (pre_refinement_step < n_adaptive_pre_refinement_steps))
{
- refine_mesh (initial_refinement,
- initial_refinement + n_pre_refinement_steps);
+ refine_mesh (initial_global_refinement,
+ initial_global_refinement + n_adaptive_pre_refinement_steps);
++pre_refinement_step;
std::cout << std::endl;
goto start_time_iteration;
}
else if ((timestep_number > 0) && (timestep_number % 5 == 0))
- refine_mesh (initial_refinement,
- initial_refinement + n_pre_refinement_steps);
+ refine_mesh (initial_global_refinement,
+ initial_global_refinement + n_adaptive_pre_refinement_steps);
old_solution = solution;
}