freegs-plasma / freegs

Free boundary Grad-Shafranov solver
http://freegs.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
91 stars 54 forks source link

Add __getitem__, coil and current setter/getter for Circuit class #79

Closed tbody-cfs closed 1 year ago

tbody-cfs commented 1 year ago

Adds a getitem method for Circuit, so that you can access coils in the same way as for Machine.

Adds setter and getter routines for coil and current in Circuit, automatically updating the constituent coils to be consistent with the Circuit (this helps particularly when printing out the Circuit)