Matrix-Free in NOX
Created by: guoluanjing
Hi there,
I have used an analytic Jacobian for the conventional Newton method in NOX to solve a coupled flow, transport, and chemical reaction system. I build the system up for the purpose of using the Matrix-Free method.
After I set up the jacobian operator as Matrix-Free, tried the no-preconditioning at first ("Preconditioner Operator", "Use Jacobian"), and kept the linear solver (AztecOO/GMRES) and everything else the same. The problem I have now is that as each linear iteration goes, the solution is going towards the opposite direction. For example, the pressure value that is supposed to go up due to injection is going down, and the concentration that is supposed to go up keeps going down until negative and crashes the simulation.
I went inside NOX and checked step by step how it is iterating. One thing that bothers me is that at the very first computF call in my Problem_Interface is to evaluate the initial residual r0, but the second one should be the residual evaluation based on the perturbed solution vector (u + eta*x) to evaluate the matrix-vector product J r0, right? Why is the solution coming out of this iteration exactly the same as the initial guess?
I would greatly appreciate any help you could provide!
Thank you, Luanjing