Skip to content

Domain should know its physical dimension #203

Open

Description

@yguclu

Problem description

A Domain only knows its logical dimension, dim. It has no ldim or pdim, although its mappings may have a physical dimension larger than the logical one. As a consequence:

Suggested solution

  • Add the properties Domain.ldim and Domain.pdim. pdim is the common physical dimension of the mappings, or ldim for an unmapped domain; it relies on all patches having the same physical dimension, which is checked when the domain is created (Domain.join accepts patches with different physical dimensions #140).
  • Build the physical coordinates from pdim.
  • Use domain.pdim wherever the physical dimension is currently computed from the mappings.
  • Replace dim with ldim everywhere, without keeping dim as an alias: the dim property and the dim constructor argument of the domain classes (BasicDomain, Domain, InteriorDomain, NCube, ...), and their uses in SymPDE. The dim argument of Mapping, a shorthand for ldim = pdim = dim, is kept.

Note

Replacing dim with ldim is a breaking change for the projects that depend on SymPDE:

  • PSYDAC: about 65 uses of .dim on domains.
  • IGA-Python: 10 calls with dim= and 2 uses of .dim in the examples of chapter 1.
  • GeLaTo: 31 calls Domain('Omega', dim=DIM) in its tests.

Building the physical coordinates from pdim also changes the symbolic expressions on mapped domains with pdim > ldim.

Activity

  1. added theissue type on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions