Skip to content
Snippets Groups Projects

added test for consistent part of WENO flux

Merged Timothy Smith requested to merge consistent-part-test into master
+ 27
1
@@ -44,7 +44,7 @@ import utilities as u
"-1.58578644 0 1.41421356 -0.725992789 -0.725992789,"
"3.77207794 -2.24264069 -2.24264069 3.3359596 5.57860029"),
"-4.35371022 12.2479485 8.99522344 8.99522344 -51.3903927")
])
])
def test_weno_flux_uniform_grid(
ctx_factory, gen_fluxes_str, char_fluxes_pos_str, char_fluxes_neg_str,
combined_metric, R_str, flux_expected_str):
@@ -74,6 +74,32 @@ def test_weno_flux_uniform_grid(
u.compare_arrays(flux_dev.get(), flux_expected)
@pytest.mark.xfail
@pytest.mark.parametrize(("gen_fluxes_str,consistent_expected_str"), [
("4 11.2 8 8 46.4,1 2.6 1 1 7.1",
"2.5 6.9 4.5 4.5 26.75"),
("-1 2.6 1 1 -7.1,-4 11.2 8 8 -46.4",
"-2.5 6.9 4.5 4.5 -26.75")
])
def test_consistent_part_uniform_grid(
ctx_factory, gen_fluxes_str, consistent_expected_str):
prg = u.get_weno_program_with_root_kernel("consistent_part")
queue = u.get_queue(ctx_factory)
nvars = 5
gen_fluxes = u.expand_to_6(
u.transposed_array_from_string(gen_fluxes_str))
consistent_dev = u.empty_array_on_device(queue, nvars)
prg(queue, nvars=nvars,
generalized_fluxes=gen_fluxes,
consistent=consistent_dev)
consistent_expected = u.array_from_string(consistent_expected_str)
u.compare_arrays(consistent_dev.get(), consistent_expected)
@pytest.mark.slow
@pytest.mark.parametrize(("states_str,fluxes_str,R_inv_str,wavespeeds_str,"
"fluxes_pos_expected_str,fluxes_neg_expected_str"), [
Loading