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

Bug in OML-current for kappa=3 and alpha=0. #35

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

diakodarian
Copy link
Collaborator

@diakodarian diakodarian commented Aug 29, 2021

Tasks

  1. Proper handling of invalid kappa and alpha values in OML-current calculations.
  2. Add tests covering invalid values for various input parameters.

Closes #34

@diakodarian diakodarian changed the title Initial work on fixing bug in OML-current for kappa=3 and alpha=0. Bug in OML-current for kappa=3 and alpha=0. Aug 29, 2021
@diakodarian diakodarian added the bug Something isn't working label Aug 29, 2021
@diakodarian diakodarian self-assigned this Aug 29, 2021
@diakodarian diakodarian marked this pull request as ready for review September 26, 2021 13:44
@sigvaldm
Copy link
Member

The code quality is good, but why the stronger condition on kappa when alpha is non-zero? I don't see any such clause in the paper, and the following seems to work on the master branch (though I haven't checked that the numbers actually makes sense):

In [8]: OML_current(Sphere(r=1e-3), Electron(kappa=1.5001, alpha=0.2), eta=10)
Out[8]: -8.76673817729523e-06

In [9]: OML_current(Sphere(r=1e-3), Electron(kappa=1.5001, alpha=0), eta=10)
Out[9]: -8.764108453694125e-06

One of the tests on finite_radius_current have also started failing because it gets thrown a ValueError, but that can be dealt with afterwards. (I support your usage of ValueError).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kappa = 2 or 3 fails
2 participants