Build a zigzag-on-top honeycomb stripe/ribbon CONVERSION TO XY SITES REQUIRES ZIGZAG LAYOUT
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | height | |||
integer, | intent(in) | :: | width |
pure function hex_zigzag_stripe(height,width) result(hexagons) !! Build a zigzag-on-top honeycomb stripe/ribbon !! CONVERSION TO XY SITES REQUIRES ZIGZAG LAYOUT integer,intent(in) :: height,width type(hex),allocatable :: hexagons(:) integer :: i,j,offset do i = 1,height offset = floor(i/2.d0) do j = 1-offset,width-offset call hex_insert(hexagons,hex(i,j)) enddo enddo end function hex_zigzag_stripe