Skip to content

Commit

Permalink
Merge branch 'master' into rc/linear_bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
dpanici authored Nov 14, 2023
2 parents bf54d09 + 182db38 commit 99355a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions desc/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions desc/optimize/_constraint_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 99355a2

Please sign in to comment.