From 9ec8084f085856af85a60ab4d1319c947917004a Mon Sep 17 00:00:00 2001 From: ofmla Date: Thu, 26 Aug 2021 15:02:44 -0300 Subject: [PATCH] tests: add tti_setup to gradientJ test --- tests/test_gradient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_gradient.py b/tests/test_gradient.py index 789f6f1152..6f100c4b98 100644 --- a/tests/test_gradient.py +++ b/tests/test_gradient.py @@ -242,6 +242,7 @@ def initializer(data): ('OT2', (70, 80), (15., 15.), setup, 2), ('sls', (70, 80), (20., 20.), viscoacoustic_setup, 2), ('sls', (70, 80), (20., 20.), viscoacoustic_setup, 1), + ('centered', (70, 80), (15., 15.), tti_setup, 2), ]) @pytest.mark.parametrize('space_order', [4]) @pytest.mark.parametrize('dtype', [np.float32, np.float64]) @@ -268,7 +269,7 @@ def test_gradientJ(self, dtype, space_order, kernel, shape, spacing, time_order, rec = wave.forward(vp=v0, save=False)[0] # Gradient: J dm - Jdm, _, _, _ = wave.jacobian(dm, vp=v0) + Jdm = wave.jacobian(dm, vp=v0)[0] # FWI Gradient test H = [0.5, 0.25, .125, 0.0625, 0.0312, 0.015625, 0.0078125] error1 = np.zeros(7)