@@ -490,7 +490,7 @@ class AbstractMeshTopology(object, metaclass=abc.ABCMeta):
490490 """A representation of an abstract mesh topology without a concrete
491491 PETSc DM implementation"""
492492
493- def __init__ (self , topology_dm , name , reorder , sfXB , perm_is , distribution_name , permutation_name , comm , submesh_parent = None ):
493+ def __init__ (self , topology_dm , name , reorder , perm_is , distribution_name , permutation_name , comm , submesh_parent = None ):
494494 """Initialise a mesh topology.
495495
496496 Parameters
@@ -501,11 +501,6 @@ def __init__(self, topology_dm, name, reorder, sfXB, perm_is, distribution_name,
501501 Name of the mesh topology.
502502 reorder : bool
503503 Whether to reorder the mesh entities.
504- sfXB : PETSc.PetscSF
505- `PETSc.SF` that pushes forward the global point number
506- slab ``[0, NX)`` to input (naive) plex (only significant when
507- the mesh topology is loaded from file and only passed from inside
508- `~.CheckpointFile`).
509504 perm_is : PETSc.IS
510505 `PETSc.IS` that is used as ``_dm_renumbering``; only
511506 makes sense if we know the exact parallel distribution of ``plex``
@@ -526,10 +521,6 @@ def __init__(self, topology_dm, name, reorder, sfXB, perm_is, distribution_name,
526521 topology_dm .setFromOptions ()
527522 self .topology_dm = topology_dm
528523 r"The PETSc DM representation of the mesh topology."
529- self .sfBC = None
530- r"The PETSc SF that pushes the input (naive) plex to current (good) plex."
531- self .sfXB = sfXB
532- r"The PETSc SF that pushes the global point number slab [0, NX) to input (naive) plex."
533524 self .submesh_parent = submesh_parent
534525 # User comm
535526 self .user_comm = comm
@@ -540,8 +531,6 @@ def __init__(self, topology_dm, name, reorder, sfXB, perm_is, distribution_name,
540531 self ._grown_halos = False
541532 if self .comm .size > 1 :
542533 self ._add_overlap ()
543- if self .sfXB is not None :
544- self .sfXC = sfXB .compose (self .sfBC ) if self .sfBC else self .sfXB
545534 dmcommon .label_facets (self .topology_dm )
546535 dmcommon .complete_facet_labels (self .topology_dm )
547536 # TODO: Allow users to set distribution name if they want to save
@@ -1067,7 +1056,6 @@ def __init__(
10671056 name ,
10681057 reorder ,
10691058 distribution_parameters ,
1070- sfXB = None ,
10711059 perm_is = None ,
10721060 distribution_name = None ,
10731061 permutation_name = None ,
@@ -1086,11 +1074,6 @@ def __init__(
10861074 Whether to reorder the mesh entities.
10871075 distribution_parameters : dict
10881076 Options controlling mesh distribution; see `Mesh` for details.
1089- sfXB : PETSc.PetscSF
1090- `PETSc.SF` that pushes forward the global point number
1091- slab ``[0, NX)`` to input (naive) plex (only significant when
1092- the mesh topology is loaded from file and only passed from inside
1093- `~.CheckpointFile`).
10941077 perm_is : PETSc.IS
10951078 `PETSc.IS` that is used as ``_dm_renumbering``; only
10961079 makes sense if we know the exact parallel distribution of ``plex``
@@ -1121,7 +1104,7 @@ def __init__(
11211104 # Disable auto distribution and reordering before setFromOptions is called.
11221105 plex .distributeSetDefault (False )
11231106 plex .reorderSetDefault (PETSc .DMPlex .ReorderDefaultFlag .FALSE )
1124- super ().__init__ (plex , name , reorder , sfXB , perm_is , distribution_name , permutation_name , comm , submesh_parent = submesh_parent )
1107+ super ().__init__ (plex , name , reorder , perm_is , distribution_name , permutation_name , comm , submesh_parent = submesh_parent )
11251108
11261109 def _distribute (self ):
11271110 # Distribute/redistribute the dm to all ranks
@@ -1132,9 +1115,8 @@ def _distribute(self):
11321115 # refine this mesh in parallel. Later, when we actually use
11331116 # it, we grow the halo.
11341117 original_name = plex .getName ()
1135- sfBC = plex .distribute (overlap = 0 )
1118+ _ = plex .distribute (overlap = 0 )
11361119 plex .setName (original_name )
1137- self .sfBC = sfBC
11381120 # plex carries a new dm after distribute, which
11391121 # does not inherit partitioner from the old dm.
11401122 # It probably makes sense as chaco does not work
@@ -1150,17 +1132,15 @@ def _add_overlap(self):
11501132 elif overlap_type in [DistributedMeshOverlapType .FACET , DistributedMeshOverlapType .RIDGE ]:
11511133 dmcommon .set_adjacency_callback (self .topology_dm , overlap_type )
11521134 original_name = self .topology_dm .getName ()
1153- sfBC = self .topology_dm .distributeOverlap (overlap )
1135+ _ = self .topology_dm .distributeOverlap (overlap )
11541136 self .topology_dm .setName (original_name )
1155- self .sfBC = self .sfBC .compose (sfBC ) if self .sfBC else sfBC
11561137 dmcommon .clear_adjacency_callback (self .topology_dm )
11571138 self ._grown_halos = True
11581139 elif overlap_type == DistributedMeshOverlapType .VERTEX :
11591140 # Default is FEM (vertex star) adjacency.
11601141 original_name = self .topology_dm .getName ()
1161- sfBC = self .topology_dm .distributeOverlap (overlap )
1142+ _ = self .topology_dm .distributeOverlap (overlap )
11621143 self .topology_dm .setName (original_name )
1163- self .sfBC = self .sfBC .compose (sfBC ) if self .sfBC else sfBC
11641144 self ._grown_halos = True
11651145 else :
11661146 raise ValueError ("Unknown overlap type %r" % overlap_type )
@@ -2025,7 +2005,7 @@ def __init__(self, swarm, parentmesh, name, reorder, input_ordering_swarm=None,
20252005 "overlap_type" : (DistributedMeshOverlapType .NONE , 0 )}
20262006 self .input_ordering_swarm = input_ordering_swarm
20272007 self ._parent_mesh = parentmesh
2028- super ().__init__ (swarm , name , reorder , None , perm_is , distribution_name , permutation_name , parentmesh .comm )
2008+ super ().__init__ (swarm , name , reorder , perm_is , distribution_name , permutation_name , parentmesh .comm )
20292009
20302010 def _distribute (self ):
20312011 pass
0 commit comments