実行コンテキストと native kernel¶
Beach.context は実行結果と設定の解決を保持します。
Beach.kernel() から受け取る kernel はセッションが所有します。
field_kernel_from_result で作る場合は呼び出し側が閉じます。
- class beach.analysis.context.RunContext(result, requested_config_path=None)[ソース]¶
Resolved run plus lazily loaded, cached nearby configuration.
- パラメータ:
result (RunResult)
requested_config_path (Path | None)
- classmethod from_value(value, *, config_path=None)[ソース]¶
Return the context of a result, a context, or a
Beachsession.A
Beachcontributes its ownBeach.context, so its config path and cached config carry over. An explicitconfig_pathreplaces the inherited one.- パラメータ:
value (RunResult | object)
config_path (str | Path | None)
- 戻り値の型:
- beach.analysis.field_kernel.field_kernel_from_result(result, *, step=-1, periodic2=None, theta=None, leaf_max=None, order=None, config_path=None, library_path=None)[ソース]¶
Build a native kernel from one BEACH output directory (heavy).
The kernel holds the run's panels with the
stepcharges (-1latest history snapshot,Nonefinalcharges.csv). The caller owns it and closes it;beach.Beach.kernel()returns a session-owned, cached one instead.- パラメータ:
result (RunResult | object)
step (int | None)
periodic2 (Mapping[str, object] | None)
theta (float | None)
leaf_max (int | None)
order (int | None)
config_path (str | Path | None)
library_path (str | Path | None)
- 戻り値の型:
- class beach.native.periodic2.Periodic2Config(axes, lengths, origins, image_layers, far_correction, ewald_alpha, ewald_layers)[ソース]¶
Validated periodic2 settings with legacy tuple compatibility.
- パラメータ:
axes (tuple[int, int])
lengths (tuple[float, float])
origins (tuple[float, float])
image_layers (int)
far_correction (str)
ewald_alpha (float)
ewald_layers (int)
- axes: tuple[int, int]¶
Alias for field number 0
- lengths: tuple[float, float]¶
Alias for field number 1
- origins: tuple[float, float]¶
Alias for field number 2
- image_layers: int¶
Alias for field number 3
- far_correction: str¶
Alias for field number 4
- ewald_alpha: float¶
Alias for field number 5
- ewald_layers: int¶
Alias for field number 6