tChanged the output residual norm of the Poisson Solver to an absolute one. - c… | |
git clone git://src.adamsgaard.dk/cngf-pf | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit d1b0476d13d3e0e71407654fd109e1f1a60063c3 | |
parent 274637aac7ee7231f0b6cb7cad7f5c8317e2e32e | |
Author: ian <[email protected]> | |
Date: Tue, 24 Nov 2020 07:37:04 -0800 | |
Changed the output residual norm of the Poisson Solver to an absolute one. | |
Signed-off-by: Anders Damsgaard <[email protected]> | |
Diffstat: | |
M simulation.c | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/simulation.c b/simulation.c | |
t@@ -8,7 +8,7 @@ | |
/* iteration limits for solvers */ | |
-#define MAX_ITER_GRANULAR 10000 | |
+#define MAX_ITER_GRANULAR 100000 | |
#define MAX_ITER_DARCY 10000 | |
#define MAX_ITER_STRESS 20000 | |
#define RTOL_STRESS 1e-3 | |
t@@ -630,7 +630,7 @@ poisson_solver_1d_cell_update(int i, | |
g_out[i + 1] = 1.0 / (1.0 + coorp_term) | |
* (coorp_term * g_local[i] + g_in[i + 2] / 2.0 | |
+ g_in[i] / 2.0); | |
- r_norm[i] = residual(g_out[i + 1], g_in[i + 1]); | |
+ r_norm[i] = fabs(residual(g_out[i + 1], g_in[i + 1])); | |
#ifdef DEBUG | |
printf("-- %d --------------\n", i); |