Build a armchair-on-top honeycomb stripe/ribbon CONVERSION TO XY SITES REQUIRES ARMCHAIR LAYOUT
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | height | |||
integer, | intent(in) | :: | width |
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