Skip to content

Discretize grid-varying factors on nonlinear and spherical Laplacians - #653

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
utkuyilmaz1903:fix/issue-640-nonlinear-laplacian
Aug 23, 2026
Merged

ChrisRackauckas merged 2 commits into
SciML:masterfrom
utkuyilmaz1903:fix/issue-640-nonlinear-laplacian

Conversation

@utkuyilmaz1903

@utkuyilmaz1903 utkuyilmaz1903 commented Aug 22, 2026 •

Copy link
Copy Markdown
Member

Fixes #640.

generate_nonlinlap_rules and generate_spherical_diffusion_rules splice captured prefactors (~~a/~~b/~~c/~~d) back onto the replacement as-is. Because the rule keys on the whole term, valmaps never sees those factors, so a grid-varying x or u survives into the compiled system and mtkcompile fails.

Same treatment the divisor already had: pass the captured factors through replacevals. Also dropped the now-stale "pointwise path leaves this undiscretized" fallback wording.

Regression cases in equation_discretization.jl for iv/depvar prefactors on both operators.

Tests 08–10 in MOLtest2.jl were @test_broken because the grid-varying prefactor path used to fail. They compile now, so those are @test again.

@utkuyilmaz1903
utkuyilmaz1903 marked this pull request as ready for review August 22, 2026 14:50
@ChrisRackauckas
ChrisRackauckas merged commit ae32ca6 into SciML:master Aug 23, 2026
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.

Grid-varying factors multiplying a nonlinear Laplacian are not discretized

2 participants