zoomy_core.model.basefunction#
Module zoomy_core.model.basefunction.
Module Contents#
Classes#
Function. (class). |
|
A registered function used as a VALUE (e.g. handed to a solver block
that maps it over cells or faces): printed as |
|
An entry of a registrar’s |
|
SymbolicRegistrar. (class). |
Functions#
Listify. |
|
The opaque call |
API#
- zoomy_core.model.basefunction.listify(expr)#
Listify.
- class zoomy_core.model.basefunction.Function(**params)#
Bases:
param.ParameterizedFunction. (class).
Initialization
Initialize the instance.
- name#
‘String(…)’
- args#
‘ClassSelector(…)’
- definition#
‘Parameter(…)’
- property is_empty#
True when there is no definition, an empty array, or every entry is identically zero (a zero kernel contributes nothing).
- class zoomy_core.model.basefunction.KernelRef#
Bases:
sympy.SymbolA registered function used as a VALUE (e.g. handed to a solver block that maps it over cells or faces): printed as
<owner>.<name>; the backend resolves the name to its compiled kernel.- property owner#
- property slot#
- zoomy_core.model.basefunction.placeholder_call(full_name, definition, *input_args)#
The opaque call
full_name(*args)standing for a registered function: one element read per entry when the definition is an array. The printer emits it as a call, or splices the definition back in (resolve_opaque). No arguments -> the definition itself.
- class zoomy_core.model.basefunction.KernelCall(owner, functions, name, call_name=None)#
An entry of a registrar’s
callnamespace; wraps one registeredFunction(looked up by name, so a refreshed registry is seen).called with symbolic arguments -> the placeholder call;
used as a value in a sympy expression -> the printable reference
KernelRef('<owner>.<name>')(sympy’s_sympy_hook). This is how a solver template hands a kernel to a block.
Initialization