-
Notifications
You must be signed in to change notification settings - Fork 183
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
Remove Observable_stat external linkage #3770
Conversation
The scalar pressure can be calculated from the pressure tensor.
Codecov Report
@@ Coverage Diff @@
## python #3770 +/- ##
======================================
Coverage 89% 89%
======================================
Files 551 551
Lines 24468 24462 -6
======================================
- Hits 21812 21807 -5
+ Misses 2656 2655 -1
Continue to review full report at Codecov.
|
Pass local variable obs_energy and obs_pressure to energy/pressure kernels as mutable references to remove external linkage.
a517a14
to
06a7421
Compare
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.
Clear improvement. I think some of the output parameters should be avoided in the cases where that is simple, see inline comments. This helps to reduce coupling.
Slot 0: particle electrostatics. Slot 1: electrostatics solver.
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.
I think you can remove some more includes so that we also have physical decoupling
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.
LGTM
Description of changes:
Observable_stat
objectsobs_scalar_pressure
global variableobs_pressure_tensor
in cythonobs_pressure_tensor
toobs_pressure
for consistency withobs_energy
obs_pressure
andobs_energy
Observable_stat.hpp
analyze.energy()
,analyze.pressure()
,analyze.pressure_tensor()
functions now only reports 2 slots for Coulomb and dipolar contributions: particles contribution and electrostatics/magnetostatics solver contribution