From f1f215bdbb6c1fb0fee53b78878ab565cd8f335e Mon Sep 17 00:00:00 2001 From: cpf Date: Wed, 25 May 2022 16:39:42 +0200 Subject: [PATCH] change theta to cos_theta in regression test --- tests/regression_tests/source/test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/regression_tests/source/test.py b/tests/regression_tests/source/test.py index 31debde474..e6a5bcf702 100644 --- a/tests/regression_tests/source/test.py +++ b/tests/regression_tests/source/test.py @@ -1,4 +1,4 @@ -from math import pi +from math import pi, cos import numpy as np import openmc @@ -32,19 +32,19 @@ class SourceTestHarness(PyAPITestHarness): r_dist = openmc.stats.Uniform(2., 3.) r_dist1 = openmc.stats.PowerLaw(2., 3., 1.) r_dist2 = openmc.stats.PowerLaw(2., 3., 2.) - theta_dist = openmc.stats.Discrete([pi/4, pi/2, 3*pi/4], - [0.3, 0.4, 0.3]) + cos_theta_dist = openmc.stats.Discrete([cos(pi/4), 0.0, cos(3*pi/4)], + [0.3, 0.4, 0.3]) phi_dist = openmc.stats.Uniform(0.0, 2*pi) spatial1 = openmc.stats.CartesianIndependent(x_dist, y_dist, z_dist) spatial2 = openmc.stats.Box([-4., -4., -4.], [4., 4., 4.]) spatial3 = openmc.stats.Point([1.2, -2.3, 0.781]) - spatial4 = openmc.stats.SphericalIndependent(r_dist, theta_dist, + spatial4 = openmc.stats.SphericalIndependent(r_dist, cos_theta_dist, phi_dist, origin=(1., 1., 0.)) spatial5 = openmc.stats.CylindricalIndependent(r_dist, phi_dist, z_dist, origin=(1., 1., 0.)) - spatial6 = openmc.stats.SphericalIndependent(r_dist2, theta_dist, + spatial6 = openmc.stats.SphericalIndependent(r_dist2, cos_theta_dist, phi_dist, origin=(1., 1., 0.)) spatial7 = openmc.stats.CylindricalIndependent(r_dist1, phi_dist,