Skip to content

Commit

Permalink
Update FEniCSx wrapper to make it work with latest changes (#191)
Browse files Browse the repository at this point in the history
* try...except to make older version work

* pass
  • Loading branch information
mscroggs authored Apr 25, 2023
1 parent 6565971 commit 98839cc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bempp/api/external/fenicsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,15 @@ def p1_trace(fenics_space):
# Finally FEniCS dofs to vertices.
dof_to_vertex_map = np.zeros(num_fenics_vertices, dtype=np.int64)
tets = fenics_mesh.geometry.dofmap
for tet in range(tets.num_nodes):

try:
ntets = tets.num_nodes
tets = [tets.get_links(i) for i in range(ntets)]
except AttributeError:
pass

for tet, cell_verts in enumerate(tets):
cell_dofs = fenics_space.dofmap.cell_dofs(tet)
cell_verts = tets.links(tet)
for v in range(4):
vertex_n = cell_verts[v]
dof = cell_dofs[fenics_space.dofmap.dof_layout.entity_dofs(0, v)[0]]
Expand Down

0 comments on commit 98839cc

Please sign in to comment.