Skip to content

Commit

Permalink
[WIP] Maxfunctionevals.
Browse files Browse the repository at this point in the history
  • Loading branch information
alucantonio committed Jul 10, 2023
1 parent c3a6f5a commit 954c26a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dctkit/math/opt/optctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def run(self, x0: npt.NDArray, **kwargs: Dict) -> npt.NDArray:
x = PETSc.Vec().createWithArray(x0)
self.tao.setSolution(x)
self.tao.setMaximumIterations(maxeval)
self.tao.setMaximumFunctionEvaluations(maxeval)
self.tao.setTolerances(gatol=gatol, grtol=grtol, gttol=gttol)
self.tao.setFromOptions() # Set options for the solver
self.tao.solve()
Expand Down

0 comments on commit 954c26a

Please sign in to comment.