get_toml_real2 Subroutine

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

Calls

proc~~get_toml_real2~~CallsGraph proc~get_toml_real2 get_toml_real2 get_value get_value proc~get_toml_real2->get_value proc~require_toml_success require_toml_success proc~get_toml_real2->proc~require_toml_success toml_len toml_len proc~get_toml_real2->toml_len

Called by

proc~~get_toml_real2~~CalledByGraph proc~get_toml_real2 get_toml_real2 proc~apply_particles_species_toml_table apply_particles_species_toml_table proc~apply_particles_species_toml_table->proc~get_toml_real2 proc~read_particle_species_array read_particle_species_array proc~read_particle_species_array->proc~apply_particles_species_toml_table proc~apply_particles_toml_table apply_particles_toml_table proc~apply_particles_toml_table->proc~read_particle_species_array proc~apply_toml_document apply_toml_document proc~apply_toml_document->proc~apply_particles_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 get_toml_real2(table, key, value, context)
    type(toml_table), intent(inout) :: table
    type(toml_key), intent(in) :: key
    real(dp), intent(out) :: value(2)
    character(len=*), intent(in) :: context
    type(toml_array), pointer :: array
    integer :: i, stat

    nullify (array)
    call get_value(table, key, array, stat=stat)
    call require_toml_success(stat, context)
    if (.not. associated(array)) error stop 'Invalid TOML value for '//trim(context)//'.'
    if (toml_len(array) /= 2) then
      error stop trim(context)//' must be an array of 2 numbers.'
    end if
    do i = 1, 2
      call get_value(array, i, value(i), stat=stat)
      call require_toml_success(stat, context)
    end do
  end subroutine get_toml_real2