The solver part of the code looks like this.
problem = NonlinearVariationalProblem(L, u_, bcs, J)
solver = NonlinearVariationalSolver(problem)
while (t < T):
t += dt
u0_.vector()[:] = u_.vector() # u0_ is solution at previous step
solver.solve()
At each time step, I wish to solve the equations adaptively. NonlinearVariationalSolver, solve() don't seem to accept tol, M as keyword arguments.