setup_nbasismax Subroutine

public subroutine setup_nbasismax(in_lat)

Arguments

Type IntentOptional Attributes Name
class(lattice), intent(in), optional :: in_lat

Contents

Source Code


Source Code

    subroutine setup_nbasismax(in_lat)
        class(lattice), intent(in), optional :: in_lat
        character(*), parameter :: this_routine = "setup_nbasismax"

        integer :: dummy_size
        ! thats a fucking pain in the ass.. i do not want to do that now!
        if (present(in_lat)) then
            if (all(nBasisMax == 0)) then
                ! only do smth if nbasismax was not changed yet

                ! whatever spin-polar means:
                if (TSPINPOLAR) then
                    nBasisMax(4, 1) = 1
                    nBasisMax(2, 3) = 1
                else
                    nBasisMax(4, 1) = -1
                    if (nBasisMax(2, 3) == 0) nBasisMax(2, 3) = 2
                end if

                if (t_k_space_hubbard) then
                    nBasisMax(1, 3) = 0
                else if (t_new_real_space_hubbard) then
                    nBasisMax(1, 3) = 4
                    nBasisMax(3, 3) = 0
                    nBasisMax(2, 3) = 1
                end if

                ! this is never explained:
                nBasisMax(4, 2) = 1

                return

                ! i should give lattice also a member type and a k-space flag..
                if (trim(in_lat%get_name()) == 'tilted') then
                    ! how do i get nmaxx and the rest effectively??
                    ! if it is tilted the nmax stuff is usualy 1 or??
                    call SETBASISLIM_HUBTILT(nBasisMax, 1, 1, 1, dummy_size, &
                                             in_lat%is_periodic(), in_lat%get_length(1), in_lat%get_length(2))
                else
                    call SETBASISLIM_HUB(nBasisMax, in_lat%get_length(1), &
                                         in_lat%get_length(2), in_lat%get_length(3), dummy_size, &
                                         in_lat%is_periodic(),.not. in_lat%is_k_space())
                end if
                if (thub .and. treal) then
                    ! apparently this allows integrals between different
                    ! spins: so in the transcorrelated hubbard this should
                    ! be changed also maybe?
                    nBasisMax(2, 3) = 1
                end if
                ASSERT(dummy_size == in_lat%get_nsites() * 2)
            end if
        else
            call Stop_All(this_routine, "not yet implemented")
        end if

    end subroutine setup_nbasismax