Open mottelet opened 2 years ago
If your function is f(x) = x^2-2
then df(x)/dx = 2.0*x
. Your Jacobian returns df(x)/dx = 2.0
.
If your function is
f(x) = x^2-2
thendf(x)/dx = 2.0*x
. Your Jacobian returnsdf(x)/dx = 2.0
.
I know how to compute a Jacobian, please see the Kinsol documentation about Picard method were the rhs is spliited in a linear part and a nonlinear part (https://sundials.readthedocs.io/en/latest/kinsol/Mathematics_link.html?highlight=picard#basic-fixed-point-iteration) :
For Picard iteration, as implemented in kinsol, we consider a special form of the nonlinear function F , such that F (u) = Lu − N (u), where L is a constant nonsingular matrix and N is (in general) nonlinear. Then the fixed-point function G is defined as G(u) = u − L−1F (u). The Picard iteration is given by:...,
Currently the Picard iteration does not utilize the same linear system reuse controls that are present when using the modified Newton iteration. As such, the Picard iteration evaluates the linear system each iteration. We'll look at incorporating the reuse logic into the Picard iteration as part of a future release.
OK thanks, so let us the issue open ok ?
Yes, let's keep this issue open.
Hello,
I noticed that using kinsol Picard iterations triggers a Jacobian evaluation at every iteration, although the Jacobian is supposed to be constant.
What am I doing wrong in the following trivial example (solve x*x-2=0) ? Here is the output of the program, showing that the jacobian function is called at each step though it shouldn't (IMHO):
jac jac jac jac jac jac jac jac jac jac jac jac jac jac y=1.414213
Thanks for your help
Stéphane Mottelet