commit ffe45348839b6f09bf9b9d651b68159cef108db7
parent b47478c82b40a6ea1967da7c5eb9161e51688815
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 16 Apr 2020 15:38:39 +0200
In residual: compare change to old value
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/simulation.c b/simulation.c
@@ -601,7 +601,7 @@ set_bc_dirichlet(double* g_ghost,
double
residual_normalized(double new, double old)
{
- return fabs((new - old)/(new + 1e-16));
+ return fabs((new - old)/(old + 1e-16));
}
static void