chan-y-park / loom

Python program to generate, draw, and analyze spectral networks of class S theories
10 stars 3 forks source link

Numerics of odeint #39

Open plonghi opened 8 years ago

plonghi commented 8 years ago

Evolution of S-walls is handled by numerical integration of a differential equation. The equation determines z(t), x_i(t) , x_j(t) , M(t) where x_i, x_j are sheets in the first fundamental representation (ffr) cover.

In at least one example, the E_6 pure SYM, the values of x_i, x_j along certain primary walls differ significantly from the actual values of x_i(t), x_j(t) determined by solving the spectral curve equation at z(t). Near the branch point where they are seeded, there is no noticeable difference, but far away along the trajectory there is a very noticeable difference, and x_i, x_j cannot be matched onto any of the actual sheets.

This is quite important, because it affects the assignment of roots to S-walls. Because to assign a root unambiguously, we pick a point on the S-wall, that is far away from branch points, there we match x_i, x_j with two of the actual sheets, which are matched onto weights v_i, v_j by the trivialization. The root is the assigned to be v_j -v_i. The advantage of staying far from branch points is that sheets are well enough separated to get a clear distinction between them, hence an unambiguous root assignment.

One quick fix was to curb the step of the ode: instead of size_of_large_step I replaced it with: size_of_large_step * min([1.0, abs(y_i[1] - y_i[2])]) where y_i[1] = x_i and y_i[2] = x_j in the above notation.

For maximal precision, we should not determinbe x_i, x_j by the differential equation. Instead, we should compute them along the wall by solving the spectral curve equation at z(t) at each step. This is what's done, for example, in the trivialization module in the function 'get_sheets_along_path' we really call 'self.ffr_curve.get_xs(z)' at each step of a path along which sheets need to be tracked. However, the downside of this is that S-wall growth would probably become too slow. Is there a way to get better precision for x_i, x_j with odeint?

Also, we should implement some automatic check on x_i, x_j after S-walls have been evolved, this is a basic check that numerical evolution isn't fooling us. For example, check that the last point of the S-wall has reasonably good values of x_i and x_j as compared to what the trivialization module says (i.e. the output of 'ffr_curve.get_xs(z)').

plonghi commented 8 years ago

Implemented an automatic check on growth of S-walls. Now loom checks if the root type of the S-wall, which is determined from the sheets [x_i(t), x_j(t)] at a certain t along the wall, is compatible with the root type of its parents (joint or branch point). When this is not the case, it will prompt a warning, and automatically re-grow the wall after switching to manual growth. The manual algorithm computes the sheets directly from the SW curve at each step along the trajectory.

Leaving issue open for now, until further testing testing confirms it is solved in all examples.

NOTE: One improvement would be to implement a more stringent test, e.g. comparing actual sheets to the S-wall's x[t] at the end of the wall.