Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Put in minimum number of fragment limit
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Feb 13, 2023
1 parent ee1ccb7 commit c0afe56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fraggle/fraggle_util.f90
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module subroutine fraggle_util_set_mass_dist(self, param)
real(DP), parameter :: BETA = 2.85_DP
integer(I4B), parameter :: MASS_NOISE_FACTOR = 5 !! The number of digits of random noise that get added to the minimum mass value to prevent identical masses from being generated in a single run
integer(I4B), parameter :: NFRAGMAX_UNSCALED = 3000 !! Maximum number of fragments that can be generated
integer(I4B), parameter :: NFRAGMIN = 1 !! Minimum number of fragments that can be generated (set by the fraggle_generate algorithm for constraining momentum and energy)
integer(I4B), parameter :: NFRAGMIN = 3 !! Minimum number of fragments that can be generated
integer(I4B), parameter :: iMlr = 1
integer(I4B), parameter :: iMslr = 2
integer(I4B), parameter :: iMrem = 3
Expand Down Expand Up @@ -136,7 +136,7 @@ module subroutine fraggle_util_set_mass_dist(self, param)
mfrag = max((nfrag - 1)**(-3._DP / BETA) * impactors%mass_dist(iMslr), min_mfrag)
mremaining = mremaining - mfrag
end do
nfrag = min(ceiling(nfrag / param%nfrag_reduction), nfragmax)
nfrag = max(min(ceiling(nfrag / param%nfrag_reduction), nfragmax), NFRAGMIN)
call self%setup_fragments(nfrag)

case (COLLRESOLVE_REGIME_MERGE, COLLRESOLVE_REGIME_GRAZE_AND_MERGE)
Expand Down

0 comments on commit c0afe56

Please sign in to comment.