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

Add function to get the ufl.Cell corresponding to a cell's facet #76

Merged
merged 8 commits into from
Jan 10, 2022

Conversation

jpdean
Copy link
Member

@jpdean jpdean commented Dec 23, 2021

In some applications, it is useful to get the ufl.Cell corresponding to a cell's facets (i.e. for a triangle in 2D space, the facets are ufl.Cell('interval', 2)).

@chrisrichardson
Copy link
Contributor

I've a feeling this already exidts as a free function, something like cell2facet - it's problematic with e.g. prism cells, because it depends which facet... can we do something better?

@chrisrichardson
Copy link
Contributor

I am thinking of ufl.cell.cellname2facetname() which is used elsewhere in ffcx. It would be good to clean this up, rather than have two similar functions.

@chrisrichardson
Copy link
Contributor

Looking at your PR, I see now that was a silly comment of mine, as you are using this function already. I'm still not happy about making use of something that is pretty flawed.

@jpdean
Copy link
Member Author

jpdean commented Dec 29, 2021

OK, thanks! I'll look into improving cellname2facetname.

@chrisrichardson
Copy link
Contributor

This looks good to me. @dham - can we delete ufl.cell.cellname2facetname? Or is this used in firedrake?

Copy link
Contributor

@chrisrichardson chrisrichardson 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 an improvement, which will allow us to remove the oddly named and inconsistent cellname2facetname function.

ufl/cell.py Outdated Show resolved Hide resolved
ufl/cell.py Outdated Show resolved Hide resolved
ufl/cell.py Outdated Show resolved Hide resolved
@chrisrichardson chrisrichardson merged commit 7a4303f into main Jan 10, 2022
@chrisrichardson chrisrichardson deleted the jpdean/meshview branch January 10, 2022 09:08
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.

None yet

3 participants