calc_nsites_hexagonal Function

private function calc_nsites_hexagonal(this, length_x, length_y, length_z) result(n_sites)

Type Bound

hexagonal

Arguments

Type IntentOptional Attributes Name
class(hexagonal) :: this
integer, intent(in) :: length_x
integer, intent(in) :: length_y
integer, intent(in), optional :: length_z

Return Value integer


Contents

Source Code


Source Code

    function calc_nsites_hexagonal(this, length_x, length_y, length_z) result(n_sites)
        class(hexagonal) :: this
        integer, intent(in) :: length_x, length_y
        integer, intent(in), optional :: length_z
        integer :: n_sites
        character(*), parameter :: this_routine = "calc_nsites_hexagonal"
        unused_var(this)
        if (present(length_z)) then
            unused_var(length_z)
        end if

        ! the length_x of the hexagonal is defined as the number of unit cells..
        ! and there are 8 sites in my hexagonal unit cell..
        ASSERT(length_x > 0)
        ASSERT(length_y > 0)

        n_sites = length_x * length_y * 8

    end function calc_nsites_hexagonal