addNormContribution Subroutine

public subroutine addNormContribution(CurrentSign, tIsStateDeterm)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: CurrentSign(lenof_sign)
logical, intent(in) :: tIsStateDeterm

Contents

Source Code


Source Code

    subroutine addNormContribution(CurrentSign, tIsStateDeterm)
        implicit none
        real(dp), intent(in) :: CurrentSign(lenof_sign)
        logical, intent(in) :: tIsStateDeterm

#ifdef CMPLX_
        integer :: run

        do run = 1, inum_runs
            norm_psi_squared(run) = norm_psi_squared(run) + sum(CurrentSign(min_part_type(run):max_part_type(run))**2)
            if (tIsStateDeterm) then
                norm_semistoch_squared(run) = norm_semistoch_squared(run) &
                                              + sum(CurrentSign(min_part_type(run):max_part_type(run))**2)
            end if
        end do

#else
        norm_psi_squared = norm_psi_squared + CurrentSign**2
        if (tIsStateDeterm) norm_semistoch_squared = norm_semistoch_squared + CurrentSign**2
#endif
    end subroutine addNormContribution