Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify Domain behavior for single and multi-patch cases #171

Closed
yguclu opened this issue Feb 21, 2025 · 1 comment · Fixed by #173
Closed

Unify Domain behavior for single and multi-patch cases #171

yguclu opened this issue Feb 21, 2025 · 1 comment · Fixed by #173

Comments

@yguclu
Copy link
Member

yguclu commented Feb 21, 2025

In Psydac it is difficult to use a Domain object in the single and multi-patch cases without handling lots of corner cases with if statements. One reason is that domain.interior.args returns objects of different types:

  • for a multi-patch domain: the subdomains as a tuple of logical domains
  • for a single patch domain: the name of the unique subdomain (the domain itself), as a tuple of strings,

This is probably because domain.interior is a Union of subdomains.

To fix this without changing how Unions are handled in SymPDE, we could add a function/attribute domain.subdomains which always returns the subdomains as a tuple of logical domains.

@campospinto
Copy link
Collaborator

This is done in PR #173 (with a couple of other things)

yguclu added a commit that referenced this issue Mar 5, 2025
In order to improve the compatibility between single and multi-patch
domains, we add:

- `subdomains` and `mappings` attributes to the `Domain` class, which
always return a tuple (fixes #171);
- the possibility of calling the `join` function (which usually creates
multipatch domains) with a single patch.

We also increase the library version to 0.19.1.

---------

Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants