Number of collisions per collision pair

Now the number of collisions is calculated per species pair. This allows
that the randomly particles selected for collisions do not have
collisions assigned.
This commit is contained in:
Jorge Gonzalez 2022-04-23 19:00:33 +02:00
commit 4e9514876e
10 changed files with 111 additions and 46 deletions

View file

@ -70,6 +70,8 @@ MODULE moduleCollisions
!Type for interaction matrix
TYPE:: interactionsBinary
CLASS(speciesGeneric), POINTER:: sp_i
CLASS(speciesGeneric), POINTER:: sp_j
INTEGER:: amount
TYPE(collisionCont), ALLOCATABLE:: collisions(:)
CONTAINS
@ -139,11 +141,15 @@ MODULE moduleCollisions
END FUNCTION interactionIndex
!Inits the binary interaction
SUBROUTINE initInteractionBinary(self, amount)
SUBROUTINE initInteractionBinary(self, amount, i, j)
IMPLICIT NONE
CLASS(interactionsBinary), INTENT(inout):: self
INTEGER, INTENT(in):: amount
INTEGER, INTENT(in):: i, j
self%sp_i => species(i)%obj
self%sp_j => species(j)%obj
self%amount = amount