Skip to content

Commit

Permalink
change in importer to be python 2.7 compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiofumagalli committed Nov 1, 2017
1 parent 9a8744c commit dea3de2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/porepy/fracs/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ def read_dfn_grid(folder, num_fractures, case_id, **kwargs):
global_node_id = 0
for f_id in np.arange(num_fractures):
post = "_F" + str(f_id+offset_name) + "_" + str(case_id) + ".txt"

g_2d[f_id] = grid.Grid(2, *_dfn_grid_2d(folder, post, **kwargs),
nodes_2d, face_nodes_2d, cell_faces_2d = _dfn_grid_2d(folder, post, **kwargs)
g_2d[f_id] = grid.Grid(2, nodes_2d, face_nodes_2d, cell_faces_2d,
"fracture_" + str(f_id) + "_" + str(case_id))

bnd_faces = g_2d[f_id].get_boundary_faces()
Expand Down Expand Up @@ -333,7 +333,8 @@ def read_dfn_grid(folder, num_fractures, case_id, **kwargs):
mask = conn[:, 2] == g_id

nodes_id = _nodes_faces_2d(g_2d[f_id], conn[mask, 0])
g_1d = grid.Grid(1, *_dfn_grid_1d(g_2d[f_id], nodes_id),
nodes_1d, face_nodes_1d, cell_faces_1d = _dfn_grid_1d(g_2d[f_id], nodes_id)
g_1d = grid.Grid(1, nodes_1d, face_nodes_1d, cell_faces_1d,
"intersection_" + str(f_id) + \
"_" + str(g_id-1) + "_" + str(case_id))

Expand Down

0 comments on commit dea3de2

Please sign in to comment.