parse_bc_type Function

private function parse_bc_type(text) result(type_id)

Converts a case-insensitive string to its corresponding internal BC type ID.

  Supports legacy aliases: "fixed_value" (Dirichlet), "zero_gradient" (Neumann), 
  "no_slip" (Wall), "slip" (Symmetry).

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: text

String representation (e.g., "Wall", "Periodic", "Dirichlet").

Return Value integer


Calls

proc~~parse_bc_type~~CallsGraph proc~parse_bc_type mod_bc::parse_bc_type proc~fatal_error mod_kinds::fatal_error proc~parse_bc_type->proc~fatal_error proc~lowercase mod_kinds::lowercase proc~parse_bc_type->proc~lowercase

Called by

proc~~parse_bc_type~~CalledByGraph proc~parse_bc_type mod_bc::parse_bc_type proc~build_bc_set mod_bc::build_bc_set proc~build_bc_set->proc~parse_bc_type program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~build_bc_set

Source Code

   integer function parse_bc_type(text) result(type_id)
      character(len=*), intent(in) :: text
      character(len=len(text)) :: key

      type_id = bc_unknown

      key = trim(lowercase(text))
      select case (trim(key))
      case ('wall', 'no_slip', 'moving_wall')
         type_id = bc_wall
      case ('symmetry', 'symmetric', 'slip')
         type_id = bc_symmetry
      case ('periodic')
         type_id = bc_periodic
      case ('dirichlet', 'fixed_value')
         type_id = bc_dirichlet
      case ('neumann', 'zero_gradient')
         type_id = bc_neumann
      case default
         call fatal_error('bc', 'unknown boundary type '//trim(text))
      end select
   end function parse_bc_type