Skip to content

Test callable diffusion coefficients - #683

Merged
utkuyilmaz1903 merged 1 commit into
SciML:masterfrom
utkuyilmaz1903:test-callable-laplacian-coefficients
Sep 7, 2026
Merged

utkuyilmaz1903 merged 1 commit into
SciML:masterfrom
utkuyilmaz1903:test-callable-laplacian-coefficients

Conversation

@utkuyilmaz1903

Copy link
Copy Markdown
Member

Tests only. A registered function or a network as a diffusion coefficient already stays in array form: inside Dx(a(u) Dx(u)) the nonlinear Laplacian rule evaluates it on the half-point slices, in front of Dxx(u) it is mapped over the interior, and with ModelingToolkitNeuralNets loaded the network is batched in both places. This is the learned-diffusivity pattern for UDEs, and nothing covered it: the existing callable tests use the function as a source term, and the nonlinear Laplacian tests use symbolic coefficients.

interior array eqs
Dx(a(u) Dx(u)), a(u) Dxx(u), a a registered function 1 matches the symbolic 1 + θ[1] u form to 1e-8; 1e-6 through mtkcompile
Dx(a([u, x]) Dx(u)), stacked input 1 1e-8
Dx((1 + NN(u)) Dx(u)), Dx((1 + NN([u, x])) Dx(u)), (1 + NN([u, x])) Dxx(u) 1 batched; matches the point-by-point evaluation to 1e-8

The frame points of a nonlinear Laplacian stay pointwise; the tests check that their number does not change with the grid.

@utkuyilmaz1903
utkuyilmaz1903 marked this pull request as ready for review September 7, 2026 05:41
@utkuyilmaz1903
utkuyilmaz1903 merged commit 4a9327b into SciML:master Sep 7, 2026
72 checks passed
@utkuyilmaz1903
utkuyilmaz1903 deleted the test-callable-laplacian-coefficients branch September 7, 2026 05:41
ChrisRackauckas added a commit that referenced this pull request Sep 7, 2026
- Trim the array-form capability list from MOLFiniteDifference. (#673)
- Stop infinite expansion when a PDE unknown is missing from the system. (#674)
- Support vector-valued functions in ArrayDiscretization (#675)
- Test ModelingToolkitNeuralNets terms and fix the compiled ODE path (#678)
- Add a tutorial on training a neural network term in a PDE (#679)
- Stack vector field inputs and batch network calls in ArrayDiscretization (#680)
- Add a tutorial on learning the Brusselator reaction with a neural network (#681)
- Stack scalar inputs with field slices in ArrayDiscretization (#682)
- Test callable diffusion coefficients (#683)
- Reconstruct array observables once per PDE field (#676)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.

1 participant