apply_basis_vector Function

private pure function apply_basis_vector(this, k_in, ind) result(k_out)

Type Bound

lattice

Arguments

Type IntentOptional Attributes Name
class(lattice), intent(in) :: this
integer, intent(in) :: k_in(3)
integer, intent(in), optional :: ind

Return Value integer, (3)


Contents

Source Code


Source Code

    pure function apply_basis_vector(this, k_in, ind) result(k_out)
        ! i have to specifically write this for every lattice type..
        class(lattice), intent(in) :: this
        integer, intent(in) :: k_in(3)
        integer, intent(in), optional :: ind
        integer :: k_out(3)
        character(*), parameter :: this_routine = "apply_basis_vector"

        ! i should only make this an abstract interface, since this function
        ! must be deffered!
        ASSERT(ind >= 0)
        ASSERT(ind <= size(this%basis_vecs, 1))

        k_out = k_in + this%basis_vecs(ind, :)

    end function apply_basis_vector