Skip to content

Commit

Permalink
Merge pull request #1740 from ofmla/tti_linearization_test
Browse files Browse the repository at this point in the history
tests: add tti_setup to gradientJ test
  • Loading branch information
FabioLuporini authored Sep 5, 2021
2 parents a5acfcb + 9ec8084 commit 8a53b95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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)
Expand Down

0 comments on commit 8a53b95

Please sign in to comment.