Skip to content

Commit

Permalink
add QuadraticFlux obj
Browse files Browse the repository at this point in the history
- doesn't pass due to jax bug, maybe PR #1002 will fix it?
  • Loading branch information
kianorr committed Jul 4, 2024
1 parent 7ba2a73 commit 680848b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,10 @@ def test_optimize_with_all_coil_types(DummyCoilSet, DummyMixedCoilSet):

def test(c, method):
target = 11
obj = ObjectiveFunction(CoilLength(c, target=target))
obj = ObjectiveFunction(
CoilLength(c, target=target),
QuadraticFlux(eq=Equilibrium(), field=c, vacuum=True),
)
optimizer = Optimizer(method)
(c,), _ = optimizer.optimize(c, obj, maxiter=200, ftol=0, xtol=1e-15)
flattened_coils = tree_leaves(
Expand Down

0 comments on commit 680848b

Please sign in to comment.