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) {