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