I'm trying to improve my FreeFem++ code by adapting my initial mesh at certain time steps but FreeFem++ comes up with this error message:
Exec error : Try to get unset x,y, ...
after the mesh is indeed adapted. The problems seems to appear when computing the solution in the new mesh, but I haven't had this problem in other cases though. This is how I adapt the mesh in FreeFem++ and update the variables:
Th = adaptmesh(Th,[u1,u2]);
plot(Th);
u1 = u1;
u2 = u2;
p = p;
but now I'm confused on how to proceed after the warning message.
Does anybody know how to solve this? Any piece of advice will be appreciated.
Thanks!
I know this is a very old question, but my following answer is for those who still want to.
I ran into the same error when trying to output (cout) a FE variable uh, it's solved if we try uh[] instead. In this case, it's an array.
Vh uh = x;
cout << uh << endl; // error
cout << uh[] << endl; // good
Hope you can check the same thing for your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With