From 74c6e41ea09369ab9f4440756b78bbb324a01550 Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Thu, 16 Apr 2020 21:35:59 +0200 Subject: [PATCH] tighten interpolation bounds --- sbp/src/operators/interpolation.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbp/src/operators/interpolation.rs b/sbp/src/operators/interpolation.rs index c69d834..0b70f3b 100644 --- a/sbp/src/operators/interpolation.rs +++ b/sbp/src/operators/interpolation.rs @@ -54,21 +54,21 @@ pub(crate) fn test_interpolation_operator(op: IO, h2: let nc = 101; let (x_c, x_f) = if h2 { ( - crate::utils::h2linspace(0.0, 1.0, nc), - crate::utils::h2linspace(0.0, 1.0, 2 * (nc - 1)), + crate::utils::h2linspace(20.0, 50.0, nc), + crate::utils::h2linspace(20.0, 50.0, 2 * (nc - 1)), ) } else { ( - ndarray::Array1::linspace(0.0, 1.0, 101), - ndarray::Array1::linspace(0.0, 1.0, 2 * nc - 1), + ndarray::Array1::linspace(20.0, 50.0, 101), + ndarray::Array1::linspace(20.0, 50.0, 2 * nc - 1), ) }; let mut ix_f = ndarray::Array1::zeros(x_f.raw_dim()); op.coarse2fine(x_c.view(), ix_f.view_mut()); - approx::assert_abs_diff_eq!(ix_f, x_f, epsilon = 1e-5); + approx::assert_abs_diff_eq!(ix_f, x_f, epsilon = 1e-11); let mut ix_c = ndarray::Array1::zeros(x_c.raw_dim()); op.fine2coarse(x_f.view(), ix_c.view_mut()); - approx::assert_abs_diff_eq!(ix_c, x_c, epsilon = 1e-5); + approx::assert_abs_diff_eq!(ix_c, x_c, epsilon = 1e-11); }