hi

On 03/12/15 18:43, Barry Smith wrote:
    I absolutely do NOT recommend doing variable switching with SNES. Our 
Newton solvers are not designed with variable switching in mind so you get 
these absurd limitations like needing SNESLINESEARCHBASIC

    It would be great if someone who understood variable switching would either 
1) contribute a Newton that supports variable switching to PETSc or 2) enhance 
the current SNESSolve_NewtonLS to support variable switching (I don't know 
which is easier).

I had resigned myself to not being able to use a line search, partly because the nonlinear solver in the TOUGH2 simulator (which we've used for many years to solve geothermal flow problems with phase changes and variable switching) doesn't use one either, and it generally works fine without one. Without the line search, SNES is doing much the same thing and doesn't seem to be upset by the variable switching either. It's only the error handling that's causing trouble.

But also I couldn't really see how a line search could be made to work with variable switching. When you switch variables, you're effectively doing a discontinuous leap into another part of the solution space. How can searching along a line between the old phase conditions and the new ones be made to make sense? Are there literature examples where people have done it?

Cheers, Adrian

--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: [email protected]
tel: +64 (0)9 923 84611

Reply via email to