From de9240f4feda0b9d3301625b886e687e528fa8fc Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <2timothy18@gmail.com> Date: Fri, 6 Mar 2020 23:38:10 -0700 Subject: [PATCH 1/4] comment out uniform metric tests for now --- test/data_for_test.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/test/data_for_test.py b/test/data_for_test.py index 99feb03..1711bfd 100644 --- a/test/data_for_test.py +++ b/test/data_for_test.py @@ -87,24 +87,24 @@ def metrics_generator(): ("sine", "x", "wavy3d"), ("sine", "y", "wavy3d"), ("sine", "z", "wavy3d"), - ("sine", "x", "uniform"), - ("sine", "y", "uniform"), - ("sine", "z", "uniform"), - ("1 1 1 1 5.5,1 1 1 1 5.5", "x", "uniform"), - ("1 1 1 1 5.5,1 1 1 1 5.5", "y", "uniform"), - ("1 1 1 1 5.5,1 1 1 1 5.5", "z", "uniform"), - ("2 4 4 4 20,1 1 1 1 5.5", "x", "uniform"), - ("2 4 4 4 20,1 1 1 1 5.5", "y", "uniform"), - ("2 4 4 4 20,1 1 1 1 5.5", "z", "uniform"), - ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "x", "uniform"), - ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "y", "uniform"), - ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "z", "uniform"), - ("2 4 8 12 64,1 1 2 3 11", "x", "uniform"), - ("2 8 12 4 64,1 2 3 1 11", "y", "uniform"), - ("2 12 4 8 64,1 3 1 2 11", "z", "uniform"), - ("1 -1 -2 -3 11,2 -4 -8 -12 64", "x", "uniform"), - ("1 -2 -3 -1 11,2 -8 -12 -4 64", "y", "uniform"), - ("1 -3 -1 -2 11,2 -12 -4 -8 64", "z", "uniform") + #("sine", "x", "uniform"), + #("sine", "y", "uniform"), + #("sine", "z", "uniform"), + #("1 1 1 1 5.5,1 1 1 1 5.5", "x", "uniform"), + #("1 1 1 1 5.5,1 1 1 1 5.5", "y", "uniform"), + #("1 1 1 1 5.5,1 1 1 1 5.5", "z", "uniform"), + #("2 4 4 4 20,1 1 1 1 5.5", "x", "uniform"), + #("2 4 4 4 20,1 1 1 1 5.5", "y", "uniform"), + #("2 4 4 4 20,1 1 1 1 5.5", "z", "uniform"), + #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "x", "uniform"), + #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "y", "uniform"), + #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "z", "uniform"), + #("2 4 8 12 64,1 1 2 3 11", "x", "uniform"), + #("2 8 12 4 64,1 2 3 1 11", "y", "uniform"), + #("2 12 4 8 64,1 3 1 2 11", "z", "uniform"), + #("1 -1 -2 -3 11,2 -4 -8 -12 64", "x", "uniform"), + #("1 -2 -3 -1 11,2 -8 -12 -4 64", "y", "uniform"), + #("1 -3 -1 -2 11,2 -12 -4 -8 64", "z", "uniform") ]) def window_data(request, states_generator, metrics_generator): states_str = request.param[0] -- GitLab From b1052ac37e79be192907138ea761a97c7dadca08 Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <2timothy18@gmail.com> Date: Fri, 6 Mar 2020 23:40:05 -0700 Subject: [PATCH 2/4] take away xfail mark on flux splitting test --- test/test_flux_window_ops.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/test_flux_window_ops.py b/test/test_flux_window_ops.py index 702c9fc..bd4ca4e 100644 --- a/test/test_flux_window_ops.py +++ b/test/test_flux_window_ops.py @@ -113,8 +113,6 @@ def test_pointwise_eigenvalues(queue, window_results): def test_flux_splitting(queue, window_results): data = window_results - if not np.array_equal(data.metrics[0], data.metrics[1]): - pytest.xfail("expect failure with non-uniform metrics") prg = u.get_weno_program_with_root_kernel("split_characteristic_fluxes") -- GitLab From 100bd009f2972e29c471aed5b93da49a80d5f5c1 Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <2timothy18@gmail.com> Date: Sat, 7 Mar 2020 07:49:21 -0700 Subject: [PATCH 3/4] fix bug where test fixture was not passing correct generalized states to flux splitting --- test/test_flux_window_ops.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_flux_window_ops.py b/test/test_flux_window_ops.py index bd4ca4e..8c22c13 100644 --- a/test/test_flux_window_ops.py +++ b/test/test_flux_window_ops.py @@ -58,6 +58,8 @@ class WindowResults: self.frozen_jacobian = pair.frozen_jacobian self.combined_frozen_metric = pair.combined_frozen_metrics[self.dir_internal] + self.generalized_states_frozen = self.states/self.frozen_jacobian + self.generalized_fluxes = data.generalized_fluxes self.generalized_fluxes_frozen = np.array([np.dot(flux, self.frozen_metrics) for flux in data.fluxes])[:,:,self.dir_internal].T.copy(order="F") @@ -120,7 +122,7 @@ def test_flux_splitting(queue, window_results): fluxes_neg_dev = u.empty_array_on_device(queue, data.nvars, 6) prg(queue, nvars=data.nvars, - generalized_states_frozen=data.states, + generalized_states_frozen=data.generalized_states_frozen, generalized_fluxes_frozen=data.generalized_fluxes_frozen, R_inv=data.R_inv, wavespeeds=data.wavespeeds, -- GitLab From 1706874a7c2383dec4e1dc32475b0714cfeaed6d Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <2timothy18@gmail.com> Date: Sat, 7 Mar 2020 07:49:58 -0700 Subject: [PATCH 4/4] reactivate uniform metric tests --- test/data_for_test.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/test/data_for_test.py b/test/data_for_test.py index 1711bfd..99feb03 100644 --- a/test/data_for_test.py +++ b/test/data_for_test.py @@ -87,24 +87,24 @@ def metrics_generator(): ("sine", "x", "wavy3d"), ("sine", "y", "wavy3d"), ("sine", "z", "wavy3d"), - #("sine", "x", "uniform"), - #("sine", "y", "uniform"), - #("sine", "z", "uniform"), - #("1 1 1 1 5.5,1 1 1 1 5.5", "x", "uniform"), - #("1 1 1 1 5.5,1 1 1 1 5.5", "y", "uniform"), - #("1 1 1 1 5.5,1 1 1 1 5.5", "z", "uniform"), - #("2 4 4 4 20,1 1 1 1 5.5", "x", "uniform"), - #("2 4 4 4 20,1 1 1 1 5.5", "y", "uniform"), - #("2 4 4 4 20,1 1 1 1 5.5", "z", "uniform"), - #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "x", "uniform"), - #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "y", "uniform"), - #("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "z", "uniform"), - #("2 4 8 12 64,1 1 2 3 11", "x", "uniform"), - #("2 8 12 4 64,1 2 3 1 11", "y", "uniform"), - #("2 12 4 8 64,1 3 1 2 11", "z", "uniform"), - #("1 -1 -2 -3 11,2 -4 -8 -12 64", "x", "uniform"), - #("1 -2 -3 -1 11,2 -8 -12 -4 64", "y", "uniform"), - #("1 -3 -1 -2 11,2 -12 -4 -8 64", "z", "uniform") + ("sine", "x", "uniform"), + ("sine", "y", "uniform"), + ("sine", "z", "uniform"), + ("1 1 1 1 5.5,1 1 1 1 5.5", "x", "uniform"), + ("1 1 1 1 5.5,1 1 1 1 5.5", "y", "uniform"), + ("1 1 1 1 5.5,1 1 1 1 5.5", "z", "uniform"), + ("2 4 4 4 20,1 1 1 1 5.5", "x", "uniform"), + ("2 4 4 4 20,1 1 1 1 5.5", "y", "uniform"), + ("2 4 4 4 20,1 1 1 1 5.5", "z", "uniform"), + ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "x", "uniform"), + ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "y", "uniform"), + ("1 -1 -1 -1 5.5,2 -4 -4 -4 20", "z", "uniform"), + ("2 4 8 12 64,1 1 2 3 11", "x", "uniform"), + ("2 8 12 4 64,1 2 3 1 11", "y", "uniform"), + ("2 12 4 8 64,1 3 1 2 11", "z", "uniform"), + ("1 -1 -2 -3 11,2 -4 -8 -12 64", "x", "uniform"), + ("1 -2 -3 -1 11,2 -8 -12 -4 64", "y", "uniform"), + ("1 -3 -1 -2 11,2 -12 -4 -8 64", "z", "uniform") ]) def window_data(request, states_generator, metrics_generator): states_str = request.param[0] -- GitLab