Reducing overhead when no collisions are present

Particles are added to lists only if there are MCC collisions. Hopefully
this will reduce overhead when OpenMP is used and no collisions are
active.
This commit is contained in:
Jorge Gonzalez 2023-01-07 12:12:37 +01:00
commit 7ce1b7a4dd
13 changed files with 142 additions and 114 deletions

View file

@ -74,7 +74,10 @@ PROGRAM fpakc
tColl = omp_get_wtime()
!$OMP END SINGLE
IF (ASSOCIATED(meshForMCC)) CALL meshForMCC%doCollisions(t)
IF (doMCC) THEN
CALL meshForMCC%doCollisions(t)
END IF
!$OMP SINGLE
tColl = omp_get_wtime() - tColl
@ -83,7 +86,10 @@ PROGRAM fpakc
tCoul = omp_get_wTime()
!$OMP END SINGLE
IF (ASSOCIATED(mesh%doCoulomb)) CALL mesh%doCoulomb()
IF (ASSOCIATED(mesh%doCoulomb)) THEN
CALL mesh%doCoulomb()
END IF
!$OMP SINGLE
tCoul = omp_get_wTime() - tCoul