round_sym Function

private elemental function round_sym(this, sym_in) result(sym_out)

Type Bound

lattice

Arguments

Type IntentOptional Attributes Name
class(lattice), intent(in) :: this
type(BasisFN), intent(in) :: sym_in

Return Value type(BasisFN)


Contents

Source Code


Source Code

    elemental function round_sym(this, sym_in) result(sym_out)
        ! routine to map k-vectors outside first BZ back inside
        class(lattice), intent(in) :: this
        type(basisfn), intent(in) :: sym_in
        type(basisfn) :: sym_out

        integer :: k_vec(3)

        ! write a lattice specific routine, which checks if the k-vector is
        ! inside the first BZ of this lattice (which has to be defined by
        ! the input and implemented by me!)
        if (this%inside_bz(sym_in%k)) then
            ! then i have to do nothing
            sym_out = sym_in
        else
            ! otherwise map the k-vector back..
            k_vec = this%map_k_vec(sym_in%k)
            sym_out = sym_in
            sym_out%k = k_vec
        end if

    end function round_sym