Feature/complex range isgl - #33
Merged
Merged
Conversation
Implements V(r) = v0*r^p analytically, avoiding both numerical integration (quadgk) and range-interpolation for this potential class. Vtilde_n(alpha) = Gamma(n+(3+p)/2)/Gamma(n+3/2) * alpha^(-p/2), so the alpha-dependence is a single power, identical for every n. It therefore factors out of the upon-the-shoulder solve, which is hoisted out of the alpha-loop into w_pow_arr[c,iv,Lsum,n] and applied in element_VPow via etaprc^(-p/2). Complex scaling enters as a single global factor csmfac^(-p). S_arr, imax and mij_arr are unchanged: only the radial shape differs, not the angular structure. - common/potentialtypes.jl: PowerLawPotential (errors for p <= -3) - size_estimate.jl: pow_indices / powopt_arr - preallocate.jl: w_pow_arr - interpolationNshoulder.jl: analytic shoulder weights; precompute_varr! method - fillTVS.jl: element_VPow + dispatch in vab - test/testISGL.jl: section 11
- v_pow moved from precompute_w into preallocate_data / InterpolationStruct, so all allocations stay in the preallocation step. - The shoulder weights are now formed as w = Ainv*v_pow, reusing the Ainv that is already computed for Ainv_arr_kine, instead of A_mat_curr\v_pow. This removes the per-(Lsum,c,iv) allocation of the backslash-solve and matches the way the kinetic-energy coefficients are built.
This was referenced Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New features: