apply_mesh_toml_table Subroutine

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

Calls

proc~~apply_mesh_toml_table~~CallsGraph proc~apply_mesh_toml_table apply_mesh_toml_table get_keys get_keys proc~apply_mesh_toml_table->get_keys proc~get_toml_real get_toml_real proc~apply_mesh_toml_table->proc~get_toml_real proc~get_toml_real3 get_toml_real3 proc~apply_mesh_toml_table->proc~get_toml_real3 proc~get_toml_string get_toml_string proc~apply_mesh_toml_table->proc~get_toml_string proc~lower_ascii lower_ascii proc~apply_mesh_toml_table->proc~lower_ascii proc~read_mesh_groups_table read_mesh_groups_table proc~apply_mesh_toml_table->proc~read_mesh_groups_table proc~read_template_array read_template_array proc~apply_mesh_toml_table->proc~read_template_array get_value get_value proc~get_toml_real->get_value proc~require_toml_success require_toml_success proc~get_toml_real->proc~require_toml_success proc~get_toml_real3->get_value proc~get_toml_real3->proc~require_toml_success toml_len toml_len proc~get_toml_real3->toml_len proc~get_toml_string->get_value proc~get_toml_string->proc~require_toml_success proc~read_mesh_groups_table->get_keys proc~read_mesh_groups_table->get_value proc~apply_mesh_group_toml_table apply_mesh_group_toml_table proc~read_mesh_groups_table->proc~apply_mesh_group_toml_table proc~ensure_authoring_group_capacity ensure_authoring_group_capacity proc~read_mesh_groups_table->proc~ensure_authoring_group_capacity proc~read_mesh_groups_table->proc~require_toml_success proc~read_template_array->get_value proc~apply_template_toml_table apply_template_toml_table proc~read_template_array->proc~apply_template_toml_table proc~ensure_authoring_template_capacity ensure_authoring_template_capacity proc~read_template_array->proc~ensure_authoring_template_capacity proc~ensure_template_capacity ensure_template_capacity proc~read_template_array->proc~ensure_template_capacity proc~read_template_array->proc~require_toml_success proc~read_template_array->toml_len proc~apply_mesh_group_toml_table->get_keys proc~apply_mesh_group_toml_table->proc~get_toml_real proc~apply_mesh_group_toml_table->proc~get_toml_real3 proc~apply_mesh_group_toml_table->proc~get_toml_string proc~apply_mesh_group_toml_table->proc~lower_ascii proc~apply_template_toml_table->get_keys proc~apply_template_toml_table->proc~get_toml_real proc~apply_template_toml_table->proc~get_toml_real3 proc~apply_template_toml_table->proc~get_toml_string proc~apply_template_toml_table->proc~lower_ascii proc~get_toml_int get_toml_int proc~apply_template_toml_table->proc~get_toml_int proc~get_toml_logical get_toml_logical proc~apply_template_toml_table->proc~get_toml_logical proc~get_toml_real_scalar_or_array3 get_toml_real_scalar_or_array3 proc~apply_template_toml_table->proc~get_toml_real_scalar_or_array3 proc~get_toml_int->get_value proc~get_toml_int->proc~require_toml_success proc~get_toml_logical->get_value proc~get_toml_logical->proc~require_toml_success proc~get_toml_real_scalar_or_array3->get_value proc~get_toml_real_scalar_or_array3->proc~require_toml_success proc~get_toml_real_scalar_or_array3->toml_len

Called by

proc~~apply_mesh_toml_table~~CalledByGraph proc~apply_mesh_toml_table apply_mesh_toml_table proc~apply_toml_document apply_toml_document proc~apply_toml_document->proc~apply_mesh_toml_table proc~load_toml_config load_toml_config proc~load_toml_config->proc~apply_toml_document proc~load_app_config load_app_config proc~load_app_config->proc~load_toml_config proc~load_or_init_run_state load_or_init_run_state proc~load_or_init_run_state->proc~load_app_config program~main main program~main->proc~load_or_init_run_state

Source Code

  subroutine apply_mesh_toml_table(cfg, table, authoring)
    type(app_config), intent(inout) :: cfg
    type(toml_table), intent(inout) :: table
    type(app_config_authoring), intent(inout) :: authoring
    type(toml_key), allocatable :: keys(:)
    integer :: ikey
    character(len=:), allocatable :: k

    call table%get_keys(keys)
    do ikey = 1, size(keys)
      k = lower_ascii(trim(keys(ikey)%key))
      select case (trim(k))
      case ('mode')
        call get_toml_string(table, keys(ikey), cfg%mesh_mode, 'mesh.mode')
      case ('obj_path')
        call get_toml_string(table, keys(ikey), cfg%obj_path, 'mesh.obj_path')
      case ('surface_model')
        call get_toml_string(table, keys(ikey), cfg%mesh_surface_model, 'mesh.surface_model')
        cfg%mesh_surface_model = lower_ascii(trim(cfg%mesh_surface_model))
      case ('epsilon_r')
        call get_toml_real(table, keys(ikey), cfg%mesh_epsilon_r, 'mesh.epsilon_r')
      case ('obj_scale')
        call get_toml_real(table, keys(ikey), cfg%obj_scale, 'mesh.obj_scale')
      case ('obj_rotation')
        call get_toml_real3(table, keys(ikey), cfg%obj_rotation, 'mesh.obj_rotation')
      case ('obj_offset')
        call get_toml_real3(table, keys(ikey), cfg%obj_offset, 'mesh.obj_offset')
      case ('templates')
        call read_template_array(cfg, table, keys(ikey), authoring)
      case ('groups')
        call read_mesh_groups_table(table, keys(ikey), authoring)
      case default
        error stop 'Unknown key in [mesh]: '//trim(keys(ikey)%key)
      end select
    end do
  end subroutine apply_mesh_toml_table