aboutsummaryrefslogtreecommitdiff
path: root/src/Newton.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Newton.c')
-rw-r--r--src/Newton.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Newton.c b/src/Newton.c
index 2eefea1..076b926 100644
--- a/src/Newton.c
+++ b/src/Newton.c
@@ -421,9 +421,6 @@ Newton (CCTK_POINTER_TO_CONST cctkGH,
allocate_derivs (&u, ntotal);
/* TestRelax(nvar, n1, n2, n3, v, dv.d0); */
- for (j = 0; j < ntotal; j++)
- v.d0[j] = 0;
-
it = 0;
dmax = 1;
while (dmax > tol && it < itmax)
@@ -456,6 +453,14 @@ Newton (CCTK_POINTER_TO_CONST cctkGH,
}
it += 1;
}
+ if (itmax==0)
+ {
+ F_of_v (cctkGH, nvar, n1, n2, n3, v, F, u);
+ dmax = -1;
+ for (j = 0; j < ntotal; j++)
+ if (fabs (F[j]) > dmax)
+ dmax = fabs (F[j]);
+ }
printf ("Newton: it=%d \t |F|=%e \n", it, dmax);
fflush(stdout);