Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Sep 4, 2024
1 parent 63bdfcc commit 5ee71f6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def get_ref(x, Bx, field_cfg):
mask = yy == yy[0]
# Flatten=true (default) is currently (Sep 24) broken so we manually flatten
components = data_file.GetComponents(
data.Info["ComponentNames"], flatten=False
data_file.Info["ComponentNames"], flatten=False
)
temp = components["prim_pressure"].ravel()[
mask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

class TestCase(utils.test_case.TestCaseAbs):
def Prepare(self, parameters, step):

assert parameters.num_ranks <= 4, "Use <= 4 ranks for diffusion test."

res = res_cfgs[step - 1]
Expand Down Expand Up @@ -80,7 +79,7 @@ def Analyse(self, parameters):
data_file = phdf.phdf(data_filename)
# Flatten=true (default) is currently (Sep 24) broken so we manually flatten
components = data_file.GetComponents(
data.Info["ComponentNames"], flatten=False
data_file.Info["ComponentNames"], flatten=False
)
T = components[
"prim_pressure"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

class TestCase(utils.test_case.TestCaseAbs):
def Prepare(self, parameters, step):

assert parameters.num_ranks <= 4, "Use <= 4 ranks for diffusion test."

# 2D reference case again
Expand Down Expand Up @@ -112,7 +111,7 @@ def Analyse(self, parameters):
data_file = phdf.phdf(data_filename)
# Flatten=true (default) is currently (Sep 24) broken so we manually flatten
components = data_file.GetComponents(
data.Info["ComponentNames"], flatten=False
data_file.Info["ComponentNames"], flatten=False
)
T = components[
"prim_pressure"
Expand Down
4 changes: 3 additions & 1 deletion tst/regression/test_suites/cluster_hse/cluster_hse.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ def AnalyseInitPert(self, parameters):
cell_vol = cell_vol.ravel()

# Flatten=true (default) is currently (Sep 24) broken so we manually flatten
components = data_file.GetComponents(data.Info["ComponentNames"], flatten=False)
components = data_file.GetComponents(
data_file.Info["ComponentNames"], flatten=False
)
rho = components["prim_density"].ravel()
vx = components["prim_velocity_1"].ravel()
vy = components["prim_velocity_2"].ravel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def zero_corrected_linf_err(gold, test):
data_file = phdf.phdf(data_filename)
# Flatten=true (default) is currently (Sep 24) broken so we manually flatten
components = data_file.GetComponents(
data.Info["ComponentNames"], flatten=False
data_file.Info["ComponentNames"], flatten=False
)

rho = unyt.unyt_array(
Expand Down Expand Up @@ -363,7 +363,7 @@ def zero_corrected_linf_err(gold, test):
data_file = phdf.phdf(data_filename)
# Flatten=true (default) is currently (Sep 24) broken so we manually flatten
components = data_file.GetComponents(
data.Info["ComponentNames"], flatten=False
data_file.Info["ComponentNames"], flatten=False
)

rho = unyt.unyt_array(
Expand Down
3 changes: 1 addition & 2 deletions tst/regression/test_suites/riemann_hydro/riemann_hydro.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

class TestCase(utils.test_case.TestCaseAbs):
def Prepare(self, parameters, step):

method, init_cond = all_cfgs[step - 1]

nx1 = method["nx1"]
Expand Down Expand Up @@ -128,7 +127,7 @@ def Analyse(self, parameters):
data_file = phdf.phdf(data_filename)
# Flatten=true (default) is currently (Sep 24) broken so we manually flatten
components = data_file.GetComponents(
data.Info["ComponentNames"], flatten=False
data_file.Info["ComponentNames"], flatten=False
)
rho = components["prim_density"].ravel()
vx = components["prim_velocity_1"].ravel()
Expand Down
6 changes: 2 additions & 4 deletions tst/regression/test_suites/turbulence/turbulence.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

class TestCase(utils.test_case.TestCaseAbs):
def Prepare(self, parameters, step):

parameters.driver_cmd_line_args = [
"parthenon/output2/dt=-1",
"parthenon/output3/dt=-1",
Expand All @@ -31,7 +30,6 @@ def Prepare(self, parameters, step):
return parameters

def Analyse(self, parameters):

sys.path.insert(
1,
parameters.parthenon_path
Expand All @@ -45,12 +43,12 @@ def Analyse(self, parameters):

# Check Ms
if not (data[-1, -3] > 0.45 and data[-1, -3] < 0.50):
print("ERROR: Mismatch in Ms")
print(f"ERROR: Mismatch in Ms={data[-1, -3]}")
success = False

# Check Ma
if not (data[-1, -2] > 12.8 and data[-1, -2] < 13.6):
print("ERROR: Mismatch in Ma")
print(f"ERROR: Mismatch in Ma={data[-1, -2]}")
success = False

return success

0 comments on commit 5ee71f6

Please sign in to comment.