validate_boundary_arrays Subroutine

private subroutine validate_boundary_arrays(params)

Ensures all boundary patch names and types are non-empty.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params

Source Code

   subroutine validate_boundary_arrays(params)
      type(case_params_t), intent(in) :: params

      integer :: i

      do i = 1, params%n_patches
         if (len_trim(params%patch_name(i)) == 0) then
            call fatal_error('input', 'patch_name entry cannot be empty')
         end if

         if (len_trim(params%patch_type(i)) == 0) then
            call fatal_error('input', 'patch_type entry cannot be empty')
         end if

         if (params%enable_energy .and. params%patch_T(i) <= zero) then
            call fatal_error('input', 'patch_T entry must be positive when energy is enabled')
         end if
      end do
   end subroutine validate_boundary_arrays