Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/weymouth/WaterLily.jl int…
Browse files Browse the repository at this point in the history
…o pr/74
  • Loading branch information
weymouth committed Oct 13, 2023
2 parents cdb354c + adb4784 commit 9f1b1fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
AMDGPU = "^0.4.13"
CUDA = "^4.1.4"
Documenter = "0.19 - 0.28"
AMDGPU = "^0.4.13,0.6"
CUDA = "4.1.4,5"
Documenter = "0.19 - 0.28,1"
ForwardDiff = "^0.10.18"
KernelAbstractions = "^0.9.1"
Reexport = "^1.2.2"
Expand Down
1 change: 1 addition & 0 deletions src/AutoBody.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function measure(body::AutoBody,x,t)
# eval d=f(x,t), and n̂ = ∇f
d = body.sdf(x,t)
n = ForwardDiff.gradient(x->body.sdf(x,t), x)
any(isnan.(n)) && return (d,zero(x),zero(x))

# correct general implicit fnc f(x₀)=0 to be a pseudo-sdf
# f(x) = f(x₀)+d|∇f|+O(d²) ∴ d ≈ f(x)/|∇f|
Expand Down

0 comments on commit 9f1b1fe

Please sign in to comment.