Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
psaap3-weno
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
psaap3-weno
Commits
814d78de
Commit
814d78de
authored
5 years ago
by
Timothy A. Smith
Browse files
Options
Downloads
Patches
Plain Diff
reset tests back to single precision tolerances
parent
03b66699
No related branches found
Branches containing commit
No related tags found
3 merge requests
!32
Double precision
,
!31
Remove dissipation part duplication
,
!28
WENO flux bug
Pipeline
#18922
failed
5 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
data_for_test.py
+5
-5
5 additions, 5 deletions
data_for_test.py
test.py
+0
-11
0 additions, 11 deletions
test.py
utilities.py
+1
-1
1 addition, 1 deletion
utilities.py
with
6 additions
and
17 deletions
data_for_test.py
+
5
−
5
View file @
814d78de
...
...
@@ -926,11 +926,11 @@ single_data["Case d:z"] = FluxDataSingle(
@pytest.fixture
(
scope
=
"
session
"
,
params
=
[
#
"Case flat:x", "Case flat:y", "Case flat:z",
"
Case a:x
"
])
#
, "Case a:y", "Case a:z",
#
"Case b:x", "Case b:y", "Case b:z",
#
"Case c:x", "Case c:y", "Case c:z",
#
"Case d:x", "Case d:y", "Case d:z"])
"
Case flat:x
"
,
"
Case flat:y
"
,
"
Case flat:z
"
,
"
Case a:x
"
,
"
Case a:y
"
,
"
Case a:z
"
,
"
Case b:x
"
,
"
Case b:y
"
,
"
Case b:z
"
,
"
Case c:x
"
,
"
Case c:y
"
,
"
Case c:z
"
,
"
Case d:x
"
,
"
Case d:y
"
,
"
Case d:z
"
])
def
flux_test_data_fixture
(
request
):
return
single_data
[
request
.
param
]
...
...
This diff is collapsed.
Click to expand it.
test.py
+
0
−
11
View file @
814d78de
...
...
@@ -18,7 +18,6 @@ import utilities as u
from
data_for_test
import
flux_test_data_fixture
# noqa: F401
@pytest.mark.slow
def
test_weno_flux_uniform_grid
(
ctx_factory
,
flux_test_data_fixture
):
data
=
flux_test_data_fixture
...
...
@@ -38,7 +37,6 @@ def test_weno_flux_uniform_grid(ctx_factory, flux_test_data_fixture):
u
.
compare_arrays
(
flux_dev
.
get
(),
data
.
weno_flux
)
@pytest.mark.slow
def
test_consistent_part_uniform_grid
(
ctx_factory
,
flux_test_data_fixture
):
data
=
flux_test_data_fixture
...
...
@@ -54,7 +52,6 @@ def test_consistent_part_uniform_grid(ctx_factory, flux_test_data_fixture):
u
.
compare_arrays
(
consistent_dev
.
get
(),
data
.
consistent
)
@pytest.mark.slow
def
test_dissipation_part_pos_uniform_grid
(
ctx_factory
,
flux_test_data_fixture
):
data
=
flux_test_data_fixture
...
...
@@ -72,7 +69,6 @@ def test_dissipation_part_pos_uniform_grid(ctx_factory, flux_test_data_fixture):
u
.
compare_arrays
(
dissipation_dev
.
get
(),
data
.
dissipation_pos
)
@pytest.mark.slow
def
test_dissipation_part_neg_uniform_grid
(
ctx_factory
,
flux_test_data_fixture
):
data
=
flux_test_data_fixture
...
...
@@ -90,7 +86,6 @@ def test_dissipation_part_neg_uniform_grid(ctx_factory, flux_test_data_fixture):
u
.
compare_arrays
(
dissipation_dev
.
get
(),
data
.
dissipation_neg
)
@pytest.mark.slow
def
test_weno_weights_pos_uniform_grid
(
ctx_factory
,
flux_test_data_fixture
):
data
=
flux_test_data_fixture
...
...
@@ -110,7 +105,6 @@ def test_weno_weights_pos_uniform_grid(ctx_factory, flux_test_data_fixture):
u
.
compare_arrays
(
weights_dev
.
get
(),
data
.
weno_weights_pos
)
@pytest.mark.slow
def
test_weno_weights_neg_uniform_grid
(
ctx_factory
,
flux_test_data_fixture
):
data
=
flux_test_data_fixture
...
...
@@ -160,7 +154,6 @@ def test_oscillation_neg_uniform_grid(ctx_factory, flux_test_data_fixture):
u
.
compare_arrays
(
oscillation_dev
.
get
(),
data
.
oscillation_neg
)
@pytest.mark.slow
def
test_flux_splitting_uniform_grid
(
ctx_factory
,
flux_test_data_fixture
):
data
=
flux_test_data_fixture
...
...
@@ -182,7 +175,6 @@ def test_flux_splitting_uniform_grid(ctx_factory, flux_test_data_fixture):
u
.
compare_arrays
(
fluxes_neg_dev
.
get
(),
data
.
char_fluxes_neg
)
@pytest.mark.slow
def
test_pointwise_eigenvalues_ideal_gas
(
ctx_factory
,
flux_test_data_fixture
):
data
=
flux_test_data_fixture
...
...
@@ -197,7 +189,6 @@ def test_pointwise_eigenvalues_ideal_gas(ctx_factory, flux_test_data_fixture):
u
.
compare_arrays
(
lam_dev
.
get
(),
data
.
lam_pointwise
)
@pytest.mark.slow
def
test_roe_uniform_grid_ideal_gas
(
ctx_factory
,
flux_test_data_fixture
):
data
=
flux_test_data_fixture
...
...
@@ -237,7 +228,6 @@ def test_roe_uniform_grid_ideal_gas(ctx_factory, flux_test_data_fixture):
check_roe_property
(
data
.
state_pair
,
data
.
flux_pair
,
R
,
R_inv
,
lam
)
@pytest.mark.slow
@pytest.mark.parametrize
(
"
lam_pointwise_str,lam_roe_str,lam_expected_str
"
,
[
(
"
1 2 3 4 5,2 4 6 8 10
"
,
"
1.5 3 4.5 6 7.5
"
,
"
2.2 4.4 6.6 8.8 11
"
),
(
"
1 2 3 4 5,-2 -4 -6 -8 -10
"
,
"
1.5 3 4.5 6 7.5
"
,
"
2.2 4.4 6.6 8.8 11
"
),
...
...
@@ -263,7 +253,6 @@ def test_lax_wavespeeds(
u
.
compare_arrays
(
lam_dev
.
get
(),
lam_expected
)
@pytest.mark.slow
def
test_matvec
(
ctx_factory
):
prg
=
u
.
get_weno_program_with_root_kernel
(
"
mult_mat_vec
"
)
queue
=
u
.
get_queue
(
ctx_factory
)
...
...
This diff is collapsed.
Click to expand it.
utilities.py
+
1
−
1
View file @
814d78de
...
...
@@ -11,7 +11,7 @@ from pytest import approx
# {{{ arrays
def
compare_arrays
(
a
,
b
):
assert
a
==
approx
(
b
,
rel
=
1e-
12
,
abs
=
1
e-
14
)
assert
a
==
approx
(
b
,
rel
=
1e-
5
,
abs
=
2
e-
5
)
def
random_array_on_device
(
queue
,
*
shape
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment