Skip to content

Commit

Permalink
test(prt): remove bad flopy usages from triangle and ternary tests (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli authored Apr 15, 2024
1 parent b8bdf61 commit e645e17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
12 changes: 1 addition & 11 deletions autotest/test_prt_ternary_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,14 @@ 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
)
tdis = flopy.mf6.ModflowTdis(
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()
Expand Down
12 changes: 1 addition & 11 deletions autotest/test_prt_triangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,24 +130,14 @@ 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
)
tdis = flopy.mf6.ModflowTdis(
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()
Expand Down

0 comments on commit e645e17

Please sign in to comment.