Skip to content
step_force.F90 1.26 KiB
Newer Older
Fabio Roberto Vitello's avatar
Fabio Roberto Vitello committed
!***********************************************************************
!
!
                       SUBROUTINE step_force(option)
!
!
!***********************************************************************
!
!
!     Subroutine to compute gravitational potential and acceleration.
!
!
!=======================================================================

	 USE fly_h 
	implicit none
 	 INCLUDE 'mpif.h'

!   Declaration of local variables.
!   -------------------------------
	INTEGER :: ind_pe,istatus(MPI_STATUS_SIZE),tag0=0
        CHARACTER(LEN=4) :: option
        REAL(KIND=8)	:: c0a,c1a,cta
	

!=======================================================================

	c0a=MPI_WTIME()

        CALL tree_build
	
	c1a=MPI_WTIME()       
        cta=c1a-c0a
	
        IF(me.eq.0) THEN
           write(6,*) 'TREE_BUILD TOTAL: time in sec =',cta     	
           call flush(uterm)
        ENDIF
	
         CALL MPI_BARRIER(MPI_COMM_WORLD,ierror)


!-----------------------------------------------------------------------------
!       PUT 0 in acc array 
!-----------------------------------------------------------------------------
 	    acc=0.
 
       CALL acc_comp(option)
       CALL MPI_BARRIER(MPI_COMM_WORLD,ierror)
       CALL acc_ex(option) 

	
        RETURN
        END