Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adaptive mesh in FreeFem++

Tags:

mesh

freefem++

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!

like image 500
Dmoreno Avatar asked Dec 16 '25 15:12

Dmoreno


1 Answers

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.

like image 99
Anh-Thi DINH Avatar answered Dec 19 '25 06:12

Anh-Thi DINH



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!