Skip to content
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

core: Fixed ELC potential difference prefactor + test #3310

Merged
merged 1 commit into from
Nov 14, 2019
Merged

core: Fixed ELC potential difference prefactor + test #3310

merged 1 commit into from
Nov 14, 2019

Conversation

fweik
Copy link
Contributor

@fweik fweik commented Nov 14, 2019

Description of changes:

  • When using ELC/MMM2d with potential boundary conditions, one
    of the correction factors was over-counted resulting in wrong energies.

The other term in the correction in L 348 of elc.cpp also looks suspicious,
but I could not find a straight forward way to test that. All of this code should
only be used with the utmost caution.

@fweik fweik mentioned this pull request Nov 14, 2019
@codecov
Copy link

codecov bot commented Nov 14, 2019

Codecov Report

Merging #3310 into python will increase coverage by <1%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           python   #3310    +/-   ##
=======================================
+ Coverage      86%     86%   +<1%     
=======================================
  Files         536     536            
  Lines       25564   25564            
=======================================
+ Hits        21995   22000     +5     
+ Misses       3569    3564     -5
Impacted Files Coverage Δ
src/core/electrostatics_magnetostatics/mmm2d.cpp 90% <100%> (ø) ⬆️
src/core/electrostatics_magnetostatics/elc.cpp 97% <100%> (ø) ⬆️
src/core/electrostatics_magnetostatics/p3m.cpp 86% <0%> (ø) ⬆️
src/core/electrostatics_magnetostatics/coulomb.cpp 79% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef37a15...f2689d9. Read the comment docs.

Copy link
Contributor

@RudolfWeeber RudolfWeeber left a comment

Choose a reason for hiding this comment

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

Does it also work for mmm2d?

@fweik
Copy link
Contributor Author

fweik commented Nov 14, 2019

Yes, I fixed both. Now ELC has an independent test and mmm2d is checked against ELC. So for this particular situation there is a test now.

@fweik
Copy link
Contributor Author

fweik commented Nov 14, 2019

bors r=RudolfWeeber

bors bot added a commit that referenced this pull request Nov 14, 2019
3310: core: Fixed ELC potential difference prefactor + test r=RudolfWeeber a=fweik

Description of changes:
 - When using ELC/MMM2d with potential boundary conditions, one
   of the correction factors was over-counted resulting in wrong energies.
 
The other term in the correction in L 348 of elc.cpp also looks suspicious,
but I could not find a straight forward way to test that. All of this code should
only be used with the utmost caution.

Co-authored-by: Florian Weik <fweik@icp.uni-stuttgart.de>
@bors
Copy link
Contributor

bors bot commented Nov 14, 2019

Build succeeded

@bors bors bot merged commit f2689d9 into espressomd:python Nov 14, 2019
@jngrad jngrad added this to the 4.1.2 milestone Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants