From cf39a15ef701a3748bfcd5516da02f80b2a644da Mon Sep 17 00:00:00 2001 From: rockfool Date: Thu, 30 Jan 2020 17:24:37 -0500 Subject: [PATCH] fix a bug in ZernikeRadial --- openmc/polynomial.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openmc/polynomial.py b/openmc/polynomial.py index abcfd8057..6257526a5 100644 --- a/openmc/polynomial.py +++ b/openmc/polynomial.py @@ -75,7 +75,9 @@ class ZernikeRadial(Polynomial): def __call__(self, r): import openmc.lib as lib if isinstance(r, Iterable): - return [np.sum(self._norm_coef * lib.calc_zn_rad(self.order, r_i)) + return [np.sum(self._norm_coef * lib.calc_zn_rad(self.order, r_i / self.radius)) for r_i in r] else: - return np.sum(self._norm_coef * lib.calc_zn_rad(self.order, r)) + return np.sum(self._norm_coef * lib.calc_zn_rad(self.order, r / self.radius)) + +