Dear all,
I have the following variable that I write into an XDMF file:
t = 0.0
ufile1 = XDMFFile("phi.xdmf")
phi = ... # initialize phi
phi.rename("Phi","Scalar flux")
ufile1 << phi
while t < Tmax:
dt = ... # compute the new time step (i.e. potentially different at each time step)
t += dt
phi = ... # solve for the newest phi
phi.rename("Phi","Scalar flux")
ufile1 << phi
My problem is that when I visualize with VisIt, all the results appear with the parameter "Time: 0" at every time step which can be a pain, especially to compare with results that have been generated by other codes.
So I tried the following:
t = 0.0
ufile1 = XDMFFile("phi.xdmf")
phi = ... # initialize phi
phi.rename("Phi","Scalar flux")
phi_prm = phi.parameters
phi_prm.add("Time", t)
ufile1 << phi
while t < Tmax:
dt = ... # compute the new time step (i.e. potentially different at each time step)
t += dt
phi = ... # solve for the newest phi
phi.rename("Phi","Scalar flux")
phi_prm["Time"] = t
ufile1 << phi
But this doesn't change anything... I also tried changing directly the parameters of the xdmf file:
prm = ufile1.parameters
prm.add("Time", t)
...
prm["Time"] = t
but once again, VisIt keeps showing "Time: 0" at every time step...
Would anyone know how to force VisIt to show the time at each time step?
Thanks a lot!
PS:
ufile1 << (phi,t)
doesn't work for me either...