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:
parent
0d2e62421d
commit
dee860e37b
7 changed files with 38 additions and 26 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue