DESC
DESC copied to clipboard
Add transform pre-computation for `FourierCurrentPotentialField` in Flux objectives
On master, an optimization with a FourierCurrentPotentialField
and the QuadraticFlux
objective would fail. This happens because in QuadraticFlux.compute, field.compute_magnetic_field is called. If the field needs transforms to evaluate, then these transforms will be created on the fly if they are not provided, resulting in an error.
This PR fixes that by precomputing the transform for QuadraticFlux and ToroidalFlux, for the FourierCurrentPotentialField
This bug does not occur with Coil
objects though strangely... even though they should also be making a transform when their compute function is called