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

Implements the perp operator as a class #184

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

tommbendall
Copy link
Contributor

The perp operation is currently implemented as function:

lambda u: as_vector([-u[1], u[0]])

This create problems for the form manipulation language used in Firedrake's Gusto package. When we try to use UFL's replacement routines on a perp-ed vector, the perp-ed vector is not recognised as an operation on the original vector.

This PR addresses this by implementing perp as a class Perp, just as other operations such as the cross product are implemented.

dham
dham previously requested changes Jul 26, 2023
Copy link
Collaborator

@dham dham left a comment

Choose a reason for hiding this comment

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

Please also test for Firedrake compatibility.

ufl/tensoralgebra.py Show resolved Hide resolved
ufl/tensoralgebra.py Outdated Show resolved Hide resolved
@mscroggs mscroggs merged commit 5803fcb into FEniCS:main Sep 12, 2023
11 checks passed
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.

3 participants