Skip to content

Support nonlinear Laplacians in ArrayDiscretization - #641

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

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

Conversation

@utkuyilmaz1903

Copy link
Copy Markdown
Member

Part of #623

Summary

Adds slice-form support for nonlinear Laplacians Dx(a(u) * Dx(u)) to ArrayDiscretization, mirroring cartesian_nonlinear_laplacian: the coefficient is interpolated to the half-offset points as an interleaved expression over shifted slices, and the outer half-offset derivative combines them with its stencil. The interior collapses to a single array equation whose count does not grow with grid resolution.

Scaling with grid resolution

Dt(u) ~ Dx(u * Dx(u)), 1D, second order:

grid pts scalar eqs array eqs scalar expr nodes array expr nodes scalar t array t speedup
21 21 6 1 653 376 0.04 s 0.02 s 2×
101 101 6 8 613 376 1.2 s 0.05 s 24×
501 501 6 43 413 376 49.4 s 0.44 s 112×

Array equation count and interior expression size are constant in grid resolution; solutions match ScalarizedDiscretization to machine precision (max difference ≤ 9e-16, bitwise-identical in most cases).

Design

  • The five scalar @rule patterns of generate_nonlinlap_rules (prefactors, division forms, divisors) are matched with the same precedence semantics.
  • Band construction accounts for the wider half-offset branch conditions, including higher approximation orders, nonuniform grids and periodic BCs.
  • Equations where a grid-varying factor multiplies the Laplacian fall back to pointwise discretization, keeping parity with the current scalar-path behavior (see Grid-varying factors multiplying a nonlinear Laplacian are not discretized #640).

@ChrisRackauckas

Copy link
Copy Markdown
Member

Rebase

@utkuyilmaz1903
utkuyilmaz1903 force-pushed the feature/array-nonlinear-laplacian branch from a5bffa3 to ca0914b Compare August 19, 2026 00:12
@ChrisRackauckas
ChrisRackauckas merged commit 6502f84 into SciML:master Aug 19, 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