get_toml_particle_boundary_mode Subroutine

public subroutine get_toml_particle_boundary_mode(table, key, value, context, allow_inherit)

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
integer(kind=i32), intent(out) :: value
character(len=*), intent(in) :: context
logical, intent(in) :: allow_inherit

Calls

proc~~get_toml_particle_boundary_mode~~CallsGraph proc~get_toml_particle_boundary_mode get_toml_particle_boundary_mode proc~get_toml_string get_toml_string proc~get_toml_particle_boundary_mode->proc~get_toml_string proc~lower_ascii lower_ascii proc~get_toml_particle_boundary_mode->proc~lower_ascii proc~stop_config_error stop_config_error proc~get_toml_particle_boundary_mode->proc~stop_config_error proc~get_toml_string->proc~stop_config_error get_value get_value proc~get_toml_string->get_value proc~require_toml_success require_toml_success proc~get_toml_string->proc~require_toml_success proc~require_toml_success->proc~stop_config_error

Source Code

  subroutine get_toml_particle_boundary_mode(table, key, value, context, allow_inherit)
    type(toml_table), intent(inout) :: table
    type(toml_key), intent(in) :: key
    integer(i32), intent(out) :: value
    character(len=*), intent(in) :: context
    logical, intent(in) :: allow_inherit
    character(len=64) :: mode

    call get_toml_string(table, key, mode, context)
    select case (trim(lower_ascii(mode)))
    case ('inherit')
      if (.not. allow_inherit) then
        call stop_config_error(trim(context)//' must be "open", "reflect", or "redistributed_reflect".')
      end if
      value = particle_bc_inherit
    case ('open')
      value = bc_open
    case ('reflect')
      value = bc_reflect
    case ('redistributed_reflect')
      value = bc_redistributed_reflect
    case ('periodic')
      call stop_config_error(trim(context)//' cannot set periodicity; use domain.periodic_axes.')
    case default
      if (allow_inherit) then
        call stop_config_error(trim(context)//' must be "inherit", "open", "reflect", or "redistributed_reflect".')
      else
        call stop_config_error(trim(context)//' must be "open", "reflect", or "redistributed_reflect".')
      end if
    end select
  end subroutine get_toml_particle_boundary_mode