-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ElementLinePp(2) plotting incorrect #1003
Comments
It remainds me of #969. Perhaps related or not. |
Yes, it's again something to do with 1D plotting. Here is a workaround: ax = plot(basis, phi, nrefs=0) |
With Regardless of the plotting, the calculated values are still not identical: With
With
By the way, my code above was slightly wrong: I messed up the boundary identification.
with
|
I believe that the difference is because ElementLineP2 uses nodal basis and ElementLinePp uses hierarchical basis. |
I'm not entirely sure what that means. Is |
In most applications you can use either one of those but they don't give exactly the same result because the basis functions are different. There are infinite different bases you can use to represent quadratic polynomials. There are many different choices that are used in FEM depending on the use case. |
Understood. Thanks for the help! |
We can leave this open because of the bug in skfem.visuals.matplotlib.plot for MeshLine1. |
I cannot remember what was the remaining work and cannot deduce it by reading this, closing. The workaround is to specify |
Comparing a one-dimensional simulation with higher order elements, I noticed a strange behavior of
ElementLinePp()
when used withp=2
. Other values forp
seem to be fine. Of course, in this special case it would anyways be better to useElementLineP2()
, as stated in the warning message.Example code:
The text was updated successfully, but these errors were encountered: