calc_nsites_ole Function

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

Type Bound

ole

Arguments

Type IntentOptional Attributes Name
class(ole) :: 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_ole(this, length_x, length_y, length_z) result(n_sites)
        class(ole) :: this
        integer, intent(in) :: length_x, length_y
        integer, intent(in), optional :: length_z
        integer :: n_sites
        character(*), parameter :: this_routine = "calc_nsites_ole"
        unused_var(this)
        if (present(length_z)) then
            unused_var(length_z)
        end if

        ! oles cluster we want to look at are defined by the vectors
        ! (x,x), (-y,x) and i also think  y = x + 2 is a requisite but i am
        ! not sure.. it is a non-orthogonal unit cell!
        ! check for the validity of the input
        if (length_x < 2 .or. length_y < 2 .or. length_x == length_y .or. &
            length_x > length_y) then
            ! and as a convention y > x is enforced!
            print *, "Lx: ", length_x
            print *, "Ly: ", length_y
            call stop_all(this_routine, "incorrect input for Ole Clusters")
        end if

        ! or shorter:
        n_sites = length_x * (length_x + length_y)

    end function calc_nsites_ole