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

Refactor shapes #1

Merged
merged 28 commits into from
Dec 2, 2020

Conversation

inducer
Copy link

@inducer inducer commented Nov 28, 2020

This pushes inducer#16 towards relying even more heavily on the shapes stuff.

Copy link
Owner

@alexfikl alexfikl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely more of a refactor that I would have been comfortable doing! It looks really nice!

modepy/matrices.py Outdated Show resolved Hide resolved
modepy/modes.py Outdated Show resolved Hide resolved
modepy/modes.py Show resolved Hide resolved
modepy/modes.py Show resolved Hide resolved
modepy/nodes.py Outdated Show resolved Hide resolved
modepy/shapes.py Outdated Show resolved Hide resolved
modepy/shapes.py Outdated Show resolved Hide resolved
modepy/shapes.py Outdated Show resolved Hide resolved
modepy/tools.py Outdated Show resolved Hide resolved
test/test_nodes.py Show resolved Hide resolved
@inducer
Copy link
Author

inducer commented Nov 28, 2020

It occurred to me that it still equates "shape + order = polynomial space", which is not totally true. I'm thinking of introducing a separate object for the polynomial space. Is that crazy? (Not a big change, just Pk and Qk for now.)

@alexfikl
Copy link
Owner

It occurred to me that it still equates "shape + order = polynomial space", which is not totally true. I'm thinking of introducing a separate object for the polynomial space. Is that crazy? (Not a big change, just Pk and Qk for now.)

Isn't that mostly what the discretization ElementGroups in meshmode are?

@inducer
Copy link
Author

inducer commented Nov 28, 2020

Isn't that mostly what the discretization ElementGroups in meshmode are?

In a way, sure... but they're about multiple elements, not just the reference element.

What worries me more is that we're currently answering the question "give me a basis for tetrahedra", which is nonsense. "Give me a basis for P^k" makes incrementally more sense. The motivating examples where things break down that I think about are pyramids and inhomogeneous tensor products.

@alexfikl
Copy link
Owner

What worries me more is that we're currently answering the question "give me a basis for tetrahedra", which is nonsense.

Yes, I agree it's a bit clunky. Especially as inducer#15 would already introduce a non-tensor product set for squares. It makes sense to add something like a polynomial space to express these things.

@alexfikl
Copy link
Owner

alexfikl commented Dec 1, 2020

@inducer Should I merge this back into inducer#16 now?

@inducer
Copy link
Author

inducer commented Dec 1, 2020

Not yet. There's another big chunk coming.

Copy link
Owner

@alexfikl alexfikl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few more comments. I can fix these after we merge back into inducer#16.

modepy/nodes.py Outdated Show resolved Hide resolved
modepy/nodes.py Outdated Show resolved Hide resolved
modepy/nodes.py Outdated Show resolved Hide resolved
modepy/quadrature/__init__.py Show resolved Hide resolved
modepy/quadrature/__init__.py Outdated Show resolved Hide resolved
modepy/quadrature/__init__.py Outdated Show resolved Hide resolved
modepy/shapes.py Show resolved Hide resolved
@inducer
Copy link
Author

inducer commented Dec 1, 2020

The "big chunk of stuff" is now in, mostly consisting of introducing a notion of polynomial spaces. Take a look. Good to merge back once the checks on inducer/meshmode#95 pass.

Copy link
Owner

@alexfikl alexfikl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me! inducer/meshmode#95 also seems to have passed too!

I'll merge this back into inducer#16 and we can nitpick it more there!

modepy/spaces.py Show resolved Hide resolved
@alexfikl alexfikl merged commit 982ae2b into alexfikl:tensor-face-mass-matrix Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants