Skip to content

Commit

Permalink
fix(utils.gridintersect): bug in GridIntersect for vertex grids (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrakenhoff committed Apr 6, 2020
1 parent fb942b4 commit 14040ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flopy/utils/gridintersect.py
Expand Up @@ -168,9 +168,9 @@ def _vtx_grid_to_shape_list(self):
if isinstance(self.mfgrid._cell2d, np.recarray):
for icell in self.mfgrid._cell2d.icell2d:
points = []
for iv in self.mfgrid._cell2d[["icvert_0",
"icvert_1",
"icvert_2"]][icell]:
icverts = ["icvert_{}".format(i) for i in
range(self.mfgrid._cell2d["ncvert"][icell])]
for iv in self.mfgrid._cell2d[icverts][icell]:
points.append((self.mfgrid._vertices.xv[iv],
self.mfgrid._vertices.yv[iv]))
# close the polygon, if necessary
Expand Down

0 comments on commit 14040ff

Please sign in to comment.