Skip to content

Commit b9574fb

Browse files
jrmaddisonIg-dolci
andauthored
TAO interface (#143)
* 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>
1 parent 19f8718 commit b9574fb

File tree

5 files changed

+810
-2
lines changed

5 files changed

+810
-2
lines changed

pyadjoint/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
from .optimization.optimization_problem import MinimizationProblem
2222
from .optimization.ipopt_solver import IPOPTSolver
2323
from .optimization.rol_solver import ROLSolver
24+
from .optimization.tao_solver import TAOSolver
2425
from .optimization.constraints import InequalityConstraint, EqualityConstraint
2526
from .optimization.moola_problem import MoolaOptimizationProblem

pyadjoint/adjfloat.py

+6
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ def _ad_str(self):
130130
"""Return the string of the taped value of this variable."""
131131
return str(self.block_variable.saved_output)
132132

133+
def _ad_to_petsc(self, vec=None):
134+
raise NotImplementedError("_ad_to_petsc not implemented for AdjFloat.")
135+
136+
def _ad_from_petsc(self, vec):
137+
raise NotImplementedError("_ad_from_petsc not implemented for AdjFloat.")
138+
133139

134140
_exp = math.exp
135141
_log = math.log

0 commit comments

Comments
 (0)