From 40931262e924688e5455b88d894058ec9a5e25d0 Mon Sep 17 00:00:00 2001 From: daniel-dudt Date: Sat, 11 Nov 2023 15:20:55 -0700 Subject: [PATCH 1/2] hot fix for rescale --- desc/compat.py | 4 ++++ 1 file changed, 4 insertions(+) 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 From 396270d50fbeaa9a99982e8c77fa9fadeb59e1de Mon Sep 17 00:00:00 2001 From: pkim1818 Date: Mon, 13 Nov 2023 20:36:11 -0800 Subject: [PATCH 2/2] fixing build call in proximal objective. no longer uses eq as a parameter, and replaces with use_jit. --- desc/optimize/_constraint_wrappers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)