Skip to content

Commit

Permalink
examples: witch to adjoint time derivative
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Jun 14, 2021
1 parent 548b1ec commit 6f44bb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/seismic/acoustic/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ def GradientOperator(model, geometry, space_order=4, save=True,
eqn = iso_stencil(v, model, kernel, forward=False)

if kernel == 'OT2':
gradient_update = Inc(grad, - u.dt2 * v)
gradient_update = Inc(grad, - u * v.dt2)
elif kernel == 'OT4':
gradient_update = Inc(grad, - (u.dt2 + s**2 / 12.0 * u.biharmonic(m**(-2))) * v)
gradient_update = Inc(grad, - u * v.dt2 - s**2 / 12.0 * u.biharmonic(m**(-2)) * v)
# Add expression for receiver injection
receivers = rec.inject(field=v.backward, expr=rec * s**2 / m)

Expand Down
2 changes: 1 addition & 1 deletion examples/seismic/tti/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def JacobianAdjOperator(model, geometry, space_order=4,
FD_kernel = kernels[('centered', len(model.shape))]
eqn = FD_kernel(model, du, dv, space_order, forward=False)

dm_update = Inc(dm, - (u0.dt2 * du + v0.dt2 * dv))
dm_update = Inc(dm, - (u0 * du.dt2 + v0 * dv.dt2))

# Add expression for receiver injection
rec_term = rec.inject(field=du.backward, expr=rec * dt**2 / m)
Expand Down

0 comments on commit 6f44bb7

Please sign in to comment.