Implementation of initial iteration.

An initial simulation time can be provided in the input file. This is
useful when restarting a simulation from a previous file. If no
initial time is provided, the value 0 is used.
This commit is contained in:
Jorge Gonzalez 2021-04-17 10:45:52 +02:00
commit dee860e37b
7 changed files with 38 additions and 26 deletions

View file

@ -11,7 +11,7 @@ PROGRAM fpakc
IMPLICIT NONE
! t = time step
INTEGER:: t = 0
INTEGER:: t
! arg1 = Input argument 1 (input file)
CHARACTER(200):: arg1
! inputFile = path+name of input file
@ -26,6 +26,8 @@ PROGRAM fpakc
!Reads the json configuration file
CALL readConfig(inputFile)
!Do '0' iteration
t = tInitial
!$OMP PARALLEL DEFAULT(SHARED)
!$OMP SINGLE
@ -45,7 +47,7 @@ PROGRAM fpakc
CALL doOutput(t)
CALL verboseError('Starting main loop...')
!$OMP PARALLEL DEFAULT(SHARED)
DO t = 1, tmax
DO t = tInitial + 1, tFinal
!Insert new particles and push them
!$OMP SINGLE
tStep = omp_get_wtime()