Skip to content

Commit

Permalink
sun radius dA fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
palumbom committed Nov 29, 2024
1 parent 4a5b01a commit b052c9c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 203 deletions.
201 changes: 0 additions & 201 deletions scripts/debug_gpu.jl

This file was deleted.

1 change: 1 addition & 0 deletions scripts/debug_gpu_eclipse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ plt.imshow(wsp.dA .- Array(gpu_allocs.dA))
plt.title("dA")
plt.colorbar()
plt.savefig("gpu_test.png")
plt.show()
plt.clf()
#z_rot & dA
3 changes: 2 additions & 1 deletion src/eclipse_comp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ function eclipse_compute_quantities!(disk::DiskParamsEclipse{T}, epoch::T, t::In
# calculate area element of tile
= step(ϕe_sub)
= step(θe_sub)
dA_sub = map(x -> calc_dA(sun_radius, getindex(x,1), dϕ, dθ), subgrid)
dA_sub = map(x -> calc_dA(1.0, getindex(x,1), dϕ, dθ), subgrid)

# get total projected, visible area of larger tile
dA_total_proj = dA_sub .* mu_grid
dA_total_proj_matrix[i,j] = dA_total_proj
Expand Down
2 changes: 1 addition & 1 deletion src/gpu/gpu_precomps_eclipse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function calc_eclipse_quantities_gpu!(wavelength, μs, z_rot, ax_codes,
z_rot_sub += (v_orbit_sub / c_ms)

# get projected area element
dA_sub = calc_dA_gpu(sun_radius, ϕc_sub, dϕ, dθ)
dA_sub = calc_dA_gpu(1.0, ϕc_sub, dϕ, dθ)
dA_sub *= μ_sub
dA_sum += dA_sub

Expand Down

0 comments on commit b052c9c

Please sign in to comment.