zoomy_amrex.symkernels#
Device kernels of the symbolic solvers on AMReX: one struct <system>_t per system with a
static constexpr functor per kernel the printed solver references (nsm.source is
nsm_t::source). The kernels are the system’s call table (the functions JAX lambdifies and
foam prints) in AMReX syntax, AMREX_GPU_HOST_DEVICE operators on amrex::SmallMatrix.
Module Contents#
Classes#
AMReX syntax of the kernel bodies ( |
Functions#
Kernel family of the |
|
Kernel names |
|
Write |
Data#
API#
- zoomy_amrex.symkernels.FAMILY#
None
- zoomy_amrex.symkernels.family(f)#
Kernel family of the
Functionf(face, bc, recon, normal or cell), from its argument groups.
- class zoomy_amrex.symkernels.AmrexKernelPrinter(*args, **kwargs)#
Bases:
zoomy_core.transformation.to_amrex.AmrexCore,zoomy_core.transformation.generic_c.GenericCppBaseAMReX syntax of the kernel bodies (
AmrexCoreplus the opaque calls ofAmrexNumericsPrinter), with symbol maps from each kernel’s own argument groups.Initialization
Initialize the instance.
- c_functions#
None
- kernel(f, sizes)#
Print
struct <name>_kand its constexpr instance for theFunctionf. Every kernel of a family takes the family’s full argument list and ignores what it does not declare.Args
sizes: entries per argument group of the system.
Returns
The C++ text.
- zoomy_amrex.symkernels.referenced(source, system)#
Kernel names
<system>.<name>used by the printed solver.
- zoomy_amrex.symkernels.write_kernels(systems, source, path, dimension, classes=None)#
Write
Kernels.Htopath:struct <name>_tand its constexpr instance for each(name, nsm)insystems, with the kernelssourceuses.Args
classes:{(name, "state"): closure class per state row}(the topology’slsq_closure_class), the 6th int of eachaux_derivativesentry; -1 without a closure.
Returns
path.