Skip to content

Comparing multipatch domains with == raises AttributeError #197

Description

@yguclu

Comparing two multipatch Domain objects with == raises an AttributeError, because MultiPatchMapping has no _name attribute, which Mapping._hashable_content uses.

Reproduced with SymPDE 0.20.0:

from sympde.topology import Domain, Mapping, Square

A = Mapping('FA', dim=2)(Square('A'))
B = Mapping('FB', dim=2)(Square('B'))
D1 = Domain.join([A, B], [((0, 0, 1), (1, 0, -1),  1)], 'Omega')
D2 = Domain.join([A, B], [((0, 0, 1), (1, 0, -1), -1)], 'Omega')

D1 == D2
# AttributeError: 'MultiPatchMapping' object has no attribute '_name'

Expected

Here == should return False, since the interface orientations differ.

Context

In PSYDAC we need to check that a user-given domain matches the domain stored in a geometry file. We currently work around this by comparing patches and interfaces one by one.

Activity

  1. added theissue type on Oct 6, 2026
  2. FrederikSchnack commented on Oct 6, 2026

    @FrederikSchnack
    Contributor

    It seems that this is also fixed with #193 .

  3. linked a pull request that will close this issueUpgrade SymPy #193on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

help wantedExtra attention is needed

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions