File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 115115
116116function check_lq_null_cotangents (Nᴴ, ΔNᴴ; gauge_atol:: Real = default_pullback_gauge_atol (ΔNᴴ))
117117 aNᴴΔN = project_antihermitian! (Nᴴ * ΔNᴴ' )
118- Δgauge = maximum (abs, aNᴴΔN; init = zero (eltype (aNᴴΔN)))
118+ Δgauge = maximum (abs, aNᴴΔN; init = abs ( zero (eltype (aNᴴΔN) )))
119119 Δgauge ≤ gauge_atol ||
120120 @warn " `lq_null` cotangent sensitive to gauge choice: (|Δgauge| = $Δgauge )"
121121 return
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ function check_and_prepare_qr_cotangents(
3939 I = uppertriangularind (ΔR₂₂)
4040 upper_inds = view (LinearIndices (ΔR), (p + 1 ): minmn, (p + 1 ): n)[I]
4141 ΔR₂₂upper = view (ΔR, upper_inds)
42- Δgauge_R = maximum (abs, ΔR₂₂upper; init = zero (eltype (ΔR₂₂upper )))
42+ Δgauge_R = maximum (abs, ΔR₂₂upper; init = abs ( zero (eltype (ΔR) )))
4343 Δgauge_R = max (Δgauge_R, maximum (abs, view (ΔR₂₂, diagind (ΔR₂₂)); init = zero (Δgauge_R)))
4444 Δgauge = max (Δgauge, Δgauge_R)
4545 end
121121
122122function check_qr_null_cotangents (N, ΔN; gauge_atol:: Real = default_pullback_gauge_atol (ΔN))
123123 aNᴴΔN = project_antihermitian! (N' * ΔN)
124- Δgauge = maximum (abs, aNᴴΔN; init = zero (eltype (aNᴴΔN)))
124+ Δgauge = maximum (abs, aNᴴΔN; init = abs ( zero (eltype (aNᴴΔN) )))
125125 Δgauge ≤ gauge_atol ||
126126 @warn " `qr_null` cotangent sensitive to gauge choice: (|Δgauge| = $Δgauge )"
127127 return
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ function check_and_prepare_svd_cotangents(
9090 if ! iszerotangent (ΔSmat)
9191 ΔS = diagview (ΔSmat)
9292 length (indS) == length (ΔS) || throw (DimensionMismatch (lazy " length of selected S values ($(length(indS))) does not match length of ΔS ($(length(ΔS)))" ))
93- diagview (view (hUᴴΔAV₁₀, ind₀, :)) .+ = real .(view (ΔS, J)) # the diagonal entries
93+ diagview (view (hUᴴΔAV₁₀, ind₀, :)) .+ = real .(view (ΔS, J₁ )) # the diagonal entries
9494 Δgauge = max (Δgauge, maximum (abs, view (ΔS, J₂); init = zero (Δgauge)))
9595 end
9696
You can’t perform that action at this time.
0 commit comments