desc.magnetic_fields.CurrentPotentialField.from_surface

classmethod CurrentPotentialField.from_surface(surface, potential, potential_dtheta, potential_dzeta, params=None)Source

Create CurrentPotentialField using geometry provided by given surface.

Parameters:
  • surface (FourierRZToroidalSurface, optional, default None) – Existing FourierRZToroidalSurface object to create a CurrentPotentialField with.

  • potential (callable) – function to compute the current potential. Should have a signature of the form potential(theta,zeta,**params) -> ndarray. theta,zeta are poloidal and toroidal angles on the surface

  • potential_dtheta (callable) – function to compute the theta derivative of the current potential

  • potential_dzeta (callable) – function to compute the zeta derivative of the current potential

  • params (dict, optional) – default parameters to pass to potential function (and its derivatives)