bem_app_config_parser Module

TOML風設定ファイルを app_config へ読み込む軽量パーサ。


Uses

  • module~~bem_app_config_parser~~UsesGraph module~bem_app_config_parser bem_app_config_parser ieee_arithmetic ieee_arithmetic module~bem_app_config_parser->ieee_arithmetic module~bem_app_config_types bem_app_config_types module~bem_app_config_parser->module~bem_app_config_types module~bem_constants bem_constants module~bem_app_config_parser->module~bem_constants module~bem_kinds bem_kinds module~bem_app_config_parser->module~bem_kinds module~bem_string_utils bem_string_utils module~bem_app_config_parser->module~bem_string_utils module~bem_types bem_types module~bem_app_config_parser->module~bem_types module~bem_app_config_types->module~bem_kinds module~bem_app_config_types->module~bem_types module~bem_constants->module~bem_kinds iso_fortran_env iso_fortran_env module~bem_kinds->iso_fortran_env module~bem_types->module~bem_kinds

Used by

  • module~~bem_app_config_parser~~UsedByGraph module~bem_app_config_parser bem_app_config_parser module~bem_app_config bem_app_config module~bem_app_config->module~bem_app_config_parser module~bem_app_config_parser_parse_utils bem_app_config_parser_parse_utils module~bem_app_config_parser_parse_utils->module~bem_app_config_parser module~bem_app_config_parser_validate bem_app_config_parser_validate module~bem_app_config_parser_validate->module~bem_app_config_parser module~bem_simulator bem_simulator module~bem_simulator->module~bem_app_config program~main main program~main->module~bem_app_config program~main->module~bem_simulator module~bem_simulator_io bem_simulator_io module~bem_simulator_io->module~bem_simulator module~bem_simulator_loop bem_simulator_loop module~bem_simulator_loop->module~bem_simulator module~bem_simulator_stats bem_simulator_stats module~bem_simulator_stats->module~bem_simulator

Interfaces

interface

  • public pure module function compute_inflow_flux_from_drifting_maxwellian(number_density_m3, temperature_k, m_particle, drift_velocity, inward_normal) result(gamma_in)

    drifting Maxwellian に基づく片側流入束 [1/m^2/s] を返す。

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: number_density_m3
    real(kind=dp), intent(in) :: temperature_k
    real(kind=dp), intent(in) :: m_particle
    real(kind=dp), intent(in) :: drift_velocity(3)
    real(kind=dp), intent(in) :: inward_normal(3)

    Return Value real(kind=dp)

interface

  • public pure module function standard_normal_pdf(x) result(pdf)

    標準正規分布の確率密度関数値を返す。

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: x

    Return Value real(kind=dp)

interface

  • public pure module function standard_normal_cdf(x) result(cdf)

    標準正規分布の累積分布関数値を返す。

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: x

    Return Value real(kind=dp)

interface

  • public pure module function compute_face_area_from_bounds(inject_face, pos_low, pos_high) result(area)

    注入面上矩形開口の面積 [m^2] を計算する。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: inject_face
    real(kind=dp), intent(in) :: pos_low(3)
    real(kind=dp), intent(in) :: pos_high(3)

    Return Value real(kind=dp)

interface

  • public pure module function strip_comment(line) result(out)

    行文字列から # 以降のコメント部分を除去する。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: line

    Return Value character(len=len)

interface

  • public pure module function ends_with(s, suffix) result(ends_it)

    文字列が指定接尾辞で終わるかを判定する。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: s
    character(len=*), intent(in) :: suffix

    Return Value logical

interface

  • public module subroutine resolve_batch_duration(cfg)

    sim.batch_durationsim.batch_duration_step の整合を検証して確定値を反映する。

    Arguments

    Type IntentOptional Attributes Name
    type(app_config), intent(inout) :: cfg

interface

  • public module subroutine validate_reservoir_species(cfg, species_idx)

    reservoir_face 粒子種の入力値を検証し、必要なら w_particle を解決する。

    Arguments

    Type IntentOptional Attributes Name
    type(app_config), intent(inout) :: cfg
    integer, intent(in) :: species_idx

interface

  • public module subroutine validate_photo_raycast_species(cfg, species_idx)

    photo_raycast 粒子種の入力値を検証し、発射方向などを正規化する。

    Arguments

    Type IntentOptional Attributes Name
    type(app_config), intent(inout) :: cfg
    integer, intent(in) :: species_idx

interface

  • public pure module subroutine resolve_face_axes(inject_face, axis_t1, axis_t2)

    注入面名から接線2軸インデックスを返す。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: inject_face
    integer, intent(out) :: axis_t1
    integer, intent(out) :: axis_t2

interface

  • public module subroutine split_key_value(line, key, value)

    key = value 行を分割し、正規化キーと値文字列を返す。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: line
    character(len=*), intent(out) :: key
    character(len=*), intent(out) :: value

interface

  • public module subroutine parse_real(text, out)

    文字列表現を倍精度実数へ変換する。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: text
    real(kind=dp), intent(out) :: out

interface

  • public module subroutine parse_int(text, out)

    文字列表現を integer(i32) へ変換する。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: text
    integer(kind=i32), intent(out) :: out

interface

  • public module subroutine parse_logical(text, out)

    true/false 表現を論理値へ変換する。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: text
    logical, intent(out) :: out

interface

  • public module subroutine parse_string(text, out)

    引用符付き/裸の文字列表現を値へ変換する。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: text
    character(len=*), intent(out) :: out

interface

  • public module subroutine parse_real3(text, out)

    [x,y,z] 形式の3成分ベクトル文字列を配列へ変換する。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: text
    real(kind=dp), intent(out) :: out(3)

interface

  • public module subroutine parse_boundary_mode(text, out)

    境界条件モード文字列を内部定数へ変換する。

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: text
    integer(kind=i32), intent(out) :: out

Subroutines

public subroutine load_app_config(path, cfg)

.toml 拡張子の設定ファイルを読み込み、既存値へ上書き適用する。

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path

読み込む設定ファイルパス(.toml 必須)。

type(app_config), intent(inout) :: cfg

読み込み結果で上書きするアプリ設定。

public subroutine load_toml_config(path, cfg)

最小限の TOML セクションと key = value を解釈して設定へ反映する。 現在は sim / mesh / output / [[mesh.templates]] / [[particles.species]] を扱う。

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path

読み込むTOMLファイルパス。

type(app_config), intent(inout) :: cfg

読み込み結果で更新するアプリ設定。

public subroutine ensure_template_capacity(cfg, required_size)

[[mesh.templates]] の読み込み数に応じてテンプレート配列容量を拡張する。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg

容量拡張対象のアプリ設定。

integer, intent(in) :: required_size

必要最小要素数。

public subroutine ensure_particle_species_capacity(cfg, required_size)

[[particles.species]] の読み込み数に応じて粒子種配列容量を拡張する。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg

容量拡張対象のアプリ設定。

integer, intent(in) :: required_size

必要最小要素数。

public subroutine apply_sim_kv(cfg, line)

[sim] セクションのキーを sim_config へ適用する。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg

更新対象のアプリ設定。

character(len=*), intent(in) :: line

key = value 形式の設定行。

public subroutine apply_particles_kv(line)

[particles] セクションのキーを検証する。

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: line

key = value 形式の設定行。

public subroutine apply_particles_species_kv(spec, line)

[[particles.species]] のキーを粒子種設定へ適用する。

Arguments

Type IntentOptional Attributes Name
type(particle_species_spec), intent(inout) :: spec

更新対象の粒子種設定。

character(len=*), intent(in) :: line

key = value 形式の設定行。

public subroutine apply_mesh_kv(cfg, line)

[mesh] セクションのキーをメッシュ入力設定へ適用する。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg

更新対象のアプリ設定。

character(len=*), intent(in) :: line

key = value 形式の設定行。

public subroutine apply_template_kv(spec, line)

[[mesh.templates]] のキーをテンプレート設定へ適用する。

Arguments

Type IntentOptional Attributes Name
type(template_spec), intent(inout) :: spec

更新対象のテンプレート設定。

character(len=*), intent(in) :: line

key = value 形式の設定行。

public subroutine apply_output_kv(cfg, line)

[output] セクションのキーを出力制御設定へ適用する。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg

更新対象のアプリ設定。

character(len=*), intent(in) :: line

key = value 形式の設定行。