aboutsummaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test.py b/test.py
index 5af80bc..f6e7b51 100755
--- a/test.py
+++ b/test.py
@@ -40,7 +40,7 @@ for amplitude, err_row in zip(amplitudes, err_coeffs):
for coeff, err_ref in zip(coeffs, err_row):
sys.stderr.write('coeffs: %dx%d ' % (coeff, coeff))
- BD = brill_data.BrillData(nb_coeffs_rho = coeff, amplitude = amplitude)
+ BD = brill_data.BrillData(nb_coeffs = [coeff, coeff], amplitude = amplitude)
error = np.max(np.abs(eval_residual_coeffs(BD, x, z)))
sys.stderr.write('calculated error %g, reference %g\n' % (error, err_ref))
@@ -73,7 +73,7 @@ def eval_residual_fd(bd, x, y, z):
points = [ 100, 500, 1000 ]
err_fd = [ 1e-2, 5e-4, 1e-4 ]
sys.stderr.write('Testing convergence of the residual calculated by finite difference derivatives\n')
-BD = brill_data.BrillData(nb_coeffs_rho = 50, amplitude = 5)
+BD = brill_data.BrillData(nb_coeffs = [50, 50], amplitude = 5)
for point, err_ref in zip(points, err_fd):
x = np.linspace(-1, 1, point)
y = np.linspace(-3 * (x[1] - x[0]), 3 * (x[1] - x[0]), 7)
@@ -97,7 +97,7 @@ err_metric = [
[ 5e-4, 5e-5, 5e-4, 1e-4, 1e-4 ], # component 22
]
-BD = brill_data.BrillData(nb_coeffs_rho = 40, amplitude = 3)
+BD = brill_data.BrillData(nb_coeffs = [40, 40], amplitude = 3)
for c, err_row in zip(xrange(3), err_metric):
sys.stderr.write('component %d%d\n' % (c, c))