From eb2bc5ae97bdd948b5099f657d8eb63697d21293 Mon Sep 17 00:00:00 2001 From: Praveen C Date: Mon, 4 Jan 2021 09:47:50 +0530 Subject: [PATCH] Reset time and timestep_number during pre refinement steps Otherwise, the pre-refinement is performed only once. See https://github.com/dealii/dealii/issues/10715 --- doc/news/changes/minor/20210105CPraveen | 3 +++ examples/step-26/step-26.cc | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 doc/news/changes/minor/20210105CPraveen diff --git a/doc/news/changes/minor/20210105CPraveen b/doc/news/changes/minor/20210105CPraveen new file mode 100644 index 0000000000..dd9725f3a5 --- /dev/null +++ b/doc/news/changes/minor/20210105CPraveen @@ -0,0 +1,3 @@ +Fixed: Reset time and timestep_number during pre refinement steps in step-26. +
+(Praveen Chandrashekar, 2021/01/05) diff --git a/examples/step-26/step-26.cc b/examples/step-26/step-26.cc index 2f9e2ed363..724462efb0 100644 --- a/examples/step-26/step-26.cc +++ b/examples/step-26/step-26.cc @@ -205,9 +205,7 @@ namespace Step26 HeatEquation::HeatEquation() : fe(1) , dof_handler(triangulation) - , time(0.0) , time_step(1. / 500) - , timestep_number(0) , theta(0.5) {} @@ -457,6 +455,9 @@ namespace Step26 start_time_iteration: + time = 0.0; + timestep_number = 0; + tmp.reinit(solution.size()); forcing_terms.reinit(solution.size()); -- 2.39.5