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

added deactivation method for dipolar p3m #2351

Merged
merged 1 commit into from
Oct 29, 2018

Conversation

KonradBreitsprecher
Copy link
Contributor

Fixes #1937

Description of changes:

  • Added deactivation method for dipolar p3m
  • dp3m_set_prefactor() was unused, renamed to dp3m_deactivate()

Tested with the following snippet, which now forgets the tune-parameters:

dp3m = magnetostatics.DipolarP3M(prefactor=2, accuracy=1E-6, epsilon="metallic")
s.actors.add(dp3m)
s.integrator.run(0)
s.actors.remove(dp3m)
dp3m = magnetostatics.DipolarP3M(prefactor=2, accuracy=1E-6, epsilon="metallic")
s.actors.add(dp3m)

@codecov
Copy link

codecov bot commented Oct 29, 2018

Codecov Report

Merging #2351 into python will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           python   #2351   +/-   ##
======================================
  Coverage      71%     71%           
======================================
  Files         381     381           
  Lines       18905   18905           
======================================
  Hits        13587   13587           
  Misses       5318    5318
Impacted Files Coverage Δ
...core/electrostatics_magnetostatics/p3m-dipolar.hpp 100% <ø> (ø) ⬆️

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 a0fdfc6...6c824ea. Read the comment docs.

@@ -183,6 +183,10 @@ IF DP3M == 1:

self._set_params_in_es_core()
mpi_bcast_coulomb_params()

def _deactivate_method(self):
dp3m_deactivate()
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check that you don't have to call mpi_bcast_coulomb_params() afterwards.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's already in the base call of _deactivate_method afterwards.

@fweik fweik merged commit 22d2ad9 into espressomd:python Oct 29, 2018
@KonradBreitsprecher KonradBreitsprecher deleted the readd_dipolar_p3m branch October 29, 2018 22:40
RudolfWeeber pushed a commit to RudolfWeeber/espresso that referenced this pull request Oct 30, 2018
…olar_p3m

added deactivation method for dipolar p3m
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.

None yet

2 participants