normalize_config_layout Subroutine

public subroutine normalize_config_layout(document)

7グループの公開入力を内部reader用のdocumentへ正規化する。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout), allocatable :: document

Calls

proc~~normalize_config_layout~~CallsGraph proc~normalize_config_layout normalize_config_layout add_table add_table proc~normalize_config_layout->add_table destroy destroy proc~normalize_config_layout->destroy get get proc~normalize_config_layout->get get_keys get_keys proc~normalize_config_layout->get_keys get_value get_value proc~normalize_config_layout->get_value new_array new_array proc~normalize_config_layout->new_array new_table new_table proc~normalize_config_layout->new_table proc~get_toml_int get_toml_int proc~normalize_config_layout->proc~get_toml_int proc~grouped_layout_table grouped_layout_table proc~normalize_config_layout->proc~grouped_layout_table proc~lower_ascii lower_ascii proc~normalize_config_layout->proc~lower_ascii proc~reader_layout_path reader_layout_path proc~normalize_config_layout->proc~reader_layout_path proc~require_toml_success require_toml_success proc~normalize_config_layout->proc~require_toml_success proc~stop_config_error stop_config_error proc~normalize_config_layout->proc~stop_config_error push_back push_back proc~normalize_config_layout->push_back set_value set_value proc~normalize_config_layout->set_value toml_len toml_len proc~normalize_config_layout->toml_len proc~get_toml_int->get_value proc~get_toml_int->proc~require_toml_success proc~get_toml_int->proc~stop_config_error proc~require_toml_success->proc~stop_config_error

Called by

proc~~normalize_config_layout~~CalledByGraph proc~normalize_config_layout normalize_config_layout proc~load_toml_config load_toml_config proc~load_toml_config->proc~normalize_config_layout proc~load_app_config load_app_config proc~load_app_config->proc~load_toml_config proc~handle_early_cli handle_early_cli proc~handle_early_cli->proc~load_app_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~handle_early_cli program~main->proc~load_or_init_run_state

Source Code

  subroutine normalize_config_layout(document)
    type(toml_table), allocatable, intent(inout) :: document
    type(toml_table), allocatable :: normalized
    type(toml_key), allocatable :: keys(:)
    integer :: i

    call document%get_keys(keys)
    do i = 1, size(keys)
      select case (lower_ascii(keys(i)%key))
      case ('sim', 'field_boundary', 'particle_boundary', 'surface_current_model', 'periodic2')
        call stop_config_error('flat beach.toml layout is not supported; use the grouped layout '// &
                               '(run/domain/mesh/particles/fields/sheath/output)')
      end select
    end do

    if (.not. is_grouped_layout(document, '')) then
      call stop_config_error('flat beach.toml layout is not supported; use the grouped layout '// &
                             '(run/domain/mesh/particles/fields/sheath/output)')
    end if
    allocate (normalized)
    call new_table(normalized)
    call translate_table(document, '', normalized, .false.)
    call document%destroy()
    call move_alloc(normalized, document)
  end subroutine normalize_config_layout