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

@ -169,10 +169,10 @@ MODULE moduleMeshBoundary
newIon%n_in = .TRUE.
!Add particles to list
CALL OMP_SET_LOCK(lockSurfaces)
CALL partSurfaces%setLock()
CALL partSurfaces%add(newElectron)
CALL partSurfaces%add(newIon)
CALL OMP_UNSET_LOCK(lockSurfaces)
CALL partSurfaces%unsetLock()
!Electron loses energy due to ionization
eRel = eRel - bound%eThreshold