On 13 Nov 2015, at 11:47, Justin Chang <jychang48@gmail.com> 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