Skip to content

Add option logical to the projectors of the discrete de Rham sequences - #639

Open
yguclu wants to merge 6 commits into
develfrom
yguclu-logical-projectors
Open

yguclu wants to merge 6 commits into
develfrom
yguclu-logical-projectors

Conversation

@yguclu

@yguclu yguclu commented Nov 2, 2026

Copy link
Copy Markdown
Member

Add the keyword-only argument logical=False to DiscreteDeRham.projectors and MultipatchDiscreteDeRham.projectors (fixes #153). On a mapped domain, the projectors act on functions of the physical coordinates, which are pulled back to the logical domain before the projection. With logical=True, they act directly on functions of the logical coordinates, so that the result does not depend on the mapping. This is useful when the function is only known in the logical coordinates, and the inverse mapping is not available. The default behavior is unchanged.

  • DiscreteDeRham.projectors(..., logical=True) returns the projectors without the pull-back, in 1D, 2D and 3D
  • MultipatchDiscreteDeRham.projectors(..., logical=True) returns the patch-wise projectors without the pull-back; they act on a list of functions of the logical coordinates, one per patch
  • Pass nquads to the projector of the H1 vector space in 3D, as already done in 2D
  • Use the same default nquads in MultipatchDiscreteDeRham.projectors as in DiscreteDeRham.projectors, i.e. the maximum degree of the H1 space plus one, as in the assembly of forms; before, calling it without nquads raised a ValueError
  • New unit tests in psydac/api/tests/test_feec.py: with logical=True, the projections on a mapped domain (affine mapping in 1D, 2D and 3D, polar mappings on two patches) are identical to those on the same domain without mapping, while the default projections differ

@codacy-production

codacy-production Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 14 complexity · 0 duplication

Metric Results
Complexity 14
Duplication 0

View in Codacy

🟢 Coverage 98.31% diff coverage · +0.03% coverage variation

Metric Results
Coverage variation ✅ +0.03% coverage variation
Diff coverage ✅ 98.31% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (2f50395) 52575 33687 64.07%
Head commit (38f41fe) 105238 (+52663) 67458 (+33771) 64.10% (+0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#639) 59 58 98.31%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@yguclu
yguclu marked this pull request as ready for review November 23, 2026 22:50

This branch has not been deployed

No deployments
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 this pull request may close these issues.

Projection result changes when mapping changes

1 participant