@@ -486,7 +486,7 @@ class AbstractMeshTopology(object, metaclass=abc.ABCMeta):
486486 """A representation of an abstract mesh topology without a concrete
487487 PETSc DM implementation"""
488488
489- def __init__ (self , topology_dm , name , reorder , sfXB , perm_is , distribution_name , permutation_name , comm , submesh_parent = None ):
489+ def __init__ (self , topology_dm , name , reorder , perm_is , distribution_name , permutation_name , comm , submesh_parent = None ):
490490 """Initialise a mesh topology.
491491
492492 Parameters
@@ -497,11 +497,6 @@ def __init__(self, topology_dm, name, reorder, sfXB, perm_is, distribution_name,
497497 Name of the mesh topology.
498498 reorder : bool
499499 Whether to reorder the mesh entities.
500- sfXB : PETSc.PetscSF
501- `PETSc.SF` that pushes forward the global point number
502- slab ``[0, NX)`` to input (naive) plex (only significant when
503- the mesh topology is loaded from file and only passed from inside
504- `~.CheckpointFile`).
505500 perm_is : PETSc.IS
506501 `PETSc.IS` that is used as ``_dm_renumbering``; only
507502 makes sense if we know the exact parallel distribution of ``plex``
@@ -522,10 +517,6 @@ def __init__(self, topology_dm, name, reorder, sfXB, perm_is, distribution_name,
522517 topology_dm .setFromOptions ()
523518 self .topology_dm = topology_dm
524519 r"The PETSc DM representation of the mesh topology."
525- self .sfBC = None
526- r"The PETSc SF that pushes the input (naive) plex to current (good) plex."
527- self .sfXB = sfXB
528- r"The PETSc SF that pushes the global point number slab [0, NX) to input (naive) plex."
529520 self .submesh_parent = submesh_parent
530521 # User comm
531522 self .user_comm = comm
@@ -536,8 +527,6 @@ def __init__(self, topology_dm, name, reorder, sfXB, perm_is, distribution_name,
536527 self ._grown_halos = False
537528 if self .comm .size > 1 :
538529 self ._add_overlap ()
539- if self .sfXB is not None :
540- self .sfXC = sfXB .compose (self .sfBC ) if self .sfBC else self .sfXB
541530 dmcommon .label_facets (self .topology_dm )
542531 dmcommon .complete_facet_labels (self .topology_dm )
543532 # TODO: Allow users to set distribution name if they want to save
@@ -1057,7 +1046,6 @@ def __init__(
10571046 name ,
10581047 reorder ,
10591048 distribution_parameters ,
1060- sfXB = None ,
10611049 perm_is = None ,
10621050 distribution_name = None ,
10631051 permutation_name = None ,
@@ -1076,11 +1064,6 @@ def __init__(
10761064 Whether to reorder the mesh entities.
10771065 distribution_parameters : dict
10781066 Options controlling mesh distribution; see `Mesh` for details.
1079- sfXB : PETSc.PetscSF
1080- `PETSc.SF` that pushes forward the global point number
1081- slab ``[0, NX)`` to input (naive) plex (only significant when
1082- the mesh topology is loaded from file and only passed from inside
1083- `~.CheckpointFile`).
10841067 perm_is : PETSc.IS
10851068 `PETSc.IS` that is used as ``_dm_renumbering``; only
10861069 makes sense if we know the exact parallel distribution of ``plex``
@@ -1111,7 +1094,7 @@ def __init__(
11111094 # Disable auto distribution and reordering before setFromOptions is called.
11121095 plex .distributeSetDefault (False )
11131096 plex .reorderSetDefault (PETSc .DMPlex .ReorderDefaultFlag .FALSE )
1114- super ().__init__ (plex , name , reorder , sfXB , perm_is , distribution_name , permutation_name , comm , submesh_parent = submesh_parent )
1097+ super ().__init__ (plex , name , reorder , perm_is , distribution_name , permutation_name , comm , submesh_parent = submesh_parent )
11151098
11161099 def _distribute (self ):
11171100 # Distribute/redistribute the dm to all ranks
@@ -1122,9 +1105,8 @@ def _distribute(self):
11221105 # refine this mesh in parallel. Later, when we actually use
11231106 # it, we grow the halo.
11241107 original_name = plex .getName ()
1125- sfBC = plex .distribute (overlap = 0 )
1108+ _ = plex .distribute (overlap = 0 )
11261109 plex .setName (original_name )
1127- self .sfBC = sfBC
11281110 # plex carries a new dm after distribute, which
11291111 # does not inherit partitioner from the old dm.
11301112 # It probably makes sense as chaco does not work
@@ -1140,17 +1122,15 @@ def _add_overlap(self):
11401122 elif overlap_type in [DistributedMeshOverlapType .FACET , DistributedMeshOverlapType .RIDGE ]:
11411123 dmcommon .set_adjacency_callback (self .topology_dm , overlap_type )
11421124 original_name = self .topology_dm .getName ()
1143- sfBC = self .topology_dm .distributeOverlap (overlap )
1125+ _ = self .topology_dm .distributeOverlap (overlap )
11441126 self .topology_dm .setName (original_name )
1145- self .sfBC = self .sfBC .compose (sfBC ) if self .sfBC else sfBC
11461127 dmcommon .clear_adjacency_callback (self .topology_dm )
11471128 self ._grown_halos = True
11481129 elif overlap_type == DistributedMeshOverlapType .VERTEX :
11491130 # Default is FEM (vertex star) adjacency.
11501131 original_name = self .topology_dm .getName ()
1151- sfBC = self .topology_dm .distributeOverlap (overlap )
1132+ _ = self .topology_dm .distributeOverlap (overlap )
11521133 self .topology_dm .setName (original_name )
1153- self .sfBC = self .sfBC .compose (sfBC ) if self .sfBC else sfBC
11541134 self ._grown_halos = True
11551135 else :
11561136 raise ValueError ("Unknown overlap type %r" % overlap_type )
0 commit comments