Hi,
I came a cross an issue plotting the f(x,y) = (x^2+y^2)/N
where N is a real number
when using the code below the plots looked correct:
mesh Th = square(10,10);
plot(Th, wait = true);
fespace U(Th, P1);
U u;
u = (x^2 + y^2);
plot(u, wait = true, fill = true, value = true);
u = (x^2 + y^2)/10.0;
plot(u, wait = true, fill = true, value = true);
However when using a different mesh set up, I the two plots looked identical. For some reason the division by 10.0 did not occur:
real L = 1.0;
int meshSize = 20;
mesh Mesh2;
border b1(t =-1.,1.){x=Lt; y = -L;};
border b2(t=-1.,1.){x=L; y=Lt; };
border b3(t=0.,2.){x=L-Lt; y=L; };
border b4(t=0.,2.){x=-L;y=L-Lt;};
Mesh2 = buildmesh(b1(meshSize) + b2(meshSize) + b3(meshSize) + b4(meshSize));
plot(Mesh2, wait =1);
fespace U(Mesh2, P1);
U u;
u = (x^2 + y^2);
plot(u, wait = true, fill = true, value = true);
u = (x^2 + y^2)/10.0;
plot(u, wait = true, fill = true, value = true);
If anyone knows why this is happening and how to fix it, please let me know.
thanks!