-
Notifications
You must be signed in to change notification settings - Fork 204
Closed
Description
This issue stems from an email discussion with Stathis Charalampidis (@echarala).
He reported inconsistencies when evaluating linear forms on adapted meshes depending on whether integration on the mesh is considered directly or after saving and loading. I suspect this issue stems from a loss of precision when saving the adapted mesh. For consistency, I believe that either the precision of Th from adaptmesh should be reduced to match that of savemesh, or the precision of savemesh should be increased to match adaptmesh. Either way, their precision should be the same.
I have included a MWE below which shows that the result of integration changes when the mesh is saved and loaded. The result loses roughly 4 significant digits of precision.
mesh Th = square(5, 5, [-1+2*x, -1+2*y]);
fespace Vh(Th,P1);
Vh fh = 10.0*x^3 + y^3 + atan2(0.0001, sin(5.0*y)-2.0*x);
varf vf(f, v) = int2d(Th)(fh*v);
Th = adaptmesh(Th, fh);
fh = fh;
real[int] array = vf(0, Vh);
cout.precision(17);
cout << array.l2 << endl;
savemesh(Th, "Th.msh");
Th = readmesh("Th.msh");
array = vf(0, Vh);
cout << array.l2 << endl;
Metadata
Metadata
Assignees
Labels
No labels