Skip to content

Commit

Permalink
fix StructuredLine fallback boundary names
Browse files Browse the repository at this point in the history
The `StructuredLine` function defines duplicate boundary names as default. When
requesting the boundary of the structured line, an attempt is made to create a
`DisjointUnionTopology`, but this fails because the names are duplicate. This
patch fixes the problem by defining distinct names as default.
  • Loading branch information
joostvanzwieten committed Aug 18, 2021
1 parent ec5af23 commit 284655f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nutils/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ def __init__(self, trans, opposite):

def StructuredLine(root:transform.stricttransformitem, i:types.strictint, j:types.strictint, periodic:bool=False, bnames:types.tuple[types.strictstr]=None):
if bnames is None:
bnames = ('_structured_line_dummy_boundary_name_',) * 2
bnames = '_structured_line_dummy_boundary_left', '_structured_line_dummy_boundary_right'
return StructuredTopology(root, axes=(transformseq.DimAxis(i,j,j if periodic else 0,periodic),), nrefine=0, bnames=(bnames,))

class StructuredTopology(Topology):
Expand Down

0 comments on commit 284655f

Please sign in to comment.