Skip to content

Commit

Permalink
remove res0 parameter, output is numerically identical for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Korbinian Eckstein committed Mar 19, 2024
1 parent d523c5d commit 3ce6a16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/oblique_stencil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ function dipole(x, y, z, r_treshold, direction=(0, 0, 1))
return kappa
end

function stencil(; st=27, res=(1.0, 1.0, 1.0), res0=1.0, singularity_cutout=4, direction=(0, 0, 1), gridsize=(64, 64, 64))
function stencil(; st=27, res=(1.0, 1.0, 1.0), singularity_cutout=4, direction=(0, 0, 1), gridsize=(64, 64, 64))
middle = floor.(Int, gridsize ./ 2) .+ 1

coord = [((1:gridsize[i]) .- middle[i]) * res0 for i in 1:3]
coord = [((1:gridsize[i]) .- middle[i]) for i in 1:3]

d = [dipole(x, y, z, singularity_cutout * res0, direction) for x in coord[1], y in coord[2], z in coord[3]]
d = [dipole(x, y, z, singularity_cutout, direction) for x in coord[1], y in coord[2], z in coord[3]]
d_mask = isfinite.(d)

# stencil mask
Expand Down

0 comments on commit 3ce6a16

Please sign in to comment.