zoomy_core.symsolver.numpy_backend.kernels#
The kernels of a NumericalSystemModel in numpy: every entry of nsm.call lambdified once
and evaluated on whole columns (cells or faces) by broadcasting, the numpy counterpart of
zoomy_jax’s vmapped JaxRuntime for the printed solver templates.
Module Contents#
Classes#
One kernel definition lambdified against signature groups; called with one array per
group (column groups |
|
An indexed boundary kernel (a |
|
A cell operator |
|
A numerics face function |
|
Every kernel of |
API#
- class zoomy_core.symsolver.numpy_backend.kernels.Lowered(definition, groups, module)#
One kernel definition lambdified against signature groups; called with one array per group (column groups
(rows, n), scalars otherwise), returnsshape + (n,).Initialization
Lambdify
definitionovergroups(lists of symbols) withmodule.
- class zoomy_core.symsolver.numpy_backend.kernels.Indexed(function, n_state, module)#
An indexed boundary kernel (a
Piecewiseoveridxof state vectors), calledbc(branch, time, position, distance, q, qaux, p, normal)with one branch per column; each branch is evaluated on its own columns only.Initialization
Lambdify every branch of
function(aFunctionwhose definition is thePiecewise).
- class zoomy_core.symsolver.numpy_backend.kernels.Slot(function, sm, module, squeeze)#
A cell operator
k(Q, Qaux, p, *trailing, **named)of a declared signature; the trailing groups bind in declared order or by name,time/dtdefault to 0 andpositionto the origin (asJaxRuntime).Initialization
Lambdify
function(declaredargs); adtthat is also a parameter is dropped.
- class zoomy_core.symsolver.numpy_backend.kernels.Face(function, module)#
A numerics face function
k(qL, qR, aL, aR, p, normal); the_speedvariant returns the two sides and the speed(Wm, Wp, S)(aszoomy_jax’s_face_kernel).Initialization
Lambdify
functionover its six groups.
- class zoomy_core.symsolver.numpy_backend.kernels.NumpyKernels(nsm)#
Every kernel of
nsm.callas a numpy callable, by slot name (Nonewhere empty);aux_derivativesis set by the runtime (the derivative-aux spec).Initialization
Lambdify the call table of
nsm(a NumericalSystemModel).- property parameters#
The current parameter values,
(n_parameters,).