You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using the smooth!() function defined in utils.jl to smooth the initial ice thickness of all the glaciers following what it seems to be one step in a diffusivity equation solver.
"""
smooth!(A)
Smooth data contained in a matrix with one time step (CFL) of diffusion.
"""
@views function smooth!(A)
A[2:end-1,2:end-1] .= A[2:end-1,2:end-1] .+ 1.0f0./4.1f0.*(diff(diff(A[:,2:end-1], dims=1), dims=1) .+ diff(diff(A[2:end-1,:], dims=2), dims=2))
A[1,:]=A[2,:]; A[end,:]=A[end-1,:]; A[:,1]=A[:,2]; A[:,end]=A[:,end-1]
return
end
function smooth(A)
A_smooth = A[2:end-1,2:end-1] .+ 1.0f0./4.1f0.*(diff(diff(A[:,2:end-1], dims=1), dims=1) .+ diff(diff(A[2:end-1,:], dims=2), dims=2))
@tullio A_smooth_pad[i,j] := A_smooth[pad(i-1,1,1),pad(j-1,1,1)] # Fill borders
return A_smooth_pad
end
This is currently just been used in get_initial_geometries(), which in principle shouldn't have effects in the UDE behavior. However, this could induce instabilities and it is not clear this transformation is mathematically correct.
The text was updated successfully, but these errors were encountered:
We are using the
smooth!()
function defined inutils.jl
to smooth the initial ice thickness of all the glaciers following what it seems to be one step in a diffusivity equation solver.This is currently just been used in
get_initial_geometries()
, which in principle shouldn't have effects in the UDE behavior. However, this could induce instabilities and it is not clear this transformation is mathematically correct.The text was updated successfully, but these errors were encountered: