Yes the vtu files are necessary (I tried deleting them to check if the pvd would work, but it didn't). Anna. On 13/11/15 12:14, Justin Chang wrote:
Lawrence,
So the first option is what I have been doing. Yes only one pvd is created. But what ends up also happening is that I get hundreds of .vtu files. Are those files necessary for pvd to work? Sorry I am not in front of my computer so I can't test any of this out yet.
Thanks, Justin
On Friday, November 13, 2015, Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk <mailto:lawrence.mitchell@imperial.ac.uk>> wrote:
> On 13 Nov 2015, at 11:47, Justin Chang <jychang48@gmail.com <javascript:;>> wrote: > > Hi all, > > So I am running simulations which have many time steps and normally I would save the files as .pvd via outfile << File(...). This creates a new file for each time level > > However, if I need to solve a large geochemistry system of equations (~20 unknowns) over 100+ time steps, I would prefer not to have 2000+ pvd files sitting my file system/laptop. Is there a way to store the solution of all time levels into a single file?
You can store multiple time steps, of the same Function, in a single pvd file:
out = File("foo.pvd")
for i in range(200): ... out << f
If you also want to store the timestep in the file, do:
for i in range(200}; ... out << (f, t)
Where t is the current timestep.
You cannot, however, store /different/ functions in the same file. So you'll presumably need one pvd per unknown. However, this is hopefully better than one per timestep as well.
Cheers,
Lawrence
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
-- Dr Anna Kalogirou Research Fellow School of Mathematics University of Leeds http://www1.maths.leeds.ac.uk/~matak/