Hello,
I am trying to find a simple command to save my solutions, so that they can be loaded later. I am aware of the approach using ofstream and ifstream, however I was hoping there would be a high-level function to do this.
I found SaveVec and LoadVec which are included in the source code, but do not seem to work. Am I missing a load or include command?
Example:
load "lapack"
// Dummy Laplace problem
mesh Th = square(10,10);
fespace Vh(Th,P1);
Vh u,v;
solve a(u,v) = int2d(Th)(dx(u)*dx(v) + dy(u)*dy(v)) + on(1,u=x);
plot(u);
// Save vector
SaveVec(u[],"u.sol");
// Try to load vector.
Vh w;
w[] = LoadVec("u.sol");