@@ -335,6 +335,7 @@ def local_facet_orientation_dat(self):
335335 local_facet_start = offsets [- 3 ]
336336 local_facet_end = offsets [- 2 ]
337337 map_from_cell_to_facet_orientations = self .mesh .entity_orientations [:, local_facet_start :local_facet_end ]
338+
338339 # Make output data;
339340 # this is a map from an exterior/interior facet to the corresponding local facet orientation/orientations.
340341 # Halo data are required by design, but not actually used.
@@ -1264,21 +1265,19 @@ def cell_closure(self):
12641265 assert tdim == cell .topological_dimension ()
12651266 # plex.viewFromOptions("-dm_view")
12661267 closure , _ = plex .getTransitiveClosure (0 )
1268+ if hasattr (cell , "to_fiat" ):
1269+ plex .setName ('firedrake_default_topology_fuse' )
1270+
12671271 if self .submesh_parent is not None :
12681272 return dmcommon .submesh_create_cell_closure_cell_submesh (plex ,
12691273 self .submesh_parent .topology_dm ,
12701274 cell_numbering ,
12711275 self .submesh_parent ._cell_numbering ,
12721276 self .submesh_parent .cell_closure )
1273- elif cell .is_simplex ():
1274- topology = FIAT .ufc_cell (cell ).get_topology ()
1275- entity_per_cell = np .zeros (len (topology ), dtype = IntType )
1276- for d , ents in topology .items ():
1277- entity_per_cell [d ] = len (ents )
1278- return dmcommon .closure_ordering (plex , vertex_numbering ,
1279- cell_numbering , entity_per_cell )
12801277 # elif hasattr(cell, "to_fiat"):
1281- # # TODO
1278+ # breakpoint()
1279+ # plex.setName('firedrake_default_topology_fuse')
1280+ # # TODO find better way of branching here
12821281 # topology = cell.to_fiat().topology
12831282 # # entity_per_cell = np.zeros(len(topology), dtype=IntType)
12841283 # # for d, ents in topology.items():
@@ -1287,7 +1286,15 @@ def cell_closure(self):
12871286 # # cell_numbering, entity_per_cell)
12881287 # topology = FIAT.ufc_cell(cell).get_topology()
12891288 # closureSize = sum([len(ents) for _, ents in topology.items()])
1289+ # breakpoint()
12901290 # return dmcommon.create_cell_closure(plex, cell_numbering, closureSize)
1291+ elif cell .is_simplex ():
1292+ topology = FIAT .ufc_cell (cell ).get_topology ()
1293+ entity_per_cell = np .zeros (len (topology ), dtype = IntType )
1294+ for d , ents in topology .items ():
1295+ entity_per_cell [d ] = len (ents )
1296+ return dmcommon .closure_ordering (plex , vertex_numbering ,
1297+ cell_numbering , entity_per_cell )
12911298 elif cell .cellname () == "quadrilateral" :
12921299 from firedrake_citations import Citations
12931300 Citations ().register ("Homolya2016" )
0 commit comments