mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
address comments from reviewers
This commit is contained in:
parent
5566f75fee
commit
d409e99eb0
2 changed files with 3 additions and 4 deletions
|
|
@ -106,9 +106,8 @@ class Zernike(Polynomial):
|
|||
"""
|
||||
def __init__(self, coef, radius=1):
|
||||
super().__init__(coef)
|
||||
r"""Solve order from number of coefficients
|
||||
N = (order + 1)(order + 2) / 2
|
||||
"""
|
||||
# Solve order from number of coefficients
|
||||
# N = (order + 1)(order + 2) / 2
|
||||
self._order = int((math.sqrt(8 * len(self.coef) + 1) - 3) / 2)
|
||||
self.radius = radius
|
||||
norm_vec = np.ones(len(self.coef))
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ def test_zernike():
|
|||
assert zn_azimuthal.order == 2
|
||||
assert zn_azimuthal.radius == 1
|
||||
|
||||
coeff = np.asarray([1.5, -3.6, 9.7e-1, -6.8e-1, 0.11, 0.33e2, 0.002, 13.75, \
|
||||
coeff = np.asarray([1.5, -3.6, 9.7e-1, -6.8e-1, 0.11, 0.33e2, 0.002, 13.75,
|
||||
3.1, -7.3, 7.8e-1, -1.1e-1, 2.56, 5.25e3, 0.123])
|
||||
zn_azimuthal = openmc.Zernike(coeff, 0.392)
|
||||
assert zn_azimuthal.order == 4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue