Skip to content

Support spherical Laplacians in ArrayDiscretization - #644

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
utkuyilmaz1903:feature/array-spherical-laplacian
Aug 20, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
utkuyilmaz1903:feature/array-spherical-laplacian

Conversation

@utkuyilmaz1903

Copy link
Copy Markdown
Member

Part of #623. Stacked on #641.

Summary

Adds slice-form support for spherical Laplacians r^-2 Dr(r^2 Dr(u)) to ArrayDiscretization. The standard writing goes through the existing half-offset nonlinear Laplacian (r^2 interpolated at half-offset points, outer r^-2 a broadcast divide). The bare divided form, where the scalar spherical scheme wins, uses array_spherical_diffusion: a * (Dr(u)/r + nllap(a)). The interior stays a single array equation; count does not grow with grid resolution. r ≈ 0 stays on the scalar appendix-B branch.

Scaling with grid resolution

Dt(u) ~ Dr(r^2 * Dr(u)) / r^2, 1D, second order:

grid pts scalar eqs array eqs scalar expr nodes array expr nodes scalar t array t speedup
21 21 6 790 261 0.12 s 0.07 s 1.7×
101 101 6 3 990 501 1.6 s 0.12 s 14×
501 501 6 19 990 1 701 73.7 s 0.74 s 99×

Array equation count is constant. Solutions match ScalarizedDiscretization.

Design

@utkuyilmaz1903
utkuyilmaz1903 marked this pull request as ready for review August 18, 2026 16:51
@utkuyilmaz1903
utkuyilmaz1903 marked this pull request as draft August 18, 2026 16:51
@ChrisRackauckas

Copy link
Copy Markdown
Member

Reasonable but needs a rebase.

@utkuyilmaz1903
utkuyilmaz1903 force-pushed the feature/array-spherical-laplacian branch from ad0be36 to 32b6e15 Compare August 20, 2026 06:34
@utkuyilmaz1903
utkuyilmaz1903 marked this pull request as ready for review August 20, 2026 06:37
@utkuyilmaz1903

utkuyilmaz1903 commented Aug 20, 2026 •

Copy link
Copy Markdown
Member Author

@ChrisRackauckas Rebased.

@ChrisRackauckas
ChrisRackauckas merged commit 7d284d4 into SciML:master Aug 20, 2026
67 of 69 checks passed
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.

2 participants