  A method is demonstrated to optimize a stellarator's geometry to eliminate
magnetic islands and achieve other desired physics properties at the same time.
For many physics quantities that have been used in stellarator optimization,
including quasisymmetry, neoclassical transport, and magnetohydrodynamic
stability, it is convenient to use a magnetic equilibrium representation that
assures the existence of magnetic surfaces. However, this representation hides
the possible presence of magnetic islands, which are typically undesirable. To
include both surface-based objectives and island widths in a single
optimization, two fixed-boundary equilibrium calculations are run at each
iteration of the optimization: one that enforces the existence of magnetic
surfaces (VMEC [S. P. Hirshman and J. C. Whitson, Phys. Fluids 26, 3553
(1983)]), and one that does not (SPEC [S. R. Hudson, et al, Phys. Plasmas 19,
112502 (2012)]). By penalizing the island residues in the objective function,
the two magnetic field representations are brought into agreement during the
optimization. An example is presented in which, particularly on the surface
where quasisymmetry was targeted, quasisymmetry is achieved more accurately
than in previously published examples.
