Locks for particle lists are now inside the type.

The lock of a particle list is no longer an external variable, it is now
part of the type.

New procedures have been added to set and unset the lock.
This commit is contained in:
Jorge Gonzalez 2022-12-31 11:22:02 +01:00
commit 8199a228c8
5 changed files with 39 additions and 16 deletions

View file

@ -612,7 +612,7 @@ MODULE moduleInput
nPartOld = 0
!Initialize the lock for the non-analogue (NA) list of particles
CALL OMP_INIT_LOCK(lockWScheme)
CALL OMP_INIT_LOCK(partWScheme%lock)
END SUBROUTINE readSpecies
@ -676,7 +676,7 @@ MODULE moduleInput
CALL config%get('interactions.folderCollisions', pathCollisions, found)
!Inits lock for list of particles
CALL OMP_INIT_LOCK(lockCollisions)
CALL OMP_INIT_LOCK(partCollisions%lock)
CALL config%info('interactions.collisions', found, n_children = nPairs)
DO i = 1, nPairs
@ -770,6 +770,7 @@ MODULE moduleInput
USE moduleErrors
USE moduleSpecies
USE moduleRefParam
USE moduleList, ONLY: partSurfaces
USE json_module
IMPLICIT NONE
@ -862,6 +863,9 @@ MODULE moduleInput
END DO
!Init the list of particles from surfaces
CALL OMP_INIT_LOCK(partSurfaces%lock)
END SUBROUTINE readBoundary
!Read the geometry (mesh) for the case