Dear all,
Is it possible to use auto time step for the time dependent problem in FEniCS?
I'm using the NonlinearVariationalSolver, for example, if I defined the problem as follow:
a=derivative(L,u,du)# L is the weak form
problem=NonlinearVariationalProblem(L,u,bcs=bc,J=a)
solver=NonlinearVariationalSolver(problem)
while norm(du)>tolerence:
solver.solve()
while solver_is_reach_the_maximun_iters:
dt=dt*0.5
solver.solve()
if solve_is_failed:
print error
stop
du=u-u0
u0.assign(u)
if solver.iteraters>5:
dt=dt*0.5
else:
dt=2.0*dt
The problem is, how can I get the information of the solver in each time step, for example, the iterations of each time step, the maxium iterations and relative errors and so on....
I print solver.parameters, but don't find it.
By the way, is it possible to use the auto time step like this way? Or any other helpful suggestion?
Thank your!