-
Notifications
You must be signed in to change notification settings - Fork 434
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
Refactor libmints::IntegralFactory.electric_field()
to return ElectricFieldInt
#2795
base: master
Are you sure you want to change the base?
Conversation
Isn't the purpose of the integral factory that one does not return the ptr to the specific integral class? Do we want to change the other integral types in the factory, too? |
I was just following a suggestion by @JonathonMisiewicz documented in #2793. Happy to close if required :) |
The point of the integral factory is that we don't need to pass the same arguments, over and over. Returning a pointer to the base class rather than the derived class gets us nothing. C++ will cast to the base class when necessary. While I support changing the other integral types as well, I won't insist on it for this PR. |
If so shall we push forward for this small change to avoid conflicts with #2775 that would occur if we changed everything to not return base class? |
Fine by me. |
@JonathonMisiewicz have we had any additional thoughts here? #2775 is probably a blocker |
No. I agree that getting #2775 in first is best. |
After fixing merge conflicts, then per discussion on #2775, there are other methods that need their return types adjusted. |
Description
Refactor
electric_field()
to return ElectricFieldInt rather than OneBodyAOIntFixes #2793
User API & Changelog headlines
IntegralFactory.electric_field()
libmintshelper
made to stop immediatestatic cast
Dev notes & details
IntegralFactory.electric_field()
libmintshelper
Checklist
Status