tud_lbm.operators.factory
Unified operator factory — single source of truth for operator lookup.
This module provides a generic factory function that resolves operator names to their implementations using the central registry. All operator-specific factories (in collision/, streaming/, etc) delegate to this generic factory.
Example
- def build_collision_fn(scheme: str) -> CollisionOperator:
return build_operator(“collision_models”, scheme)
Functions
|
Resolve operator name to implementation. |
Module Contents
- tud_lbm.operators.factory.build_operator(kind: str, scheme: str) tud_lbm.registry.OperatorTarget[source]
Resolve operator name to implementation.
This is the single source of truth for operator factory logic. All operator-specific factories delegate to this function.
- Parameters:
kind – Operator kind (“collision_models”, “stream”, “equilibrium”, etc)
scheme – Operator name within that kind (“bgk”, “standard”, “wb”, etc)
- Returns:
The operator function/class satisfying the protocol
- Return type:
- Raises:
ValueError – If kind is not registered or scheme is unknown
Example
>>> op = build_operator("collision_models", "bgk") >>> result = op(f, feq, tau)