Skip to content

Commit

Permalink
Update to newest version of meshio.
Browse files Browse the repository at this point in the history
Change in how the physcial names are represented in the gmsh .geo file
  • Loading branch information
keileg committed Mar 20, 2018
1 parent 0bdb1d3 commit cdfccac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meshio == 1.10.3
meshio >= 1.11.7
networkx >= 1.10
numpy >= 1.10
scipy >= 0.17
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meshio == 1.10.3
meshio >= 1.11.7
networkx >= 1.10
numpy >= 1.10
scipy >= 0.17
Expand Down
6 changes: 3 additions & 3 deletions src/porepy/grids/gmsh/mesh_2_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def create_2d_grids(pts, cells, **kwargs):

num_tri = tri_cells.shape[0]

phys_name_ind_tri = np.unique(cell_info['triangle']['physical'])
phys_name_ind_tri = np.unique(cell_info['triangle']['gmsh:physical'])

# Index of the physical name tag assigned by gmsh to each fracture
gmsh_num = np.zeros(phys_name_ind_tri.size, dtype='int')
Expand Down Expand Up @@ -92,7 +92,7 @@ def create_2d_grids(pts, cells, **kwargs):
for ti in loc_gmsh_num:
# It seems the gmsh numbering corresponding to the physical tags
# (as found in physnames) is stored in the first column of info
gmsh_ind = np.where(cell_info['triangle']['physical'] == ti)[0]
gmsh_ind = np.where(cell_info['triangle']['gmsh:physical'] == ti)[0]
loc_tri_glob_ind = np.vstack((loc_tri_glob_ind,
tri_cells[gmsh_ind, :]))

Expand Down Expand Up @@ -145,7 +145,7 @@ def create_1d_grids(pts, cells, phys_names, cell_info,

gmsh_const = constants.GmshConstants()

line_tags = cell_info['line']['physical']
line_tags = cell_info['line']['gmsh:physical']
line_cells = cells['line']

gmsh_tip_num = []
Expand Down

0 comments on commit cdfccac

Please sign in to comment.