geop_i Function

public function geop_i(first, factor, n)

Arguments

Type IntentOptional AttributesName
integer(kind=I4B), intent(in) :: first
integer(kind=I4B), intent(in) :: factor
integer(kind=I4B), intent(in) :: n

Return Value integer(kind=I4B), DIMENSION(n)


Called by

proc~~geop_i~~CalledByGraph proc~geop_i geop_i interface~geop geop interface~geop->proc~geop_i

Contents

Source Code


Source Code

	FUNCTION geop_i(first,factor,n)
	INTEGER(I4B), INTENT(IN) :: first,factor,n
	INTEGER(I4B), DIMENSION(n) :: geop_i
	INTEGER(I4B) :: k,k2,temp
	if (n > 0) geop_i(1)=first
	if (n <= NPAR_GEOP) then
		do k=2,n
			geop_i(k)=geop_i(k-1)*factor
		end do
	else
		do k=2,NPAR2_GEOP
			geop_i(k)=geop_i(k-1)*factor
		end do
		temp=factor**NPAR2_GEOP
		k=NPAR2_GEOP
		do
			if (k >= n) exit
			k2=k+k
			geop_i(k+1:min(k2,n))=temp*geop_i(1:min(k,n-k))
			temp=temp*temp
			k=k2
		end do
	end if
	END FUNCTION geop_i