Skip to content

Commit

Permalink
Merge pull request #2069 from CliMA/ck/func_barrier
Browse files Browse the repository at this point in the history
Add function barrier to `diffuse_surface_elevation!`
  • Loading branch information
charleskawczynski authored Nov 1, 2024
2 parents 3e95814 + 0678362 commit 9a05ed2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Hypsography/Hypsography.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,15 @@ function diffuse_surface_elevation!(
ghost_buffer = (bf = Spaces.create_dss_buffer(f_z),)
# Apply smoothing
χf = @. wdiv(grad(f_z))
_diffuse_surface_elevation!(f, κ, maxiter, dt, χf, f_z, ghost_buffer)
return f
end

function _diffuse_surface_elevation!(f, κ, maxiter, dt, χf, f_z, ghost_buffer)
# Define required ops
wdiv = Operators.WeakDivergence()
grad = Operators.Gradient()
# Apply smoothing
for iter in 1:maxiter
# Euler steps
if iter 1
Expand Down

0 comments on commit 9a05ed2

Please sign in to comment.