From f9a574e3a6f1dbaedd5f87eef788b77a0b90ba28 Mon Sep 17 00:00:00 2001 From: "Steven R. Brandt" Date: Thu, 16 Apr 2026 10:54:11 -0500 Subject: [PATCH] TwoPuncturesX: This branch addresses ticket https://bitbucket.org/einsteintoolkit/tickets/issues/2931/claude-ai-edits-to-twopuncturesx See the associated report on the ticket for detaild commentary. --- TwoPuncturesX/src/Newton.cc | 2 +- TwoPuncturesX/src/TwoPunctures.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TwoPuncturesX/src/Newton.cc b/TwoPuncturesX/src/Newton.cc index 699c67b6..e7751b4b 100644 --- a/TwoPuncturesX/src/Newton.cc +++ b/TwoPuncturesX/src/Newton.cc @@ -422,7 +422,7 @@ static int bicgstab(const cGH* const cctkGH, int const nvar, free_ivector(ncols, 0, ntotal - 1); /* iteration failed */ - if (ii > itmax) + if (ii >= itmax) return -1; /* breakdown */ diff --git a/TwoPuncturesX/src/TwoPunctures.cc b/TwoPuncturesX/src/TwoPunctures.cc index 2870c7b7..f10115ae 100644 --- a/TwoPuncturesX/src/TwoPunctures.cc +++ b/TwoPuncturesX/src/TwoPunctures.cc @@ -100,7 +100,7 @@ static void set_initial_guess(const cGH* cctkGH, derivs v) { /* Calculation of (x,r)*/ C_To_c(nvar, X, R, &(s_x[indx]), &r, U); /* Calculation of (y,z)*/ - rx3_To_xyz(nvar, s_x[i3D], r, phi, &(s_y[indx]), &(s_z[indx]), U); + rx3_To_xyz(nvar, s_x[indx], r, phi, &(s_y[indx]), &(s_z[indx]), U); fprintf(debug_file, "%.16g %.16g %.16g %.16g %.16g %.16g %.16g %.16g %.16g %.16g " "%.16g %.16g %.16g %.16g %.16g %.16g %.16g %.16g %.16g\n", @@ -590,7 +590,7 @@ void TwoPuncturesX_TwoPunctures(CCTK_ARGUMENTS) { } if (r_minus < TP_Extend_Radius) { alp[ind] = ((1.0 - 0.5 * EXTEND(*mm, r_minus) - 0.5 * *mp / r_plus) / - (1.0 + 0.5 * EXTEND(*mp, r_minus) + 0.5 * *mp / r_plus)); + (1.0 + 0.5 * EXTEND(*mm, r_minus) + 0.5 * *mp / r_plus)); } if (averaged_lapse) {