submodule(moduleMesh) surfaces
  contains
    module function physicalSurface_to_index(ps) result(index)
      implicit none

      integer:: ps
      integer:: index
      integer:: i

      index = 0
      do i = 1, nPhysicalSurfaces
        if (physicalSurfaces(i)%index == ps) then
          index = i
          exit

        end if

      end do

    end function physicalSurface_to_index

end submodule surfaces
