diff --git a/test/multidomain/facet/1p_1p/analytical/convergencetest.py b/test/multidomain/facet/1p_1p/analytical/convergencetest.py index 724b16b5513be71b611f42a5a3837acf2b4c658d..94454d2d63d60534ea2bcab684dad42fbd60eb5b 100755 --- a/test/multidomain/facet/1p_1p/analytical/convergencetest.py +++ b/test/multidomain/facet/1p_1p/analytical/convergencetest.py @@ -87,7 +87,7 @@ for permIndex in range(0, len(k)): if isnan(l2_matrix[i]) or isinf(l2_matrix[i]): sys.stderr.write("l2 error norm is not a number!\n") sys.exit(1) - if not (l2_matrix[i] < 1e-12 or l2_matrix[i] < 1e-12): + if not (l2_matrix[i] < 1e-12 or l2_matrix[i+1] < 1e-12): rateP = (log(l2_matrix[i])-log(l2_matrix[i+1]))/(log(eps[i])-log(eps[i+1])) message = "{}\t{:0.4e}\t{:0.4e}\t{:0.4e}\n".format(i, eps[i], l2_matrix[i], rateP) logfile.write(message) diff --git a/test/porousmediumflow/1p/implicit/network1d3d/convergencetest.py b/test/porousmediumflow/1p/implicit/network1d3d/convergencetest.py index c933a4740ba23c13190684b07cf4441187ced417..f1b2e18a6970779fdf1e8f3dff8c03e684f85aea 100755 --- a/test/porousmediumflow/1p/implicit/network1d3d/convergencetest.py +++ b/test/porousmediumflow/1p/implicit/network1d3d/convergencetest.py @@ -39,7 +39,7 @@ logfile.write("-"*50 + "\n") for i in range(len(error)-1): if isnan(error[i]) or isinf(error[i]): continue - if not (error[i] < 1e-12 or error[i] < 1e-12): + if not (error[i] < 1e-12 or error[i+1] < 1e-12): rate = (log(error[i])-log(error[i+1]))/(log(hmax[i])-log(hmax[i+1])) message = "{}\t{:0.4e}\t{:0.4e}\t{:0.4e}\n".format(i, hmax[i], error[i], rate) logfile.write(message)