PlasmaControl / DESC

Stellarator Equilibrium and Optimization Suite
MIT License
87 stars 22 forks source link

Allow for Pytree input for coil objective targets and bounds #1152

Open kianorr opened 1 month ago

kianorr commented 1 month ago

Input should allow for different bounds/targets for different coils. I don't think this is possible yet

dpanici commented 1 month ago
dpanici commented 1 month ago

1164 if I have a SumMagneticField with [ToroidalMagneticField, MixedCoilSet]

want to do CoilLength on this, where we target lengths in the mixed coilset differentlt

should target be like [ [], [{"length": 1}, {"length":2}]]

I think we should enforce it having the same pytree structure as the SumMagneticField, but just ignore the entries corresponding to non-coil/coilset leafs

dpanici commented 3 weeks ago

Alternatively, we could allow QuadraticFlux to take in a list of magnetic fields and it just automatically sums them, that way we can say things = (tf_field, coilset) and then have our ususal coil obj target the coilset without needing additional plumbing