From 9b53a87882ad81f8f251747fff12208f6f5f0959 Mon Sep 17 00:00:00 2001
From: "Timothy A. Smith" <tasmith4@illinois.edu>
Date: Fri, 23 Aug 2019 23:14:56 -0500
Subject: [PATCH] change combined_frozen_metrics so it is set in FluxDataSingle
 constructor

---
 data_for_test.py |  2 ++
 test.py          | 10 +++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/data_for_test.py b/data_for_test.py
index bde2cd9..7970a62 100644
--- a/data_for_test.py
+++ b/data_for_test.py
@@ -44,6 +44,8 @@ class FluxDataSingle:
         self.oscillation_pos = u.transposed_array_from_string(oscillation_pos_str)
         self.oscillation_neg = u.transposed_array_from_string(oscillation_neg_str)
 
+        self.combined_frozen_metrics = 1.0
+
         self.weno_weights_pos = u.transposed_array_from_string(weno_weights_pos_str)
         self.weno_weights_neg = u.transposed_array_from_string(weno_weights_neg_str)
 
diff --git a/test.py b/test.py
index 671b7fe..da3abad 100644
--- a/test.py
+++ b/test.py
@@ -33,7 +33,7 @@ def test_weno_flux_uniform_grid(ctx_factory, flux_test_data_fixture):
             generalized_fluxes=data.fluxes,
             characteristic_fluxes_pos=data.char_fluxes_pos,
             characteristic_fluxes_neg=data.char_fluxes_neg,
-            combined_frozen_metrics=1.0,
+            combined_frozen_metrics=data.combined_frozen_metrics,
             R=data.R,
             flux=flux_dev)
 
@@ -65,7 +65,7 @@ def test_dissipation_part_pos_uniform_grid(ctx_factory, flux_test_data_fixture):
 
     prg(queue, nvars=data.nvars,
             characteristic_fluxes=data.char_fluxes_pos,
-            combined_frozen_metrics=1.0,
+            combined_frozen_metrics=data.combined_frozen_metrics,
             R=data.R,
             dissipation_pos=dissipation_dev)
 
@@ -82,7 +82,7 @@ def test_dissipation_part_neg_uniform_grid(ctx_factory, flux_test_data_fixture):
 
     prg(queue, nvars=data.nvars,
             characteristic_fluxes=data.char_fluxes_neg,
-            combined_frozen_metrics=1.0,
+            combined_frozen_metrics=data.combined_frozen_metrics,
             R=data.R,
             dissipation_neg=dissipation_dev)
 
@@ -99,7 +99,7 @@ def test_weno_weights_pos_uniform_grid(ctx_factory, flux_test_data_fixture):
 
     prg(queue, nvars=data.nvars,
             characteristic_fluxes=data.char_fluxes_pos,
-            combined_frozen_metrics=1.0,
+            combined_frozen_metrics=data.combined_frozen_metrics,
             w=weights_dev)
 
     sum_weights = np.sum(weights_dev.get(), axis=1)
@@ -118,7 +118,7 @@ def test_weno_weights_neg_uniform_grid(ctx_factory, flux_test_data_fixture):
 
     prg(queue, nvars=data.nvars,
             characteristic_fluxes=data.char_fluxes_neg,
-            combined_frozen_metrics=1.0,
+            combined_frozen_metrics=data.combined_frozen_metrics,
             w=weights_dev)
 
     sum_weights = np.sum(weights_dev.get(), axis=1)
-- 
GitLab