-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba2c60d
commit 86d0f16
Showing
4 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
53 changes: 53 additions & 0 deletions
53
tst/regression/test_suites/advection_outflow/advection_outflow.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#======================================================================================== | ||
# Parthenon performance portable AMR framework | ||
# Copyright(C) 2020 The Parthenon collaboration | ||
# Licensed under the 3-clause BSD License, see LICENSE file for details | ||
#======================================================================================== | ||
# (C) (or copyright) 2020. Triad National Security, LLC. All rights reserved. | ||
# | ||
# This program was produced under U.S. Government contract 89233218CNA000001 for Los | ||
# Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC | ||
# for the U.S. Department of Energy/National Nuclear Security Administration. All rights | ||
# in the program are reserved by Triad National Security, LLC, and the U.S. Department | ||
# of Energy/National Nuclear Security Administration. The Government is granted for | ||
# itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide | ||
# license in this material to reproduce, prepare derivative works, distribute copies to | ||
# the public, perform publicly and display publicly, and to permit others to do so. | ||
#======================================================================================== | ||
|
||
# Modules | ||
import math | ||
import numpy as np | ||
import matplotlib | ||
matplotlib.use('agg') | ||
import matplotlib.pylab as plt | ||
import sys | ||
import os | ||
import utils.test_case | ||
|
||
""" To prevent littering up imported folders with .pyc files or __pycache_ folder""" | ||
sys.dont_write_bytecode = True | ||
|
||
class TestCase(utils.test_case.TestCaseAbs): | ||
def Prepare(self, parameters, step): | ||
|
||
parameters.coverage_status = "both" | ||
return parameters | ||
|
||
def Analyse(self, parameters): | ||
|
||
sys.path.insert(1, parameters.parthenon_path + '/scripts/python') | ||
|
||
try: | ||
from phdf_diff import compare | ||
except ModuleNotFoundError: | ||
print("Couldn't find module to compare Parthenon hdf5 files.") | ||
return False | ||
|
||
delta = compare([ | ||
'outflow.out0.00001.phdf', | ||
parameters.parthenon_path + '/tst/regression/gold_standard/outflow.out0.00001.phdf']) | ||
|
||
return delta == 0 | ||
|
||
return True |
67 changes: 67 additions & 0 deletions
67
tst/regression/test_suites/advection_outflow/parthinput.advection_outflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# ======================================================================================== | ||
# Athena++ astrophysical MHD code | ||
# Copyright(C) 2014 James M. Stone <[email protected]> and other code contributors | ||
# Licensed under the 3-clause BSD License, see LICENSE file for details | ||
# ======================================================================================== | ||
# (C) (or copyright) 2020. Triad National Security, LLC. All rights reserved. | ||
# | ||
# This program was produced under U.S. Government contract 89233218CNA000001 for Los | ||
# Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC | ||
# for the U.S. Department of Energy/National Nuclear Security Administration. All rights | ||
# in the program are reserved by Triad National Security, LLC, and the U.S. Department | ||
# of Energy/National Nuclear Security Administration. The Government is granted for | ||
# itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide | ||
# license in this material to reproduce, prepare derivative works, distribute copies to | ||
# the public, perform publicly and display publicly, and to permit others to do so. | ||
# ======================================================================================== | ||
|
||
<parthenon/job> | ||
problem_id = outflow | ||
|
||
<parthenon/mesh> | ||
refinement = adaptive | ||
numlevel = 2 | ||
|
||
nx1 = 64 | ||
x1min = -0.5 | ||
x1max = 0.5 | ||
ix1_bc = outflow | ||
ox1_bc = outflow | ||
|
||
nx2 = 64 | ||
x2min = -0.5 | ||
x2max = 0.5 | ||
ix2_bc = outflow | ||
ox2_bc = outflow | ||
|
||
nx3 = 1 | ||
x3min = -0.5 | ||
x3max = 0.5 | ||
ix3_bc = outflow | ||
ox3_bc = outflow | ||
|
||
<parthenon/meshblock> | ||
nx1 = 16 | ||
nx2 = 16 | ||
nx3 = 1 | ||
|
||
<parthenon/time> | ||
tlim = 0.5 | ||
integrator = rk2 | ||
|
||
<Advection> | ||
cfl = 0.45 | ||
vx = 1.0 | ||
vy = 1.0 | ||
vz = 0.0 | ||
profile = hard_sphere | ||
|
||
refine_tol = 0.3 # control the package specific refinement tagging function | ||
derefine_tol = 0.03 | ||
compute_error = false | ||
num_vars = 1 # number of variables in variable vector | ||
|
||
<parthenon/output0> | ||
file_type = hdf5 | ||
dt = 0.5 | ||
variables = advected |