vdist-solver-fortran
Lang: 日本語 | English
Fortran で実装した速度分布ソルバを Python から利用するためのパッケージです。
コアは EMSES 計算結果の上でバックトレース (時間逆行) と、境界に紐付けた
ソース分布 (Maxwellian、raycast 光電子、吸収) を組み合わせて位相空間
確率密度を評価します。共有ライブラリを ctypes ラッパ経由で Python
から駆動する構成です。
確率・octree・dust current の並列評価には、非ゼロ場でのビット再現性回帰テストが
あります。Intel 版は -qopenmp -fp-model precise を使います。
並列実行とコンパイラの説明 および
autorange モーメントの許容誤差 を参照してください。
斜め磁場での Maxwellian 源は磁場基準の熱速度分布を回転して評価します。 衝突時刻は実際のステップ時間で補間し、速度範囲推定は周期境界をまたぐ 軌道の折り返し前の変位を使います。詳細は 物理モデル と 速度範囲自動推定 を参照してください。
tier-2 の速度範囲は field bundle を再利用でき、write_range_batch →
vdsolverf-batch → read_range_batch_results で計算時の Python を省けます。
bundle と batch の使用例を参照してください。
放出パッチは curf/curfs の密度を含み、境界 Maxwellian と raycast 源は係数が
密度 1 です。源の規格化に従って電流へ換算してください。
必要環境
gfortranmakefpm- Python 3.7 以上 (開発は
.venv/内の 3.12 で実施)
インストール
PyPI からのインストールを推奨します。pip のビルド中に make install が
走り、Fortran 共有ライブラリをビルドして Python package に同梱します。
python -m pip install -U pip setuptools wheel
python -m pip install vdist-solver-fortran
開発版を GitHub から直接入れることもできます。
python -m pip install "git+https://github.com/Nkzono99/vdist-solver-fortran.git"
pip 経由のビルドでは既定で INSTALL_PROFILE=auto を使います。必要なら
INSTALL_PROFILE=generic や INSTALL_PROFILE=camphor を環境変数で
指定してください。
INSTALL_PROFILE=generic python -m pip install vdist-solver-fortran
クイックスタート
import emout
from vdsolverf.core import Particle
from vdsolverf.emses import get_backtrace
data = emout.Emout("EMSES-simulation-directory")
ts, probability, positions, velocities = get_backtrace(
directory=data.directory,
ispec=0, # 0 電子, 1 イオン, 2 光電子
istep=-1,
particle=Particle([32, 32, 400], [0, 0, -10]),
dt=data.inp.dt,
max_step=300_000,
output_interval=1,
use_adaptive_dt=False,
use_electric_field=True, # False にすると電場を無効化
use_magnetic_field=True, # False にすると背景磁場を含む磁場を無効化
)
この2つのキーワード引数は逆追跡・確率計算・速度範囲推定、および MPI 版で 共通です。既定では両方有効です。無効化した場の出力ファイルは不要です。 逆追跡は MPIEMSES3D の通常の Boris 更新を逆の順序でたどります。 磁場回転と往復性の条件は 物理モデル を参照。
光電子の評価には EMSES の namelist /emissn/ に use_raycast = .true.
を設定する必要があります。詳細は
Namelist リファレンス を参照。
ドキュメント
| ドキュメント | 概要 |
|---|---|
| 使用方法 | Python レシピ集: 単一/多粒子バックトレース、位相空間確率 |
| 速度空間 Octree 確率ソルバ | adaptive/sparse な速度空間探索、アルゴリズム、実行方法、sample/leaf 出力 |
| ダスト帯電電流モーメント | Fortran OML 積分、field bundle、ctypes API、再開可能な serial/MPI batch |
| 速度範囲自動推定 | セルごとの速度範囲推定、validation、diagnostics |
| Namelist リファレンス | サポートしている plasma.inp のグループとパラメータ |
| 物理モデル | リウビル定理、Maxwellian 放出、raycast 光電子 |
| アーキテクチャ | Fortran / Python レイアウト、モジュール依存、拡張ポイント |
| 開発ガイド | ビルド、テスト、貢献手順 |
サンプルノートブック
ライセンス
Apache License 2.0。詳細は LICENSE。
Metadata
Release files for vdist-solver-fortran 1.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vdist_solver_fortran-1.8.1.tar.gz | 196.5 kB | With provenance | Details for vdist_solver_fortran-1.8.1.tar.gz |
Release files / vdist_solver_fortran-1.8.1.tar.gz
| Download URL | vdist_solver_fortran-1.8.1.tar.gz |
|---|---|
| Size | 196.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b38658dcc8cb0d762fa20583888e1906860dd9f883201766a3839ba8f7bba9a3
|
|
BLAKE2b-256 checksum How to use checksums |
e04952f5c4bbf6a6e6afc783b5f21498c47f524123f4345c966c64790e035ad3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for vdist-solver-fortran 1.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 1 file in this release has been uploaded with provenance metadata.
Attestation for vdist_solver_fortran-1.8.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.