Hi! I have the next problem: I need to save the solution at each iteration to some file and in the next iteration load solution from the previous iteration. Is it possible? I know, that I can simply assign result from the previous iteration to current function, but this option does not suit me. Thank you advance. The example below.
from dolfin import *
mesh = Mesh("...some_file")
V = FunctionSpace(mesh, 'Lagrange', 1)
...
for i in range(10):
u0 = load_solution()
# Solve equation with initial conditions u0, store solution to the u function
...
save_solution(u)
def save_solution(u):
# Save solution to some file
...
def load_solution():
# Load solution from some file and return it. u0 - Function
...
return u0