hex_armchair_stripe Function

public pure function hex_armchair_stripe(height, width) result(hexagons)

Build a armchair-on-top honeycomb stripe/ribbon CONVERSION TO XY SITES REQUIRES ARMCHAIR LAYOUT

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: height
integer, intent(in) :: width

Return Value type(hex), allocatable, (:)


Calls

proc~~hex_armchair_stripe~~CallsGraph proc~hex_armchair_stripe hex_geometries::hex_armchair_stripe proc~hex_insert hex_geometries::hex_insert proc~hex_armchair_stripe->proc~hex_insert

Called by

proc~~hex_armchair_stripe~~CalledByGraph proc~hex_armchair_stripe hex_geometries::hex_armchair_stripe proc~get_stripe honeytools::get_stripe proc~get_stripe->proc~hex_armchair_stripe

Source Code

   pure function hex_armchair_stripe(height,width) result(hexagons)
      !! Build a armchair-on-top honeycomb stripe/ribbon
      !! CONVERSION TO XY SITES REQUIRES ARMCHAIR LAYOUT
      integer,intent(in)      :: height,width
      type(hex),allocatable   :: hexagons(:)
      integer                 :: i,j,offset
      do i = 1,width
         offset = floor(i/2.d0)
         do j = 1-offset,height-offset
            call hex_insert(hexagons,hex(i,j))
         enddo
      enddo
   end function hex_armchair_stripe