Hi,
I am trying to run your implicit diffusion solver on a 2D 500x500 mesh.
However, I would like to repeatedly run this solver to evolve the same
mesh, without losing previous values. So for example:
mesh = Grid2D(dx = 0.000002, nx=500, ny=500)
var = CellVariable(name="solution variable", mesh=mesh, value=0)
if __name__ == '__main__':
i = 0
while (i < steps):
# <do something to var>
ImplicitDiffusionTerm(coeff = 1).solve(var, dt=2)
# <do something else to var>
i = i + 1
However, I can't currently do this because whenever I call the solve()
method, it resets 'var' to all zeros. Is there anyway I can stop this
from happening? Appreciate it!
Best,
Trevor
--
-------------------------------------------------------
This is your time, this is your dance
Live every moment, leave nothing to chance.
Swim in the sea, drink of the deep
Embrace the mystery of all you can be.
- Michael W. Smith, "This Is Your Time"