yasfpy.coupling.cpu_dense ========================= .. py:module:: yasfpy.coupling.cpu_dense .. autoapi-nested-parse:: CPU implementation of the dense coupling matvec. This module implements :class:`yasfpy.coupling.ops.DenseCouplingOps` using the CPU Numba kernels in :mod:`yasfpy.functions.cpu_numba`. It is used when ``numerics.gpu`` is disabled but a dense coupling backend is selected. .. rubric:: Notes The underlying coupling operator follows a VSWF translation formulation commonly used in multiple-scattering approaches :cite:`Waterman-1971-ID50` and in CELES :cite:`Egel-2017-ID1`. Classes ------- .. autoapisummary:: yasfpy.coupling.cpu_dense.CpuDenseCouplingOps Module Contents --------------- .. py:class:: CpuDenseCouplingOps(sim) Bases: :py:obj:`yasfpy.coupling.ops.DenseCouplingOps` CPU dense coupling linear operator. This class provides the dense coupling matvec ``W @ x`` using CPU Numba kernels. :param sim: Simulation instance providing precomputed pairwise lookup tables. .. rubric:: Notes The Numba kernels are sensitive to memory layout; contiguous lookup table buffers are stored for the lifetime of this instance. .. py:method:: matvec(x, idx = None) Compute the dense coupling matvec. :param x: Input array. For multi-wavelength usage, the trailing dimension is the wavelength/channel axis. :param idx: Optional wavelength/channel index. When provided, the computation is restricted to a single channel. :returns: The product ``W @ x``. If ``idx`` is not ``None``, the result is squeezed to drop the singleton channel axis. :rtype: numpy.ndarray