ensure_periodic_links Subroutine

private subroutine ensure_periodic_links(mesh, patch_id)

Validates that periodic patches have correctly established links.

Arguments

Type IntentOptional Attributes Name
type(mesh_t), intent(in) :: mesh
integer, intent(in) :: patch_id

Source Code

   subroutine ensure_periodic_links(mesh, patch_id)
      type(mesh_t), intent(in) :: mesh
      integer, intent(in) :: patch_id
      integer :: i, face_id

      do i = 1, mesh%patches(patch_id)%nfaces
         face_id = mesh%patches(patch_id)%face_ids(i)
         if (mesh%faces(face_id)%periodic_neighbor <= 0) then
            call fatal_error('bc', 'periodic patch '//trim(mesh%patches(patch_id)%name)// &
                             ' has no periodic.dat face links')
         end if
      end do
   end subroutine ensure_periodic_links