bem_app_config_parser Module

TOML設定ファイルを toml-f で読み込み、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_authoring bem_app_config_authoring module~bem_app_config_parser->module~bem_app_config_authoring 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 tomlf tomlf module~bem_app_config_parser->tomlf module~bem_app_config_authoring->ieee_arithmetic module~bem_app_config_authoring->module~bem_app_config_types module~bem_app_config_authoring->module~bem_kinds module~bem_app_config_authoring->module~bem_string_utils 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_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 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 resolve_external_e_field(cfg)

    sim.e0 または sim.e0_abs + angle 指定を内部ベクトルへ正規化する。

    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

Functions

public pure function has_suffix(s, suffix)

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

Arguments

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

Return Value logical

public function config_uses_conductor_surface_model(cfg) result(uses_conductor)

現在のメッシュ入力設定が conductor 表面を生成し得るかを返す。

Arguments

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

Return Value logical


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 文書を toml-f で解釈して設定へ反映する。 現在は 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 apply_toml_document(cfg, document, authoring)

toml-f のルートテーブルから既知セクションを読み込む。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg
type(toml_table), intent(inout) :: document
type(app_config_authoring), intent(inout) :: authoring

public subroutine require_toml_success(stat, context)

toml-f の status を BEACH の停止メッセージへ変換する。

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: stat
character(len=*), intent(in) :: context

public subroutine get_toml_real(table, key, value, context)

TOML の数値キーを倍精度実数として読み込む。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
real(kind=dp), intent(out) :: value
character(len=*), intent(in) :: context

public subroutine get_toml_int(table, key, value, context)

TOML の整数キーを integer(i32) として読み込む。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
integer(kind=i32), intent(out) :: value
character(len=*), intent(in) :: context

public subroutine get_toml_logical(table, key, value, context)

TOML の論理値キーを読み込む。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
logical, intent(out) :: value
character(len=*), intent(in) :: context

public subroutine get_toml_string(table, key, value, context)

TOML の文字列キーを固定長文字列へ読み込む。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
character(len=*), intent(out) :: value
character(len=*), intent(in) :: context

public subroutine get_toml_real3(table, key, value, context)

TOML の3成分数値配列キーを読み込む。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
real(kind=dp), intent(out) :: value(3)
character(len=*), intent(in) :: context

public subroutine get_toml_real2(table, key, value, context)

TOML の2成分数値配列キーを読み込む。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
real(kind=dp), intent(out) :: value(2)
character(len=*), intent(in) :: context

public subroutine get_toml_real_scalar_or_array3(table, key, value, value_len, context)

TOML の scalar または最大3成分数値配列キーを読み込む。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
real(kind=dp), intent(out) :: value(3)
integer(kind=i32), intent(out) :: value_len
character(len=*), intent(in) :: context

public subroutine get_toml_boundary_mode(table, key, value, context)

TOML の文字列キーを境界条件モードへ変換する。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
integer(kind=i32), intent(out) :: value
character(len=*), intent(in) :: context

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_toml_table(cfg, table, sim_auth)

[sim] TOML テーブルを sim_config へ適用する。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg
type(toml_table), intent(inout) :: table
type(sim_authoring_spec), intent(inout) :: sim_auth

public subroutine apply_particles_toml_table(cfg, table, authoring)

[particles] TOML テーブルを適用する。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg
type(toml_table), intent(inout) :: table
type(app_config_authoring), intent(inout) :: authoring

public subroutine read_particle_species_array(cfg, table, key, authoring)

[[particles.species]] の配列テーブルを読み込む。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
type(app_config_authoring), intent(inout) :: authoring

public subroutine apply_particles_species_toml_table(spec, table, auth)

[[particles.species]] の1要素を粒子種設定へ適用する。

Arguments

Type IntentOptional Attributes Name
type(particle_species_spec), intent(inout) :: spec
type(toml_table), intent(inout) :: table
type(particle_authoring_spec), intent(inout) :: auth

public subroutine apply_mesh_toml_table(cfg, table, authoring)

[mesh] TOML テーブルをメッシュ入力設定へ適用する。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg
type(toml_table), intent(inout) :: table
type(app_config_authoring), intent(inout) :: authoring

public subroutine read_mesh_groups_table(table, key, authoring)

[mesh.groups.*] の table 群を読み込む。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
type(app_config_authoring), intent(inout) :: authoring

public subroutine apply_mesh_group_toml_table(group, table)

1つの [mesh.groups.name] table を読み込む。

Arguments

Type IntentOptional Attributes Name
type(mesh_group_authoring_spec), intent(inout) :: group
type(toml_table), intent(inout) :: table

public subroutine read_template_array(cfg, table, key, authoring)

[[mesh.templates]] の配列テーブルを読み込む。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(inout) :: cfg
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
type(app_config_authoring), intent(inout) :: authoring

public subroutine apply_template_toml_table(spec, table, auth)

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

Arguments

Type IntentOptional Attributes Name
type(template_spec), intent(inout) :: spec
type(toml_table), intent(inout) :: table
type(template_authoring_spec), intent(inout) :: auth

public subroutine apply_output_toml_table(cfg, table)

[output] TOML テーブルを出力制御設定へ適用する。

Arguments

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