Skip to content

Commit

Permalink
MPI: Add boilerplate phase grid checks
Browse files Browse the repository at this point in the history
The normal phase grid checks don't work for a PencilArray, so disable
them for now by adding an implementation that gives a warning and
returns 0.

Related: #38
  • Loading branch information
musoke committed Mar 16, 2021
1 parent 755ab8c commit fe339a8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/pencil_grids.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,21 @@ function dist_array(length, resol::Integer)

(x.^2 .+ y.^2 .+ z.^2).^0.5
end

"""
phase_diff(field::PencilArray, dir)
Compute point-to-point difference of phase on a grid along a direction
Returns an array of size `(size(field)[1], size(field)[2], size(field)[2])`
containing gradients in direction `dir`.
"""
function phase_diff(field::PencilArray, dir)
@warn "phase diff unimplemented for PencilArrays"
0
# out = similar(field, Real)

# out .= angle.(circshift(field, dir) ./ field)

# out
end

0 comments on commit fe339a8

Please sign in to comment.