[output] TOML テーブルを出力制御設定へ適用する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(inout) | :: | cfg | |||
| type(toml_table), | intent(inout) | :: | table |
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