From e645e17697d37a00049835c6b948fae29f3ace00 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Mon, 15 Apr 2024 15:42:41 -0400 Subject: [PATCH] test(prt): remove bad flopy usages from triangle and ternary tests (#1727) --- autotest/test_prt_ternary_methods.py | 12 +----------- autotest/test_prt_triangle.py | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/autotest/test_prt_ternary_methods.py b/autotest/test_prt_ternary_methods.py index 4208d2be7c4..c7b90f5da83 100644 --- a/autotest/test_prt_ternary_methods.py +++ b/autotest/test_prt_ternary_methods.py @@ -58,17 +58,6 @@ def build_prt_sim(idx, name, gwf_ws, prt_ws, targets): gwfname = get_model_name(name, "gwf") prtname = get_model_name(name, "prt") - # create grid - tri = get_tri(prt_ws / "grid", targets) - grid = VertexGrid(tri) - gi = GridIntersect(grid) - - # identify cells on left edge - line = LineString([active_domain[0], active_domain[-1]]) - cells_left = gi.intersect(line)["cellids"] - cells_left = np.array(list(cells_left)) - - # create simulation sim = flopy.mf6.MFSimulation( sim_name=name, version="mf6", exe_name=targets["mf6"], sim_ws=prt_ws ) @@ -76,6 +65,7 @@ def build_prt_sim(idx, name, gwf_ws, prt_ws, targets): sim, time_units="DAYS", perioddata=[[1.0, 1, 1.0]] ) prt = flopy.mf6.ModflowPrt(sim, modelname=prtname) + tri = get_tri(prt_ws / "grid", targets) cell2d = tri.get_cell2d() vertices = tri.get_vertices() xcyc = tri.get_xcyc() diff --git a/autotest/test_prt_triangle.py b/autotest/test_prt_triangle.py index bf2ba804b58..da81ab15cc8 100644 --- a/autotest/test_prt_triangle.py +++ b/autotest/test_prt_triangle.py @@ -130,17 +130,6 @@ def build_prt_sim(idx, name, gwf_ws, prt_ws, targets): gwfname = get_model_name(name, "gwf") prtname = get_model_name(name, "prt") - # create grid - tri = get_tri(prt_ws / "grid", targets) - grid = VertexGrid(tri) - gi = GridIntersect(grid) - - # identify cells on left edge - line = LineString([active_domain[0], active_domain[-1]]) - cells_left = gi.intersect(line)["cellids"] - cells_left = np.array(list(cells_left)) - - # create simulation sim = flopy.mf6.MFSimulation( sim_name=name, version="mf6", exe_name=targets["mf6"], sim_ws=prt_ws ) @@ -148,6 +137,7 @@ def build_prt_sim(idx, name, gwf_ws, prt_ws, targets): sim, time_units="DAYS", perioddata=[[1.0, 1, 1.0]] ) prt = flopy.mf6.ModflowPrt(sim, modelname=prtname) + tri = get_tri(prt_ws / "grid", targets) cell2d = tri.get_cell2d() vertices = tri.get_vertices() xcyc = tri.get_xcyc()