Use previous iteration in NonlinearVariationalProblem?


218
views
0
6 months ago by
Matt 
I need to solve a time-dependent nonlinear PDE using exclusively the NonlinearVariationalProblem interface. I plan on using dolfin-adjoint, so I don't think a manual implementation of Picard or Newton is allowed. The best way to solve the PDE is to make special use of the previous iterated solution. For example, consider the following equation

\[

\frac{\partial u}{\partial t} = \nabla \cdot q(u) \nabla u

\]

We can solve this in FeNiCs by

u = Function(V)
u_old = Function(V)
# Set u_old to some initial conditions...
v = TestFunction(V)
F = u*v*dx - u_old*v*dx - Dt*inner(q(u)*grad(u), grad(v))*dx
problem = NonlinearVariationalProblem(F, u, bcs, J)
solver  = NonlinearVariationalSolver(problem)
solver.solve()​


But suppose there exists some magical function \(c\) that makes convergence more stable when linearized:

\[

c(u_{n}) \frac{u_{n+1} - u_{old}}{\Delta t} = \nabla \cdot q(u_{n}) \nabla u_{n+1}

\]

Is there anyway to write the NonlinearVariationalProblem so that \(c\) will always be evaluated at the previous iterated solution?
why do you need a nonlinear solver for solving the linearized version?
written 6 months ago by Hernán Mella 
I plan on using dolfin-adjoint. It is my understanding that if I solve the nonlinear problem using the high level NonlinearVariationalProblem interface, none of the linearized solves within will be recorded. However, If I were to set up and solve the linearized problem manually, each linearized solve will need to be recorded.
written 6 months ago by Matt 
Please login to add an answer/comment or follow this question.

Similar posts:
Search »