New algorithm for duals in GS.Bands
#259
Merged
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.
Closes #257
The Green Bands solver (integrator over simplices of bands) needs to establish dual numbers for phase ϕ = k*r on simplex vertices. If a vertex is ϕ-degenerate and
r != 0
, the integration algorithm needs to have finite duals at a number of places, e.g. at α-coefficients which involve inverses of vandermonde determinants. There are many ways to choose the value of duals. Originally we chose them randomly (equivalent to doing a Taylor expansion around infinitesimal random simplex distortions). This led to problems of nondeterministic numeric noise. In #238 we introduced a better algorithm that would choose the duals in a deterministic way, so that the vandermonde determinants are never zero. However, the algorithm was not very elegant, as it was likely to fail for simplex dimension greater than three (damn obsession of generality!). We also missed an important edge case that caused #257: even if the vandermonde determinant is nonzero, there is also the Λ-coefficients in the integrator formula, which involve a different type of inverse (1/t^j_l
) that could be zero with the duals of the #238 algorithm.In this PR we choose duals dϕ so that
t_n = (dϕ_0-dϕ_n)/(ϵ_0-ϵ_n)
maximizesM=t_1 * t_2 * t_3*...*(t_1-t_2)*(t_1-t_3)*...*(t_{D-1}-t_D)
. This is a modified vandermonde determinant where powers go from 1 to D instead of 0 to D-1 (thanks Adrian Prada for the key clue!). It includes all the factors that are inverted in the integration algorithm. Using this fact, we numerically solved the maximization problem, and found an approximate but very accurate solution fort_n = (-1)^n\sqrt(0.5*(1+n^2))
that is very fast to compute and works up to at least D = 7 (didn't care to check further, as the numerical problem becomes very hard).The black curve is the approximate solution, the colored curves are the numerical solutions for D = 2 to 7, normalized to
t_1