0

Like the following code, I know time does not push forward in the 'while', and time pushes forward in the 'for'. In addtion, updateOld can set the values of the previous solution sweep to the current values. Does updateOld also inform the sweep to push time forward?

for t in range(100):
    v0.updateOld()
    res=1.0
    while res > 0.1:
       res = eq0.sweep(var=v0, dt=1e-5)

1 Answers1

0

FiPy does not keep track of elapsed time; that's up to you. On the other hand, updating the previous solution with the current values is how time advances.

jeguyer
  • 2,379
  • 1
  • 11
  • 15