diff --git a/pyadjoint/optimization/tao_solver.py b/pyadjoint/optimization/tao_solver.py index 27267371..15503c00 100644 --- a/pyadjoint/optimization/tao_solver.py +++ b/pyadjoint/optimization/tao_solver.py @@ -62,7 +62,7 @@ def _get_vecs_indexes(self, X): indices = [] vecs = [] for x in X: - vec = x._ad_vec_to_petsc() + vec = x._ad_to_petsc() indices.append(vec.getLocalSize()) vecs.append(vec) return vecs, indices @@ -121,7 +121,7 @@ def from_petsc(self, y, X): if len(X) != len(self._isis_concatenated_vecs): raise ValueError("Invalid length") for iset, x in zip(self._isis_concatenated_vecs, X): - x._ad_vec_from_petsc(y.getSubVector(iset)) + x._ad_from_petsc(y.getSubVector(iset)) def to_petsc(self, x, Y): """Copy data from variables to a :class:`petsc4py.PETSc.Vec`. @@ -135,7 +135,7 @@ def to_petsc(self, x, Y): Y = Enlist(Y) for iset, y in zip(self._isis_concatenated_vecs, Y): v_i = x.getSubVector(iset) - y._ad_vec_to_petsc().copy(result=v_i) + y._ad_to_petsc().copy(result=v_i) x.restoreSubVector(iset, v_i)