Skip to content

Commit

Permalink
Fix bookkeeping bug introduced about 1.5 years ago.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSagan committed Oct 5, 2023
1 parent 4ff46b7 commit 95a0eed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tao/code/tao_spin_polarization_calc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ subroutine tao_spin_polarization_calc (branch, tao_branch, excite_zero, ignore_k
if (branch%param%geometry == closed$) then
tao_branch%spin%tune = 2.0_rp * atan2(norm2(q_1turn%spin_q(1:3,0)), q_1turn%spin_q(0,0))
n0 = 0
s_vec = [0.0_rp, 0.0_rp, 1.0_rp]
dn_dpz = 0
partial = 0
partial2 = 0

else
n0 = branch%lat%particle_start%spin
s_vec = [0.0_rp, 0.0_rp, 1.0_rp]
dn_dpz = branch%ele(0)%value(spin_dn_dpz_x$:spin_dn_dpz_z$)
partial = 0 ! Not sure this is computable.
partial2 = 0
Expand All @@ -110,6 +111,7 @@ subroutine tao_spin_polarization_calc (branch, tao_branch, excite_zero, ignore_k
old_n0 = n0
old_partial = partial
old_partial2 = partial2
old_s_vec = s_vec

ele => branch%ele(ie)

Expand Down

0 comments on commit 95a0eed

Please sign in to comment.