Defining hexagonal unit-cells
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] |
lattice-orientation data storage
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° |
generic, public :: operator(==) => orientation_equality | |
procedure, private :: orientation_equality |
Wrapper type to define all about a honeycomb structure
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] |
procedure, public :: print => print_unit_cell | ../../ call layout%print |
Overload of == operator for hex_orientation type
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hex_orientation), | intent(in) | :: | a | |||
class(hex_orientation), | intent(in) | :: | b |
Pretty print of hex coordinates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(unit_cell), | intent(in) | :: | C | |||
integer, | intent(in), | optional | :: | unit |
default = $stdout |