Skip to content

Commit

Permalink
Merge pull request #82 from slimgroup/vtifix
Browse files Browse the repository at this point in the history
Fix VTI FD
  • Loading branch information
mloubout authored Jan 17, 2022
2 parents cc76e95 + 924c2a8 commit 4675593
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JUDI"
uuid = "f3b833dc-6b2e-5b9c-b940-873ed6319979"
authors = ["Philipp Witte, Mathias Louboutin"]
version = "2.6.2"
version = "2.6.3"

This comment has been minimized.

Copy link
@mloubout

mloubout Jan 17, 2022

Author Member

[deps]
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
Expand Down
10 changes: 7 additions & 3 deletions src/pysource/FD_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ def divs(func, so_fact=1, side=-1):
GrDivergenceadient shifted by half a grid point, only to be used in combination
with grads.
"""
so = func.space_order // so_fact
return sum([getattr(func[i], 'd%s' % d.name)(x0=d + side * d.spacing/2, fd_order=so)
for i, d in enumerate(func.space_dimensions)])
res = 0
zfd = lambda *ar, **kw: 0
for i, d in enumerate(func.space_dimensions):
so = getattr(func[i], 'space_order', 0) // so_fact
res += getattr(func[i], 'd%s' % d.name, zfd)(x0=d+side*d.spacing/2, fd_order=so)

return res


def laplacian(v, irho):
Expand Down
2 changes: 1 addition & 1 deletion test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function setup_model(tti=false, nlayer=2; n=(301, 151), d=(10., 10.))
println("TTI Model")
epsilon = smooth((v0[:, :] .- 1.5f0)/12f0, 3)
delta = smooth((v0[:, :] .- 1.5f0)/14f0, 3)
theta = smooth((v0[:, :] .- 1.5f0)/4, 3)
theta = smooth((v0[:, :] .- 1.5f0)/4, 3) .* rand([0, 1]) # makes sure VTI is tested
model0 = Model(n, d, o, m0; epsilon=epsilon, delta=delta, theta=theta)
model = Model(n, d, o, m; epsilon=epsilon, delta=delta, theta=theta)
else
Expand Down

1 comment on commit 4675593

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/52629

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.6.3 -m "<description of version>" 4675593bc4183a5a2ce34de73df75b4f946e6edb
git push origin v2.6.3

Please sign in to comment.