tud_lbm.operators.streaming
Streaming operators — implementations of StreamingOperator protocol.
Public API: build_streaming_fn()
Implementation modules (_streaming.py) are internal; use the factory to access.
Example
from operators.streaming import build_streaming_fn
stream_op = build_streaming_fn(“standard”) f_streamed = stream_op(f, lattice)
Functions
|
Return a streaming operator satisfying StreamingOperator protocol. |
Package Contents
- tud_lbm.operators.streaming.build_streaming_fn(scheme: str = 'standard', bc_config: dict | None = None) tud_lbm.operators.protocols.StreamingOperator[source]
Return a streaming operator satisfying StreamingOperator protocol.
- Parameters:
scheme – Streaming model name (“standard” or others). Defaults to “standard” (pull-style streaming).
bc_config – Boundary-condition config used to determine which axes are non-periodic.
Nonemeans fully periodic — no zero-fill.
- Returns:
A callable
(f, lattice) -> f_streamedsatisfying StreamingOperator. The bc_config is bound in a thin closure so all call sites keep the two-argument signaturestreaming_fn(f, lattice).- Type-checkers see this as a StreamingOperator, so:
op: StreamingOperator = build_streaming_fn(“standard”)
Type-checkers will verify any use of op matches the protocol.
- Raises:
ValueError – If scheme is not registered.
Examples
>>> from tud_lbm.operators.streaming import build_streaming_fn >>> stream = build_streaming_fn("standard", bc_config={"top": "bounce-back"}) >>> f_streamed = stream(f, lattice)