apply_output_toml_table Subroutine

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

Calls

proc~~apply_output_toml_table~~CallsGraph proc~apply_output_toml_table apply_output_toml_table get_keys get_keys proc~apply_output_toml_table->get_keys proc~get_toml_int get_toml_int proc~apply_output_toml_table->proc~get_toml_int proc~get_toml_logical get_toml_logical proc~apply_output_toml_table->proc~get_toml_logical proc~get_toml_string get_toml_string proc~apply_output_toml_table->proc~get_toml_string proc~lower_ascii lower_ascii proc~apply_output_toml_table->proc~lower_ascii get_value get_value proc~get_toml_int->get_value proc~require_toml_success require_toml_success 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_string->get_value proc~get_toml_string->proc~require_toml_success

Called by

proc~~apply_output_toml_table~~CalledByGraph proc~apply_output_toml_table apply_output_toml_table proc~apply_toml_document apply_toml_document proc~apply_toml_document->proc~apply_output_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_output_toml_table(cfg, table)
    type(app_config), intent(inout) :: cfg
    type(toml_table), intent(inout) :: table
    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 ('write_files')
        call get_toml_logical(table, keys(ikey), cfg%write_output, 'output.write_files')
      case ('write_mesh_potential')
        call get_toml_logical(table, keys(ikey), cfg%write_mesh_potential, 'output.write_mesh_potential')
      case ('write_potential_history')
        call get_toml_logical(table, keys(ikey), cfg%write_potential_history, 'output.write_potential_history')
      case ('dir')
        call get_toml_string(table, keys(ikey), cfg%output_dir, 'output.dir')
      case ('history_stride')
        call get_toml_int(table, keys(ikey), cfg%history_stride, 'output.history_stride')
      case ('resume')
        call get_toml_logical(table, keys(ikey), cfg%resume_output, 'output.resume')
      case ('restart_from')
        call get_toml_string(table, keys(ikey), cfg%output_restart_from, 'output.restart_from')
      case default
        error stop 'Unknown key in [output]: '//trim(keys(ikey)%key)
      end select
    end do
  end subroutine apply_output_toml_table