Skip to content

Use a separate class for M2L translation and change expansion default to FFT#113

Merged
inducer merged 13 commits into
inducer:mainfrom
isuruf:m2l
May 13, 2022
Merged

Use a separate class for M2L translation and change expansion default to FFT#113
inducer merged 13 commits into
inducer:mainfrom
isuruf:m2l

Conversation

@isuruf

@isuruf isuruf commented Apr 29, 2022

Copy link
Copy Markdown
Collaborator

@isuruf isuruf requested a review from inducer April 29, 2022 18:33
Comment thread test/test_fmm.py Outdated
Comment on lines +197 to +200
from sumpy.expansion.m2l import VolumeTaylorM2LWithFFT
m2l_translation = VolumeTaylorM2LWithFFT()
else:
m2l_translation = None

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Maybe default this to on in the cases where it works? (of course keeping a way to force which is used)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

What do you think of 72b4875?

@inducer

inducer commented May 3, 2022

Copy link
Copy Markdown
Owner

Could you take a look? This now seems to fail CI.

@isuruf

isuruf commented May 4, 2022

Copy link
Copy Markdown
Collaborator Author

This is because I changed the default for the M2L translation to FFT and now all tests require the additional translation_classes data. How about I keep the default to non FFT in sumpy and use the FFT in pytential where the translation_classes is computed and passed?

@inducer

inducer commented May 4, 2022

Copy link
Copy Markdown
Owner

I'd prefer to have the default at FFT while modifying all the constructor calls in sumpy. I could also live with a non-FFT default that yells about its deprecation. (To be clear: We won't deprecate non-FFT execution, just not specifying which you want.)

@isuruf isuruf marked this pull request as draft May 5, 2022 22:00
@isuruf isuruf changed the title Use a separate class for M2L translation Use a separate class for M2L translation and change expansion default to FFT May 7, 2022
@isuruf

isuruf commented May 7, 2022

Copy link
Copy Markdown
Collaborator Author

Factor of 2 change fixed the tests. Once inducer/pytential#102 is merged this should be ready for review.

@isuruf isuruf marked this pull request as ready for review May 7, 2022 01:07
@inducer

inducer commented May 13, 2022

Copy link
Copy Markdown
Owner

Factor of 2 change fixed the tests.

Out of curiosity: where was that factor of 2?

Also, for my peace of mind: There are no functional changes here, correct?

@isuruf

isuruf commented May 13, 2022

Copy link
Copy Markdown
Collaborator Author

Out of curiosity: where was that factor of 2?

https://github.com/inducer/sumpy/pull/113/files#diff-1ba22e3d79b16504929f9dbd8675d879c2b6e19b498dbddbd29cdc49bec1797eR327

Also, for my peace of mind: There are no functional changes here, correct?

There's the factor of 2 change in rscale and the change of default for M2L translation type to FFT.

@inducer inducer left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This was hard to review because of the amount of code that's moved. But pending your confirmation that there are no functional changes and that the factor of 2 is innocuous, this LGTM. Thanks for working on this!

@inducer

inducer commented May 13, 2022

Copy link
Copy Markdown
Owner

Didn't see your response until after I submitted the review. Thanks for the summary! LGTM, in it goes.

@inducer inducer merged commit daa4118 into inducer:main May 13, 2022
@inducer

inducer commented May 13, 2022

Copy link
Copy Markdown
Owner

(And thanks for working on this!)

@isuruf isuruf deleted the m2l branch May 13, 2022 22:48
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.

Make translations objects in their own right

2 participants