Minor improvements in performance and code clarity.
Still no solution for the reset subroutine. It is really time consumming.
This commit is contained in:
parent
60f38a2d95
commit
ffb03e634b
12 changed files with 233 additions and 117 deletions
|
|
@ -43,9 +43,9 @@ PROGRAM DSMC_Neutrals
|
|||
|
||||
!$OMP PARALLEL PRIVATE(t) DEFAULT(SHARED)
|
||||
DO t = 1, tmax
|
||||
tStep = omp_get_wtime()
|
||||
!Insert new particles
|
||||
!$OMP SINGLE
|
||||
tStep = omp_get_wtime()
|
||||
tPush = omp_get_wtime()
|
||||
DO i=1, nInject
|
||||
CALL inject(i)%addParticles()
|
||||
|
|
@ -55,6 +55,7 @@ PROGRAM DSMC_Neutrals
|
|||
!$OMP DO
|
||||
DO n=1, n_part_old
|
||||
CALL push(part_old(n))
|
||||
CALL mesh%vols(part_old(n)%e_p)%obj%findCell(part_old(n))
|
||||
|
||||
END DO
|
||||
!$OMP END DO
|
||||
|
|
@ -62,10 +63,12 @@ PROGRAM DSMC_Neutrals
|
|||
!$OMP SINGLE
|
||||
tPush = omp_get_wtime() - tPush
|
||||
tReset = omp_get_wtime()
|
||||
!$OMP END SINGLE
|
||||
|
||||
!Reset particles
|
||||
CALL resetParticles()
|
||||
CALL resetParticles(part_inj, part_old)
|
||||
|
||||
!$OMP SINGLE
|
||||
tReset = omp_get_wtime() - tReset
|
||||
tColl = omp_get_wtime()
|
||||
!$OMP END SINGLE
|
||||
|
|
@ -73,7 +76,6 @@ PROGRAM DSMC_Neutrals
|
|||
!Collisions
|
||||
!$OMP DO
|
||||
DO e=1, mesh%numVols
|
||||
mesh%vols(e)%obj%nColl = 0 !Reset number of collisions
|
||||
CALL mesh%vols(e)%obj%collision()
|
||||
END DO
|
||||
!$OMP END DO
|
||||
|
|
@ -85,7 +87,7 @@ PROGRAM DSMC_Neutrals
|
|||
tWeight = omp_get_wtime()
|
||||
!$OMP END SINGLE
|
||||
|
||||
CALL scatterGrid()
|
||||
CALL scatterGrid(mesh, part_old)
|
||||
|
||||
!$OMP SINGLE
|
||||
tWeight = omp_get_wtime() - tWeight
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue