Skip to content

Commit

Permalink
Remove 'showerID' from comments
Browse files Browse the repository at this point in the history
Co-authored-by: valeriaRaffuzzi <108435337+valeriaRaffuzzi@users.noreply.github.com>
  • Loading branch information
Mikolaj-A-Kowalski and valeriaRaffuzzi committed May 10, 2024
1 parent 97d692b commit 65c2896
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions ParticleObjects/Tests/particleDungeon_test.f90
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ subroutine testNormPopUp()
end subroutine testNormPopUp

!!
!! Test sorting of the population by shower ID without duplicates
!! Test sorting of the population by brood ID without duplicates
!!
@Test
subroutine testSortingByBroodID()
Expand All @@ -286,13 +286,13 @@ subroutine testSortingByBroodID()
! Initialise
call dungeon % init(10)

! Store some particles with shower ID in reverse order
! Store some particles with brood ID in reverse order
do i = 1,10
p % broodID = 10 - i + 1
call dungeon % detain(p)
end do

! Sort by shower ID
! Sort by brood ID
call dungeon % sortByBroodID(10)

! Verify order
Expand All @@ -305,7 +305,7 @@ end subroutine testSortingByBroodID


!!
!! Test sorting of the population by shower ID with duplicates
!! Test sorting of the population by brood ID with duplicates
!!
@Test
subroutine testSortingByBroodID_withDuplicates()
Expand All @@ -318,18 +318,18 @@ subroutine testSortingByBroodID_withDuplicates()
! Initialise
call dungeon % init(10 * N_duplicates)

! Store some particles with shower ID in reverse order
! Store some particles with brood ID in reverse order
! Use the group number to distinguish duplicates and make sure
! that the insertion order is preserved (for particles with the same shower ID)
do j = 1,N_duplicates
do i = 1,10
! that the insertion order is preserved (for particles with the same brood ID)
do j = 1, N_duplicates
do i = 1, 10
p % broodID = 10 - i + 1
p % G = j
call dungeon % detain(p)
end do
end do

! Sort by shower ID
! Sort by brood ID
call dungeon % sortByBroodID(10)

! Verify order
Expand Down
10 changes: 5 additions & 5 deletions ParticleObjects/particleDungeon_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ subroutine normSize(self, N, rand)
call fatalError(Here,'Requested size: '//numToChar(N) //' is not +ve')
end if

! Determine the maximum shower ID and sort the dungeon
! Determine the maximum brood ID and sort the dungeon
maxBroodID = maxval(self % prisoners(1:self % pop) % broodID)
call self % sortByBroodID(maxbroodID)

Expand Down Expand Up @@ -473,10 +473,10 @@ subroutine normSize(self, N, rand)
end subroutine normSize

!!
!! Reorder the dungeon so the shower ID is in the ascending order
!! Reorder the dungeon so the brood ID is in the ascending order
!!
!! Args:
!! k [in] -> Maximum shower ID
!! k [in] -> Maximum brood ID
!!
subroutine sortByBroodID(self, k)
class(particleDungeon), intent(inout) :: self
Expand All @@ -487,12 +487,12 @@ subroutine sortByBroodID(self, k)
type(particleState) :: tmp
character(100), parameter :: Here = 'sortBybroodID (particleDungeon_class.f90)'

! Count number of particles with each shower ID
! Count number of particles with each brood ID
count = 0
do i = 1, self % pop
id = self % prisoners(i) % broodID

if (id < 1 .or. id > k) call fatalError(Here, 'Shower ID out of range: '//numToChar(id))
if (id < 1 .or. id > k) call fatalError(Here, 'Brood ID out of range: '//numToChar(id))

count(id) = count(id) + 1
end do
Expand Down
2 changes: 1 addition & 1 deletion ParticleObjects/particle_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module particle_class
integer(shortInt) :: fate = 0 ! Neutron's fate after being subjected to an operator
integer(shortInt) :: type ! Particle type
integer(shortInt) :: collisionN = 0 ! Index of the number of collisions the particle went through
integer(shortInt) :: broodID = 0 ! ID of the shower (source particle number)
integer(shortInt) :: broodID = 0 ! ID of the brood (source particle number)

! Particle processing information
class(RNG), pointer :: pRNG => null() ! Pointer to RNG associated with the particle
Expand Down

0 comments on commit 65c2896

Please sign in to comment.