-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Being able to target specific dofs is sometimes useful during optimization. This allows for only optimizing for current, only optimizing for coil shapes, or only optimizing specific coil shapes. Here is an example of how this is done in simsopt:
if current_opt == True: # only target current
# fix all geometric dofs
for c in coils_opt:
c.curve.fix_all()
.
.
.
# unfix all geometric dofs
for c in coils_opt:
c.unfix_all()
if ellipse_only == True: # only let specific dofs optimize
for c in bs_opt.coils:
c.curve.fix_all()
# allow coil to slide on z -axis
c.curve.unfix(f'zc(0)')
# allow coil to make an ellipse in the xy plane
c.curve.unfix(f'xc(1)')
c.curve.unfix(f'ys(1)')
# allow coil to bend in z plane
c.curve.unfix(f'zc(2)')
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request