apply_mesh_group_toml_table Subroutine

public subroutine apply_mesh_group_toml_table(group, table)

1つの [mesh.groups.name] table を読み込む。

Arguments

Type IntentOptional Attributes Name
type(mesh_group_authoring_spec), intent(inout) :: group
type(toml_table), intent(inout) :: table

Calls

proc~~apply_mesh_group_toml_table~~CallsGraph proc~apply_mesh_group_toml_table apply_mesh_group_toml_table get_keys get_keys proc~apply_mesh_group_toml_table->get_keys proc~get_toml_real get_toml_real proc~apply_mesh_group_toml_table->proc~get_toml_real proc~get_toml_real3 get_toml_real3 proc~apply_mesh_group_toml_table->proc~get_toml_real3 proc~get_toml_string get_toml_string proc~apply_mesh_group_toml_table->proc~get_toml_string proc~lower_ascii lower_ascii proc~apply_mesh_group_toml_table->proc~lower_ascii 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

Called by

proc~~apply_mesh_group_toml_table~~CalledByGraph proc~apply_mesh_group_toml_table apply_mesh_group_toml_table proc~read_mesh_groups_table read_mesh_groups_table proc~read_mesh_groups_table->proc~apply_mesh_group_toml_table proc~apply_mesh_toml_table apply_mesh_toml_table proc~apply_mesh_toml_table->proc~read_mesh_groups_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_group_toml_table(group, table)
    type(mesh_group_authoring_spec), intent(inout) :: group
    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 ('placement_mode')
        call get_toml_string(table, keys(ikey), group%placement_mode, 'mesh.groups.placement_mode')
        group%placement_mode = lower_ascii(trim(group%placement_mode))
        group%has_placement_mode = .true.
      case ('anchor')
        call get_toml_string(table, keys(ikey), group%anchor, 'mesh.groups.anchor')
        group%anchor = lower_ascii(trim(group%anchor))
        group%has_anchor = .true.
      case ('offset')
        call get_toml_real3(table, keys(ikey), group%offset, 'mesh.groups.offset')
        group%has_offset = .true.
      case ('offset_frac')
        call get_toml_real3(table, keys(ikey), group%offset_frac, 'mesh.groups.offset_frac')
        group%has_offset_frac = .true.
      case ('scale')
        call get_toml_real(table, keys(ikey), group%scale, 'mesh.groups.scale')
        group%has_scale = .true.
      case ('scale_from')
        call get_toml_string(table, keys(ikey), group%scale_from, 'mesh.groups.scale_from')
        group%scale_from = lower_ascii(trim(group%scale_from))
        group%has_scale_from = .true.
      case ('scale_factor')
        call get_toml_real(table, keys(ikey), group%scale_factor, 'mesh.groups.scale_factor')
        group%has_scale_factor = .true.
      case default
        error stop 'Unknown key in [mesh.groups.*]: '//trim(keys(ikey)%key)
      end select
    end do
  end subroutine apply_mesh_group_toml_table