desc.grid.find_least_rational_surfaces

class desc.grid.find_least_rational_surfaces(iota, n, nrational=100, atol=1e-14, itol=1e-14, eps=1e-12, **kwargs)Source

Find “least rational” surfaces for given iota profile.

By least rational we mean points farthest in iota from the nrational lowest order rational surfaces and each other.

Note: May not work as expected for non-monotonic profiles with duplicate rational surfaces. (generally only 1 of each rational is found)

Parameters:
  • iota (Profile) – iota profile to search

  • n (integer) – number of approximately irrational surfaces to find

  • nrational (int, optional) – number of lowest order rational surfaces to avoid.

  • atol (float, optional) – Stopping tolerance for minimization

  • itol (float, optional) – tolerance for rounding float to nearest int

  • eps (float, optional) – amount to displace points to avoid duplicates

Returns:

  • rho (ndarray) – locations of least rational surfaces

  • io (ndarray) – values of iota at least rational surfaces

  • rho_rat (ndarray) – rho values of lowest order rational surfaces

  • io_rat (ndarray) – iota values at lowest order rational surfaces