Skip to content

Commit 7ad7026

Browse files
committed
Update to apply all issues in the PR
1 parent b68b438 commit 7ad7026

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

TwoPuncturesX/src/Newton.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ static int bicgstab(const cGH* const cctkGH, int const nvar,
422422
free_ivector(ncols, 0, ntotal - 1);
423423

424424
/* iteration failed */
425-
if (ii >= itmax)
425+
if (ii >= itmax && *normres > tol)
426426
return -1;
427427

428428
/* breakdown */

TwoPuncturesX/src/TwoPunctures.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ static void set_initial_guess(const cGH* cctkGH, derivs v) {
3737
derivs U;
3838
FILE *debug_file;
3939

40-
if (solve_momentum_constraint)
41-
nvar = 4;
40+
if (solve_momentum_constraint) {
41+
CCTK_ERROR("solve_momentum_constraint=yes is not implemented in TwoPuncturesX");
42+
// nvar = 4;
43+
}
4244

4345
s_x = (CCTK_REAL*)calloc(n1 * n2 * n3, sizeof(CCTK_REAL));
4446
s_y = (CCTK_REAL*)calloc(n1 * n2 * n3, sizeof(CCTK_REAL));
@@ -624,7 +626,8 @@ void TwoPuncturesX_TwoPunctures(CCTK_ARGUMENTS) {
624626
}
625627

626628
if (use_sources && rescale_sources) {
627-
assert(0); // TODO: Implement via critical region
629+
// TODO: Is the omp single declaration enough to handle potential threading issues?
630+
// assert(0); // TODO: Implement via critical region
628631
#pragma omp single
629632
Rescale_Sources(cctkGH, np, vcoordx, vcoordy, vcoordz, NULL, gxx, gyy, gzz,
630633
gxy, gxz, gyz);

0 commit comments

Comments
 (0)