tfluid.c: add missing computation of normalized residual - cngf-pf - continuum … | |
git clone git://src.adamsgaard.dk/cngf-pf | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 8c36fa6f35790cd63a11b96ee642d4635bbe2bc1 | |
parent 1d1a4a362c52237b3a81ebf5cad99b165388a331 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 24 Nov 2020 08:08:45 +0100 | |
fluid.c: add missing computation of normalized residual | |
Also remove some unused code | |
Diffstat: | |
M fluid.c | 12 ++++-------- | |
1 file changed, 4 insertions(+), 8 deletions(-) | |
--- | |
diff --git a/fluid.c b/fluid.c | |
t@@ -260,21 +260,17 @@ darcy_solver_1d(struct simulation *sim, | |
… | |
… | |
- /*for (i = 0; i < sim->nz; ++i) | |
- printf("sim->p_f_dot_impl[%d] = %g (t = %g s, … | |
- i, sim->p_f_dot_impl[i], sim-… | |
- | |
- /*for (i = 0; i < sim->nz; ++i) | |
- if (fabs(sim->p_f_dot_impl[i]) > 1e-12) | |
- errx(1, "sim->p_f_dot_impl[%d] = %g (t… | |
- i, sim->p_f_dot_impl[i], sim-… | |
for (i = 0; i < sim->nz; ++i) | |
if (isnan(sim->p_f_dot_impl[i])) | |
errx(1, "NaN at sim->p_f_dot_impl[%d] … | |
i, sim->t, iter); | |
+ for (i = 0; i < sim->nz - 1; ++i) | |
+ sim->p_f_dot_impl_r_norm[i] = fabs(residual(si… | |
+ si… | |
r_norm_max = max(sim->p_f_dot_impl_r_norm, sim->nz - 1… | |
+ | |
#ifdef DEBUG | |
puts(".. p_f_ghost_new:"); | |
print_array(sim->tmp_ghost, sim->nz + 2); |