-
Notifications
You must be signed in to change notification settings - Fork 160
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
Constant initialization / assignment with division discards complex part #2376
Comments
This is a UFL bug, but it's kind of subtle. UFL does the following to attempt to evaluate a numeric value for the division:
In this case Effectively none of the UFL scalar evaluation is type safe. The construction of One way to fix this would be to override all the |
Could just fix UFL. Proactively check if either operand is complex instead of falling back. |
Actually, that integer division workaround is old Python 2 stuff. Probably the code should just call |
Fixed by FEniCS/ufl#342 |
e.g.
leads to
Is this a UFL bug? Or should Firedrake lead to a
TypeError
being raised?The text was updated successfully, but these errors were encountered: