hex_layout Module

Defining hexagonal unit-cells


Used by

  • module~~hex_layout~~UsedByGraph module~hex_layout hex_layout module~hex_geometries hex_geometries module~hex_geometries->module~hex_layout module~honeyplots honeyplots module~honeyplots->module~hex_layout module~xy_coordinates xy_coordinates module~honeyplots->module~xy_coordinates module~xy_neighbors xy_neighbors module~honeyplots->module~xy_neighbors module~honeytools honeytools module~honeytools->module~hex_layout module~honeytools->module~hex_geometries module~honeytools->module~xy_coordinates module~honeytools->module~xy_neighbors module~xy_coordinates->module~hex_layout module~xy_neighbors->module~hex_layout module~xy_neighbors->module~xy_coordinates

Variables

Type Visibility Attributes Name Initial
type(hex_orientation), public, parameter :: armchair = hex_orientation(aq, ar, 0d0)
type(hex_orientation), public, parameter :: zigzag = hex_orientation(zq, zr, 0.5d0)
real(kind=8), private, parameter, dimension(2) :: aq = [3d0/2d0, sqrt(3d0)/2d0]
real(kind=8), private, parameter, dimension(2) :: ar = [0d0, sqrt(3d0)]
real(kind=8), private, parameter, dimension(2) :: zq = [sqrt(3d0), 0d0]
real(kind=8), private, parameter, dimension(2) :: zr = [sqrt(3d0)/2d0, 3d0/2d0]

Derived Types

type, public ::  hex_orientation

lattice-orientation data storage

Components

Type Visibility Attributes Name Initial
real(kind=8), public, dimension(2) :: uq

1st unit-vector

real(kind=8), public, dimension(2) :: ur

2nd unit-vector

real(kind=8), public :: angle

in units of 60°

Type-Bound Procedures

generic, public :: operator(==) => orientation_equality
procedure, private :: orientation_equality

type, public ::  unit_cell

Wrapper type to define all about a honeycomb structure

Components

Type Visibility Attributes Name Initial
type(hex_orientation), public :: orientation

armchair or zigzag

real(kind=8), public :: size = 1d0

lattice parameter

real(kind=8), public, dimension(2) :: origin = [0d0, 0d0]

Type-Bound Procedures

procedure, public :: print => print_unit_cell ../../

call layout%print


Functions

private pure function orientation_equality(a, b) result(isequal)

Overload of == operator for hex_orientation type

Arguments

Type IntentOptional Attributes Name
class(hex_orientation), intent(in) :: a
class(hex_orientation), intent(in) :: b

Return Value logical


Subroutines

public impure elemental subroutine print_unit_cell(C, unit)

Pretty print of hex coordinates

Arguments

Type IntentOptional Attributes Name
class(unit_cell), intent(in) :: C
integer, intent(in), optional :: unit

default = $stdout