-
Notifications
You must be signed in to change notification settings - Fork 187
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
Always define q #2266
Always define q #2266
Conversation
The aim is to avoid undefined access to q when ELECTROSTATICS is not defined.
This probably means that a lot of |
src/core/particle_data.cpp
Outdated
@@ -598,6 +598,10 @@ int set_particle_q(int part, double q) { | |||
mpi_send_q(pnode, part, q); | |||
return ES_OK; | |||
} | |||
#ifndef ELECTROSTATICS | |||
const constexpr double ParticleProperties::q; |
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.
you can drop the const here
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.
No, const
is needed in C++11, constexpr
only implies const
in C++14 an newer.
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.
Should I hunt down the |
@pdebuyl that would be helpful. There is at least one for which the performance impact needs to be checked (the one in the pair force calculation). |
next week :-) |
Codecov Report
@@ Coverage Diff @@
## python #2266 +/- ##
======================================
Coverage 71% 71%
======================================
Files 377 377
Lines 18941 18941
======================================
Hits 13580 13580
Misses 5361 5361
Continue to review full report at Codecov.
|
Always define q
Fixes #2248 (tentative)
Description of changes:
q
as a particle propertpyI file the PR now to get an idea of the CI result, as I could only test a limited number of configurations.
PR Checklist