oldTime and prevIter both are useful, nothing is deprecated. As stated by David, you can use oldTime to go back multiple time steps (not just one as prevIter), and it manages the storing automatically. That of course only works if you actually need values from a previous timestep, not from subcycle iterations. The latter case is where you would typically use prevIter/storePrevIter, but of course you can also use it to store data from a previous time step.
- Anton |
Does U.oldTime() gives us the value of previous time step, or last value of the field?
assume that we have this situation : while (runTime.loop()) { U = somevalue1 ; . . U = somevalue2 ; x = U.oldTime(); } So x is somevalue1 or is the value of U at the previous time step ? |
U.oldTime() will give the values of U at previous time step.
|
Dear Marupio,
Your reply below is very helpful, but I have still the problems about when "erased and reconstructed at every timestep" happens? At the beginning of each time step or at the end of the time step? Thank you very much. OFFO Quote:
|
hello
Quote:
I try mseh.Cf().oldTime().boundaryField()[patch], it is no works. |
All times are GMT -4. The time now is 08:34. |