solprop.backends.numba_cpu.envelope_plasma#
Own compiled envelope-current workspaces and their forward transforms.
Functions
|
Compile a deterministic source pass over independent physical nodes. |
Classes
|
Preallocate channel histories, current projection buffers and FFT plans. |
- class solprop.backends.numba_cpu.envelope_plasma.EnvelopeWorkspace(assembly, shape, *, embedded, parallel, flag, threads)[source]#
Bases:
objectPreallocate channel histories, current projection buffers and FFT plans.
- Parameters:
- assemblyEnvelopePlasmaAssembly
Validated channels and spectral multipliers.
- shapetuple of int
Chunk nodes, node components, temporal columns and fine samples.
- embeddedbool
Allocate the additional embedded-rule source projections.
- parallelbool
Parallelise source evaluation across physical nodes.
- flagstr
Existing FFTW planning policy.
- threadsint
Existing modal FFT thread count.
- assemble(destination, crop, *, coarse=False)[source]#
Transform both current streams and add their masked spectral sources.
- Parameters:
- destinationnumpy.ndarray
Ordinary polarisation fine spectrum, updated in place.
- cropnumpy.ndarray
Coarse-to-fine bin mapping.
- coarsebool
Transform embedded spatial projections for the quadrature alarm.
- memory_ledger()[source]#
List each owned array once, including full-width partial-chunk padding.
- Returns:
- dict
Named persistent buffer sizes in bytes; no arrays are allocated by a final partial chunk or an RHS call.
- populations(field, initials, dt, window, output)[source]#
Scan one statistics chunk into preallocated channel/node partials.
- Parameters:
- fieldnumpy.ndarray
Physical V/m envelopes, shape (n_nodes*n_pol, n_to).
- initialstuple of float
Initial fractions in channel order at the requested plane.
- dtfloat
Fine time spacing in s.
- windownumpy.ndarray
Read-only source collar; unused by this statistics specialization.
- outputnumpy.ndarray
Output rows alternate final fraction and peak cycle-averaged rate in s^-1 for each channel, columns are nodes in this chunk.
- Raises:
- ConvergenceError
If angular refinement fails at any node.
- project(projection, embedded, n_modes, *, first, count)[source]#
Accumulate this chunk’s two currents before temporal transformation.
- Parameters:
- projectionnumpy.ndarray
Already scaled projection columns for the active nodes.
- embeddednumpy.ndarray or None
Corresponding embedded-rule projection.
- n_modesint
Output mode count.
- firstbool
Overwrite on the first chunk and accumulate later chunks in order.
- countint
Active node-component rows, including a final partial chunk.
- respond(field, scalars, dt, window)[source]#
Recompute independent channel histories for one current RHS chunk.
- Parameters:
- fieldnumpy.ndarray
Physical V/m fields, rows node*component, columns fine time.
- scalarsStageScalars
Current position’s channel densities and initial populations.
- dtfloat
Fine time spacing in s.
- windownumpy.ndarray
Read-only material-source collar.
- Raises:
- ConvergenceError
If any node fails angular convergence; the driver sees this before a source enters a forward transform.
- solprop.backends.numba_cpu.envelope_plasma.make_source_column(n_pol, *, parallel, statistics=False)[source]#
Compile a deterministic source pass over independent physical nodes.
- Parameters:
- n_polint
Cartesian components per node, one or two.
- parallelbool
Parallelise independent nodes, preserving each temporal scan’s order.
- statisticsbool, optional
Only fill population histories; omit current formation.
- Returns:
- object
Explicitly typed Numba source kernel; all work buffers are supplied.