diff --git a/examples/adjoint.py b/examples/adjoint.py index 4b7ddce..81390d6 100644 --- a/examples/adjoint.py +++ b/examples/adjoint.py @@ -14,7 +14,8 @@ x = ufl.SpatialCoordinate(mesh) expr = ufl.as_vector([ufl.sin(2 * ufl.pi * x[0]), ufl.cos(2 * ufl.pi * x[1])]) -u = fd.interpolate(expr, V) +u = fd.Function(V) +u.interpolate(expr) u_dot = fd.Function(V) v = fd.TestFunction(V) diff --git a/firedrake_ts/ts_solver.py b/firedrake_ts/ts_solver.py index 99e34a1..c5d9d45 100644 --- a/firedrake_ts/ts_solver.py +++ b/firedrake_ts/ts_solver.py @@ -228,6 +228,7 @@ def update_diffusivity(current_solution, current_time_derivative): # Mixed problem, use jacobi pc if user has not supplied # one. self.set_default_parameter("pc_type", "jacobi") + self.set_default_parameter("ts_max_snes_failures", -1) self.ts = PETSc.TS().create(comm=problem.dm.comm) self.snes = self.ts.getSNES()