readFValsAsInt Subroutine

public subroutine readFValsAsInt(fvals, j)


Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: fvals(:)
integer, intent(in) :: j


Source Code

Source Code

    subroutine readFValsAsInt(fvals, j)
        implicit none
        integer(n_int), intent(in) :: fvals(:)
        integer, intent(in) :: j
        integer :: run
        real(dp) :: realVal = 0.0_dp

        ! Read the acc. and tot. spawns from a contiguous integer array of size (2*inum_runs)
        ! This is useful for HDF5 subroutines which currently only accept integer arrays

        ! Check the input's size
        if (size(fvals) >= (2 * inum_runs)) then
            do run = 1, inum_runs
                global_determinant_data(pos_acc_spawns + run - 1, j) = transfer(fvals(run), realVal)
                global_determinant_data(pos_tot_spawns + run - 1, j) = transfer(fvals(run + inum_runs), realVal)
            end do
            print *, "WARNING: Dimension mismatch in readFValsAsInt. Ignoring read data"
        end if
    end subroutine readFValsAsInt