rafavzqz / geopdes

GeoPDEs: Isogeometric Analysis in Octave and Matlab, for research and teaching purposes.
http://rafavzqz.github.io/geopdes
103 stars 48 forks source link

Increase in error with the change of the exact solution #23

Closed shreyachauhanto888 closed 1 month ago

shreyachauhanto888 commented 1 month ago

Dear sir, I was experimenting with the Poisson problem. I am using the code given in the GeoPDEs software having title EX_LAPLACE_ISO_RING. The geometry of the domain is 'geo_ring.txt'. I am taking the exact solution $u(x,y)=-(x^2+y^2-1)(x^2+y^2-4)xy^2$ and taking the right side force function $f$ accordingly. With polynomial degree 1, regularity 0, number of subdivision 9 and points of Gaussian quadrature 2, I have calculated the $H^1$ and $L^2$ errors and they are error h1 = 2.7536 error l2 = 0.0825 . Now, if I change the exact solution to $u(x,y)=(x^2+y^2-1)^4(x^2+y^2-4)^4x^4y^4$ and with the same discretization parameters, the $H^1$ and $L^2$ errors which I obtained are error h1 =63.2450 error l2 =1.9063. My question is why the error in second case is quite more than that of in the first case? Is it due to the use of higher order polynomials in exact solution? I have also tried the same code with 'geo_square.txt' geometry with exact solution $u(x,y)=x^4(1-x)^4y^4(1-y)^4$ and with the same discretization parameters and the errors obtained are error h1 = 6.6284e-06 error l2 =1.8345e-07, which is comparatively quite less then the errors obtained in ring shaped domain. So, is the increase in the error is affected due to the shape of the domain?

Thanks in advance.

Regards, Shreya.

rafavzqz commented 1 month ago

Dear Shreya, to understand what's going on, you can look at the a priori error estimates available in IGA. For a smooth solution $u$, the error estimate for the $L^2$ norm (the $H^1$ norm is similar): $ || u - u_h ||0 <= C h^{p+1} || u ||{H^p} $ where $h$ is the mesh size, and $p$ is the degree. In the right-hand side it appears the $H^p$ norm of the solution, which takes into account its derivatives up to order $p$. That's why a high order polynomial gives you a higher error. There is also the "constant" $C$, which depends on the degree and the regularity of the discrete space, and also on the derivatives of the parametrization. That's probably why the error for the square domain is smaller. Note also that, since you are computing the absolute error, the size of the domain will also affect much the error.

Two comments:

Best regards, Rafael

shreyachauhanto888 commented 1 month ago

Thank you very much for your answer.

Regards, Shreya.