Skip to content

Commit

Permalink
Update robin_neumann_dirichlet.ipynb (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd authored Jul 12, 2021
1 parent 0476aa0 commit 146aea7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chapter3/robin_neumann_dirichlet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@
" facets = dolfinx.mesh.locate_entities(mesh, fdim, locator)\n",
" facet_indices.append(facets)\n",
" facet_markers.append(np.full(len(facets), marker))\n",
"facet_tag = dolfinx.MeshTags(mesh, fdim, np.array(np.hstack(facet_indices),dtype=np.int32), np.array(np.hstack(facet_markers),dtype=np.int32))"
"facet_indices = np.array(np.hstack(facet_indices), dtype=np.int32)\n",
"facet_markers = np.array(np.hstack(facet_markers), dtype=np.int32)\n",
"sorted_facets = np.argsort(facet_indices)\n",
"facet_tag = dolfinx.MeshTags(mesh, fdim, facet_indices[sorted_facets], facet_markers[sorted_facets])"
]
},
{
Expand Down Expand Up @@ -411,4 +414,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}

0 comments on commit 146aea7

Please sign in to comment.