ralna / RALFit

A non-linear least squares solver
Other
25 stars 6 forks source link

Bug in processing Jacobian #95

Closed talassio closed 3 years ago

talassio commented 3 years ago

Providing the Jacobian with option options%fortran_jacobian = .True. OR providing Jacobian transpose with option options%fortran_jacobian = .False. should be (numerically) equivalent.

Minimal example provided wtih lanczos3.f90, currently only for some combinations of options%... the behaviour is as expected, for the others combinations diffs are present in solution paths.

talassio commented 3 years ago

Further comments to resolve the issue:

The signature to mult_j and mult_jt could be changed to accept logical fortran_jacobian instead of nlls_options options, this would simplify the passing of the value into the evaltensor_*callbacks. Furthermore, tensor_params_type could be extended to include a new member logical fortran_jacobian to be passed onto mult_j.