Skip to content
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

ElementLineP0 #508

Closed
gdmcbain opened this issue Nov 9, 2020 · 2 comments
Closed

ElementLineP0 #508

gdmcbain opened this issue Nov 9, 2020 · 2 comments

Comments

@gdmcbain
Copy link
Contributor

gdmcbain commented Nov 9, 2020

We have ElementTriP0 , ElementQuad0 #266, ElementTetP0, but not ElementLineP0 (or the hexahedron).

@gdmcbain gdmcbain mentioned this issue Nov 9, 2020
@gdmcbain
Copy link
Contributor Author

gdmcbain commented Nov 9, 2020

An anomaly:

  • these are O. K.:
    • FacetBasis(MeshTri(), ElementTriP0())
    • FacetBasis(MeshTet(), ElementTetP0())
    • FacetBasis(MeshLine(), ElementLineP0()), from ElementLineP0 #509 at 25a636a
  • but this isn't
    • FacetBasis(MeshQuad(), ElementQuad0())

raising ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (4,) and requested shape (4,2)

@kinnala
Copy link
Owner

kinnala commented Nov 9, 2020

Seems there is actually a bug in element_quad0.py. np.ones(X.shape[1]) should be replaced with, e.g., np.zeros_like(X[0]) + 1. Maybe np.ones(X.shape[1:]) would also work. The thing is that X has different shape in InteriorBasis and FacetBasis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants