It is clear to my what pass by value and pass by reference mean, but what happens in the opposite direction ?
e.g:
subroutine get_flux(flux,ngrid,u,a,c)
implicit none
double precision, dimension(1:ngrid), intent(in) :: u
double precision, intent(in) :: a,c
integer, intent(in) :: ngrid
double precision, intent(out) :: flux
flux = a*u*(1-u)**c
end subroutine
if i call this subroutine by
double precision, dimension(1:ngrid) :: flux
double precision, parameter :: a = 1, c = 5
double precision, dimension(1:ngrid) :: u(:) = 2
call get_flux(flux,ngrid,u,a,c)
Does the subroutine passes a reference back, or a copy of the array ?