tud_lbm.operators.step

Step operators — implementations of update_timestep protocols.

Public API: build_step_fn()

Implementation modules (_single_phase.py, _multiphase.py, _multiphase_wetting.py) are internal; use the factory to access. Helper modules (_common.py) provide shared logic.

Example

from tud_lbm.operators.step import build_step_fn

step = build_step_fn(“single_phase”) new_state = step(setup, state)

Functions

build_step_fn(→ tud_lbm.operators.protocols.StepOperator)

Return a step operator looked up from the registry.

Package Contents

tud_lbm.operators.step.build_step_fn(scheme: str = 'single_phase') tud_lbm.operators.protocols.StepOperator[source]

Return a step operator looked up from the registry.

Parameters:

scheme – Step operator name (“single_phase”, “multiphase”, “multiphase_wetting”). Defaults to “single_phase”.

Returns:

A callable satisfying the StepOperator protocol, registered under the “update_timestep” kind.

Raises:

ValueError – If scheme is not registered.

Examples

>>> from tud_lbm.operators.step import build_step_fn
>>> step = build_step_fn("single_phase")
>>> new_state = step(setup, state)