WriteVector Subroutine

public subroutine WriteVector(vec, vecname)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: vec(:)
character(len=*), intent(in) :: vecname

Contents

Source Code


Source Code

    subroutine WriteVector(vec, vecname)
        implicit none
        real(dp), intent(in) :: vec(:)
        character(len=*), intent(in) :: vecname
        integer :: i

        write(stdout, *) "Writing out vector: ", trim(vecname)
        write(stdout, "(A,I7,A,I7)") "Size: ", size(vec, 1)
        do i = 1, size(vec, 1)
!            write(stdout,"(G25.10)",advance='no') vec(i)
            write(stdout, "(G25.10)") vec(i)
        end do
        write(stdout, *)
    end subroutine WriteVector