The optimization tool takes advantage of the adjoint method for obtaining the shape gradient of MHD equilibria [1]}, [2]}. The relevant adjoint equation requires the solution of a VMEC equilibrium with the addition of a perturbation to the pressure profile, toroidal current profile, or an anisotropic pressure tensor. In the case of the addition of a pressure tensor, the ANIMEC [3]} code is used to evaluate the adjoint equilibrium. The resulting shape gradient, \(\mathcal {G}\) , of a given objective function \(f\) , is defined through,
\(\delta f(S_P;\delta \textbf {x}) = \int _{S_P} d^2 x \, \delta \textbf {x} \cdot \hat{\textbf {n}} \mathcal {G}.\) 
