DESC icon indicating copy to clipboard operation
DESC copied to clipboard

Add transform pre-computation for `FourierCurrentPotentialField` in Flux objectives

Open dpanici opened this issue 10 months ago • 4 comments

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

dpanici avatar Apr 19 '24 17:04 dpanici