@@ -72,15 +72,9 @@ SUBROUTINE setup_qed_module
7272 END DO
7373 END IF
7474
75-
76- IF (use_LBW_amp) THEN
77- sig2cdt_dV_lbw = 2.0_num * sigma_lBW_max * c * dt / dx * LBW_amp_factor
78- cdt_dV = c * dt / dx * LBW_amp_factor
79- i_LBW_amp_factor = 1.0_num / LBW_amp_factor
80- ELSE
81- sig2cdt_dV_lbw = 2.0_num * sigma_lBW_max * c * dt / dx
82- cdt_dV = c * dt / dx
83- END IF
75+ sig2cdt_dV_lbw = 2.0_num * sigma_lBW_max * c * dt / dx * LBW_amp_factor
76+ cdt_dV = c * dt / dx * LBW_amp_factor
77+ i_LBW_amp_factor = 1.0_num / LBW_amp_factor
8478
8579 END SUBROUTINE setup_qed_module
8680
@@ -1590,11 +1584,7 @@ SUBROUTINE linear_Breit_Wheeler_intra(p_list_i, ispe, ixx, &
15901584 ! Now, collide these two macro-photons.
15911585
15921586 ! Pair yield
1593- IF (use_LBW_amp) THEN
1594- Y_ij = MIN (weight_i, weight_j) * i_LBW_amp_factor
1595- ELSE
1596- Y_ij = MIN (weight_i, weight_j)
1597- END IF
1587+ Y_ij = MIN (weight_i, weight_j) * i_LBW_amp_factor
15981588
15991589 ! Pair position
16001590 lepton_pos = (current_i% part_pos + current_j% part_pos)* 0.5_num
@@ -1673,10 +1663,10 @@ SUBROUTINE linear_Breit_Wheeler_intra(p_list_i, ispe, ixx, &
16731663 IF (ASSOCIATED (next_i)) next_j = > next_i% next
16741664
16751665 ! now, annihilate photons by decreasing weight, or delete macro-photon
1676- IF (use_LBW_amp ) THEN
1666+ IF (lbw_amp_factor > 1.0_num ) THEN
16771667 ! In this case, no macro-photons are deleted
1678- current_i% weight = weight_i - Y_ij
1679- current_j% weight = weight_j - Y_ij
1668+ current_i% weight = weight_i - Y_ij
1669+ current_j% weight = weight_j - Y_ij
16801670 ELSE
16811671 ! no amplification of the cross-section.
16821672 ! In this case, need to delete the smaller macro-photon,
@@ -1699,7 +1689,7 @@ SUBROUTINE linear_Breit_Wheeler_intra(p_list_i, ispe, ixx, &
16991689 )% secondary_list(ixx), current_j)
17001690 DEALLOCATE (current_j)
17011691 END IF ! comparing weights
1702- END IF ! if use_LBW_amp
1692+ END IF ! if amplification_factor > 1.0_num
17031693
17041694 ! Now, collision of these two macro photons is done,
17051695 ! Move pointer to next particle
@@ -1840,11 +1830,7 @@ SUBROUTINE linear_Breit_Wheeler_inter(p_list_i, p_list_j, ispe, jspe, &
18401830
18411831 ! Now, collide these two macro-photons.
18421832 ! Pair yield
1843- IF (use_LBW_amp) THEN
1844- Y_ij = MIN (weight_i, weight_j) * i_LBW_amp_factor
1845- ELSE
1846- Y_ij = MIN (weight_i, weight_j)
1847- END IF
1833+ Y_ij = MIN (weight_i, weight_j) * i_LBW_amp_factor
18481834
18491835 ! Pair position
18501836 lepton_pos = (current_i% part_pos + current_j% part_pos)* 0.5_num
@@ -1924,7 +1910,7 @@ SUBROUTINE linear_Breit_Wheeler_inter(p_list_i, p_list_j, ispe, jspe, &
19241910 next_j = > current_j% next
19251911
19261912 ! now, annihilate photons by decreasing weight, or delete macro-photon
1927- IF (use_LBW_amp ) THEN
1913+ IF (lbw_amp_factor > 1.0_num ) THEN
19281914 ! In this case, no macro-photons are deleted
19291915 current_i% weight = weight_i - Y_ij
19301916 current_j% weight = weight_j - Y_ij
@@ -1950,7 +1936,7 @@ SUBROUTINE linear_Breit_Wheeler_inter(p_list_i, p_list_j, ispe, jspe, &
19501936 )% secondary_list(ixx), current_j)
19511937 DEALLOCATE (current_j)
19521938 END IF ! comparing weights
1953- END IF ! if use_LBW_amp
1939+ END IF ! if lbw_amp_factor > 1.0
19541940
19551941 ! Now, collision of these two macro photons is done,
19561942 ! Move pointer to next particle
0 commit comments