Index error in TwoPunctures function JFD_times_dv()

Issue #1746 closed
Ian Ruchlin created an issue

In the TwoPunctures thorn, in the file FuncAndJacobian.c, the function JDF_times_dv() contains an index error. The (A,B,phi) coordinates are defined in terms of indices (i,j,k). The current version has

phi = hp * j;

The j index is used to define the B coordinate. The statement should be

phi = hp * k;

Keyword: TwoPunctures

Comments (3)

  1. Frank Löffler
    • changed status to open
    • removed comment

    This is indeed the case. Now I am trying to estimate the implications. As far as I can see, the wrong 'phi' is used to calculate coordinates y/z, and transform dU, which are then are passed to LinEquations(). LinEquations does not use the passed 'phi', but it uses the wrong 'y/z' and, of course, dU, and through that leads to wrong entries in the JFD matrix. This is a finite difference approximation of the J matrix, used for the pre-conditioner, and as such a change here shouldn't influence the result (if one is obtained), but it might/will influence the convergence (both speed and whether you actually get a result).

    In this sense: please somebody else have a look concerning the implications. I am about to commit the fix, as I am pretty sure it is wrong in the way it is now. Leaving in 'review' for the implications.

  2. Log in to comment