Kaushik,

We are incrementing timestep_number at the beginning of the loop and it is initialized to 0 in the constructor. Should not then the if statement for pre_refinement will be only true just once when timestep_number = 1?
Should not we decrement  timestep_number inside the if part of the loop?
Thank you,
Kaushik

while (time <= 0.5)
{
time += time_step;
++timestep_number;
...

if ((timestep_number == 1) &&
(pre_refinement_step < n_adaptive_pre_refinement_steps))
{
...
}
else if ((timestep_number > 0) && (timestep_number % 5 == 0))
{
...
}
old_solution = solution;
}

I think what you are saying is that when we go back to the start_time_iteration label, we should reset time=0 and timestep_number=0. Is that correct?

I think you discovered a bug in the program. I see that this seems to have been right in 8.4.0:
https://dealii.org/8.4.0/doxygen/deal.II/step_26.html#codeHeatEquationruncode
but broken in 8.5.0:
https://dealii.org/8.5.0/doxygen/deal.II/step_26.html#codeHeatEquationruncode

So the bug must have been introduced between March 2016 and April 2017. It would be interesting to figure out which pull request caused this, and then to write a patch. Would you like to work on this?

Best
 Wolfgang
--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/2e3469fc-bd2e-5ba6-d9b3-f2f6709d8a59%40colostate.edu.

Reply via email to