solprop.backends.numba_cpu.field_plasma#
Own the held field-current streams, transforms and frequency assembly.
Classes
|
Allocate the field-current streams and plan their transforms once. |
- class solprop.backends.numba_cpu.field_plasma.HeldWorkspace(problem, shape, *, embedded, flag, threads)[source]#
Bases:
objectAllocate the field-current streams and plan their transforms once.
Modal and planar routes project both products before their temporal FFTs. Radial routes transform three nodal streams, combine and crop them, then make one real projection on interleaved spectral components. Cartesian and line routes combine on physical nodes before the transverse transform.
- Parameters:
- problemsolprop.translate.problem.KernelProblem
Validated field-grid problem with plasma channels.
- shapetuple of int
Chunk node-component rows and temporal transform rows.
- embeddedbool
Whether the modal quadrature has an embedded projection for its alarm.
- flagstr
Existing FFTW planning policy.
- threadsint
Existing temporal FFT thread count.
- assemble(destination, *, coarse=False)[source]#
Transform projected currents and add their active-bin polarisation.
- Parameters:
- destinationnumpy.ndarray
Fine non-plasma polarisation spectrum, updated in place.
- coarsebool
Use the embedded quadrature’s projected current streams.
- memory_ledger()[source]#
List every owned buffer and the measured transform-plan heap growth.
- Returns:
- dict
Persistent bytes, including partial-chunk padding and embedded rows.
- products(gate, slope, count)[source]#
Write both complete current products and clear unused chunk rows.
- Parameters:
- gate, slopenumpy.ndarray
Fine-grid temporal collar and its analytic derivative, in 1 and s⁻¹.
- countint
Populated node-component rows; rows beyond this are padding.
- project(projection, embedded, n_modes, *, first, count)[source]#
Project each current product onto modal rows before transformation.
- Parameters:
- projectionnumpy.ndarray
Scaled projection for this chunk.
- embeddednumpy.ndarray or None
Scaled embedded-rule projection of the same nodes.
- n_modesint
Propagated modes, before the separate state-component axis.
- firstbool
Overwrite the output on the first chunk; accumulate later chunks.
- countint
Active node-component rows.
- project_radial(polarisation, projection, destination, *, first, count)[source]#
Transform nodal P, gJ and g’J, combine, then project once in frequency.
- Parameters:
- polarisationnumpy.ndarray
This chunk’s collared non-plasma polarisation.
- projectionnumpy.ndarray
Scaled real radial projection for the current nodes.
- destinationnumpy.ndarray
Full modal fine spectrum, accumulated at the coarse bins.
- firstbool
Clear the whole destination before the first chunk.
- countint
Populated node-component rows.