-
Notifications
You must be signed in to change notification settings - Fork 13
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
Use the fact that helmholtz k is real for better codegen #176
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Alex Fikl <[email protected]>
Thanks! |
Hmm, whoops. The changes made sense to me, but I missed that the CIs are failing. |
sumpy/kernel.py
Outdated
if allow_evanescent: | ||
expr = var("exp")(var("I")*k*r)/r | ||
else: | ||
expr = var("exp")(var("Ik")*r)/r |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hack is to allow the rewrite later on. Otherwise CSE will move this to another assignment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment to explain?
sumpy/codegen.py
Outdated
@@ -592,6 +592,39 @@ def map_sum(self, expr, *args): | |||
# }}} | |||
|
|||
|
|||
# {{{ helmholtz rewrite | |||
class HelmholtzRewriter(CSECachingIdentityMapper, CallExternalRecMapper): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a docstring to explain intent.
No description provided.