Skip to content

Commit

Permalink
TAO interface (#143)
Browse files Browse the repository at this point in the history
* TAO interface
* Firedrake tests
* OverloadedType / PETSc Vec conversion interface (ported from tlm_adjoint)
* Remove use of _ad_convert_type when defining bounds
* Apply scalar bounds using PETScVecInterface
* Use OptionsManager class from Firedrake, with very minor edits to remove Firedrake specifics

Co-authored-by: Daiane Iglesia Dolci <63597005+Ig-dolci@users.noreply.github.com>
  • Loading branch information
jrmaddison and Ig-dolci authored Oct 3, 2024
1 parent 19f8718 commit b9574fb
Show file tree
Hide file tree
Showing 5 changed files with 810 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyadjoint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
from .optimization.optimization_problem import MinimizationProblem
from .optimization.ipopt_solver import IPOPTSolver
from .optimization.rol_solver import ROLSolver
from .optimization.tao_solver import TAOSolver
from .optimization.constraints import InequalityConstraint, EqualityConstraint
from .optimization.moola_problem import MoolaOptimizationProblem
6 changes: 6 additions & 0 deletions pyadjoint/adjfloat.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ def _ad_str(self):
"""Return the string of the taped value of this variable."""
return str(self.block_variable.saved_output)

def _ad_to_petsc(self, vec=None):
raise NotImplementedError("_ad_to_petsc not implemented for AdjFloat.")

def _ad_from_petsc(self, vec):
raise NotImplementedError("_ad_from_petsc not implemented for AdjFloat.")


_exp = math.exp
_log = math.log
Expand Down
Loading

0 comments on commit b9574fb

Please sign in to comment.