Skip to content

Unify stong/weak forms with type parameter dispatch - #2556

Merged
tapios merged 4 commits into
mainfrom
ts/strong-weak
Jul 30, 2026
Merged

Unify stong/weak forms with type parameter dispatch#2556
tapios merged 4 commits into
mainfrom
ts/strong-weak

Conversation

@tapios

@tapios tapios commented Jul 26, 2026

Copy link
Copy Markdown
Member

Divergence, Gradient, and Curl now take a second type parameter (StrongForm/WeakForm) that factors out the three form-dependent differences (transposed-and-negated derivative matrix, W-weighted input, J vs WJ rescale). The twelve strong/weak apply_operator methods reduce to six; WeakDivergence, WeakGradient, and WeakCurl become backwards-compatibility aliases collected in src/Operators/deprecated.jl for later removal.

  • Results are bitwise identical to the previous implementations, except for the strong divergence (differs by order of operations)
  • All public names and constructors unchanged

@tapios tapios mentioned this pull request Jul 26, 2026
37 tasks
@tapios
tapios marked this pull request as ready for review July 26, 2026 21:51
@tapios
tapios requested a review from dennisYatunin July 26, 2026 21:52
@tapios

tapios commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Needs #2557 before merging, to fix race condition in Datalayouts/scopes.jl.

@dennisYatunin dennisYatunin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for simplifying this! I only have one small comment about code duplication; looks great otherwise.

Comment thread src/Operators/spectralelement.jl Outdated
@tapios
tapios merged commit dc4d295 into main Jul 30, 2026
24 of 32 checks passed
@tapios
tapios deleted the ts/strong-weak branch July 30, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants