diff --git a/desc/compat.py b/desc/compat.py index 982ead88a0..7ab9fb5548 100644 --- a/desc/compat.py +++ b/desc/compat.py @@ -204,4 +204,8 @@ def rescale(eq, L=("R0", None), B=("B0", None), verbose=0): if eq.current is not None: eq.c_l *= cL * cB + # boundary & axis + eq.axis = eq.get_axis() + eq.surface = eq.get_surface_at(rho=1) + return eq diff --git a/desc/optimize/_constraint_wrappers.py b/desc/optimize/_constraint_wrappers.py index 518d262bb1..672a920f94 100644 --- a/desc/optimize/_constraint_wrappers.py +++ b/desc/optimize/_constraint_wrappers.py @@ -482,12 +482,12 @@ def build(self, eq=None, use_jit=None, verbose=1): # noqa: C901 # with this directly, so if the user wants to manually rebuild they should # do it before this wrapper is created for them. if not self._objective.built: - self._objective.build(self._eq, verbose=verbose) + self._objective.build(use_jit=use_jit, verbose=verbose) if not self._constraint.built: - self._constraint.build(self._eq, verbose=verbose) + self._constraint.build(use_jit=use_jit, verbose=verbose) for constraint in self._linear_constraints: - constraint.build(self._eq, verbose=verbose) + constraint.build(use_jit=use_jit, verbose=verbose) self._objectives = combine_args(self._objective, self._constraint) self._set_things(self._all_things)