dispersion_rel_rect Function

private function dispersion_rel_rect(this, k_vec) result(disp)

Type Bound

rectangle

Arguments

Type IntentOptional Attributes Name
class(rectangle) :: this
integer, intent(in) :: k_vec(3)

Return Value real(kind=dp)


Contents

Source Code


Source Code

    function dispersion_rel_rect(this, k_vec) result(disp)
        class(rectangle) :: this
        integer, intent(in) :: k_vec(3)
        real(dp) :: disp
#ifdef DEBUG_
        character(*), parameter :: this_routine = "dispersion_rel_rect"
#endif

        ASSERT(this%is_periodic())

        disp = 2.0_dp * (cos(2 * pi * (k_vec(1) + twisted_bc(1)) / this%length(1)) &
                         + cos(2 * pi * (k_vec(2) + twisted_bc(2)) / this%length(2)))

    end function dispersion_rel_rect