diff --git a/tests/functional/alfven_wave/alfven_wave1d.py b/tests/functional/alfven_wave/alfven_wave1d.py index b0a864629..6b6b2e701 100644 --- a/tests/functional/alfven_wave/alfven_wave1d.py +++ b/tests/functional/alfven_wave/alfven_wave1d.py @@ -145,7 +145,6 @@ def main(): cpp = cpp_lib() from pyphare.pharesee.run import Run - from pyphare.pharesee.hierarchy import flat_finest_field sim = config() Simulator(sim).run() @@ -163,8 +162,8 @@ def main(): sorted_patches = sorted(B.level(1).patches, key=lambda p: p.box.lower[0]) - x0 = sorted_patches[0].patch_datas["By"].x[0] - x1 = sorted_patches[-1].patch_datas["By"].x[-1] + x0 = sorted_patches[0].patch_datas["y"].x[0] + x1 = sorted_patches[-1].patch_datas["y"].x[-1] B = r.GetB(t[-1]) by, xby = flat_finest_field(B, "By") diff --git a/tests/functional/conservation/conserv.py b/tests/functional/conservation/conserv.py index 6e30b3dd1..cd9131dc3 100644 --- a/tests/functional/conservation/conserv.py +++ b/tests/functional/conservation/conserv.py @@ -3,7 +3,7 @@ import pyphare.pharein as ph from pyphare.simulator.simulator import Simulator from pyphare.pharesee.run import Run -from pyphare.pharesee.hierarchy import get_times_from_h5 +from pyphare.pharesee.hierarchy.fromh5 import get_times_from_h5 import os import numpy as np @@ -155,17 +155,17 @@ def mag_energy(B, lvlNbr=0): if lvlNbr == ilvl: tot = 0.0 for ip, patch in enumerate(lvl.patches): - pdata = patch.patch_datas["Bx"] + pdata = patch.patch_datas["x"] # Bx is primal, but By and Bz dual so # we average By and Bz onto Bx to use them # in the same formula ghosts_nbr = pdata.ghosts_nbr[0] - bx = patch.patch_datas["Bx"].dataset[ghosts_nbr:-ghosts_nbr] - bytmp = patch.patch_datas["By"].dataset[ + bx = patch.patch_datas["x"].dataset[ghosts_nbr:-ghosts_nbr] + bytmp = patch.patch_datas["y"].dataset[ ghosts_nbr - 1 : -(ghosts_nbr - 1) ] - bztmp = patch.patch_datas["Bz"].dataset[ + bztmp = patch.patch_datas["z"].dataset[ ghosts_nbr - 1 : -(ghosts_nbr - 1) ] by = 0.5 * (bytmp[1:] + bytmp[:-1]) diff --git a/tests/functional/ionIonBeam/ion_ion_beam1d.py b/tests/functional/ionIonBeam/ion_ion_beam1d.py index 724b480ed..cef0f7190 100644 --- a/tests/functional/ionIonBeam/ion_ion_beam1d.py +++ b/tests/functional/ionIonBeam/ion_ion_beam1d.py @@ -2,7 +2,7 @@ import pyphare.pharein as ph from pyphare.simulator.simulator import Simulator -from pyphare.pharesee.hierarchy import get_times_from_h5 +from pyphare.pharesee.hierarchy.fromh5 import get_times_from_h5 from pyphare.pharesee.run import Run from tests.diagnostic import all_timestamps @@ -126,8 +126,8 @@ def growth_b_right_hand(run_path, time_offset): for time in times: B_hier = r.GetB(time, merged=True, interp="linear") - by_interpolator, xyz_finest = B_hier["By"] - bz_interpolator, xyz_finest = B_hier["Bz"] + by_interpolator, xyz_finest = B_hier["y"] + bz_interpolator, xyz_finest = B_hier["z"] # remove the last point so that "x" is periodic wo. last point = first point x = xyz_finest[0][:-1] diff --git a/tests/functional/shock/shock.py b/tests/functional/shock/shock.py index 5f616ad76..bfa5d8cf7 100644 --- a/tests/functional/shock/shock.py +++ b/tests/functional/shock/shock.py @@ -140,8 +140,8 @@ def main(): fig, ax = plt.subplots() B = r.GetB(t, merged=True) title = "interp order {} - t = {:06.3f}".format(interp_order, t) - x = B["By"][1][0] - By = B["By"][0] + x = B["y"][1][0] + By = B["y"][0] ax.plot(x, By(x), color="k") ax.set_title(title) ax.set_ylim((-0.2, 5)) @@ -172,8 +172,8 @@ def main(): for r, color, interp_order in zip(runs, colors, (1, 2, 3)): print(r.path) B = r.GetB(t, merged=True) - x = B["By"][1][0] - By = B["By"][0] + x = B["y"][1][0] + By = B["y"][0] ax.plot(x, By(x), color=color, label=f"interp order {interp_order}") title = "interp order {} - t = {:06.3f}".format(interp_order, t) ax.set_title(title) diff --git a/tests/functional/tdtagged/td1dtagged.py b/tests/functional/tdtagged/td1dtagged.py index 5b63273ab..2e5bd3778 100644 --- a/tests/functional/tdtagged/td1dtagged.py +++ b/tests/functional/tdtagged/td1dtagged.py @@ -163,14 +163,14 @@ def make_figure(): JwT = rwT.GetJ(plot_time, merged=True, interp="linear") JNoRef = rNoRef.GetJ(plot_time, merged=True, interp="linear") - xbywT = BwT["By"][1][0] - bywT = BwT["By"][0](xbywT) - xbyNoRef = BNoRef["By"][1][0] - byNoRef = BNoRef["By"][0](xbyNoRef) - xjzwT = JwT["Jz"][1][0] - jzwT = JwT["Jz"][0](xjzwT) - xjzNoRef = JNoRef["Jz"][1][0] - jzNoRef = JNoRef["Jz"][0](xjzNoRef) + xbywT = BwT["y"][1][0] + bywT = BwT["y"][0](xbywT) + xbyNoRef = BNoRef["y"][1][0] + byNoRef = BNoRef["y"][0](xbyNoRef) + xjzwT = JwT["z"][1][0] + jzwT = JwT["z"][0](xjzwT) + xjzNoRef = JNoRef["z"][1][0] + jzNoRef = JNoRef["z"][0](xjzNoRef) fig, axarr = plt.subplots(nrows=3, figsize=(8, 8)) diff --git a/tests/simulator/test_initialization.py b/tests/simulator/test_initialization.py index 9f4ed8ec4..7697c8a0b 100644 --- a/tests/simulator/test_initialization.py +++ b/tests/simulator/test_initialization.py @@ -283,9 +283,9 @@ def _test_B_is_as_provided_by_user(self, dim, interp_order, **kwargs): self.assertTrue(ilvl == 0) # only level 0 is expected perfect precision print("checking level {}".format(ilvl)) for patch in level.patches: - bx_pd = patch.patch_datas["Bx"] - by_pd = patch.patch_datas["By"] - bz_pd = patch.patch_datas["Bz"] + bx_pd = patch.patch_datas["x"] + by_pd = patch.patch_datas["y"] + bz_pd = patch.patch_datas["z"] bx = bx_pd.dataset[:] by = by_pd.dataset[:]