Skip to content

v0.14.2

Choose a tag to compare

@YigitElma YigitElma released this 15 May 16:14
· 437 commits to master since this release
bdb4f3d

New Features

  • Updates Equilibrium initial guess to use geometric center as the axis. This will allow non-convex cross-sections to be initialized without having to solve to achieve nested surfaces.
  • Adds new regularization options to desc.objectives.SurfaceCurrentRegularization.
  • Adds a new utility function desc.compat.contract_equilibrium which takes in an Equilibrium object and an argument inner_rho, and returns a new Equilibrium with original Equilibrium's inner_rho flux surface as its boundary.
    Optionally can also contract the profiles of the original Equilibrium so that the new Equilibrium's profiles match the original's in real space.
  • Adds second-order NAE constraints, accessible by passing order=2 to desc.objectives.get_NAE_constraints.
  • result dictionary returned by Optimizer.optimize or eq.optimize now includes sub-dictionary "Objective values" containing summary info of objective values before and after optimization, the same info that is printed to the terminal by default.
  • Adds error for incorrect grids in desc.objectives.BootstrapRedlConsistency and when computing current Redl and <J*B> Redl compute quantities
  • Allows Redl compute quantities to use SplineProfile and updates Redl bootstrap current consistency tutorial to include a SplineProfile optimization
  • Adds automatically generated header file showing date the input file was created with desc.vmec.VMECIO.write_vmec_input
  • Adds source_grid argument to desc.magnetic_fields._MagneticField.save_mgrid function to allow user to control the discretization of the magnetic field object being used to construct the mgrid output.
  • Allows x_scale to be passed to factorize_linear_constraints in Optimizer.optimize through the new "linear_constraint_options".

Performance Improvements

  • ProximalProjection uses jvp's for the derivative of the ForceBalance part instead of manually taking the matrix products. This reduces the jacobian time on CPU.
  • Improves memory management to reduce the base memory used during optimization while using lsq-exact, lsq-auglag and fmin-auglag optimizers as well as their proximal- versions.

Bug Fixes

  • Fixes issue in desc.geometry.curve.FourierPlanarCurve.from_values where the orientation of the fitted curve can be the reverse of the original curve, which can be problematic for coils (the current is not negated, so the resulting fitted coil would have field opposite of the initial).
  • Fixes bug where ObjectiveFunction was incorrectly using deriv_mode="batched" and the heuristic-set jac_chunk_size when jac_chunk_size is given to a sub-objective, where it should have instead defaulted to deriv_mode="blocked". See #1687
  • Fixes bug where ProximalProjection was using wrong jac_chunk_size internally and using more memory than one would expect given the jac_chunk_size. This fix gives separate blocked and batched methods to ProximalProjection.

New Contributors

Full Changelog: v0.14.1...v0.14.2