Skip to content

Commit

Permalink
Merge pull request #148 from valeriaRaffuzzi/cone_fix
Browse files Browse the repository at this point in the history
Small fixes in cones and trackingHT
  • Loading branch information
ChasingNeutrons authored Jan 25, 2025
2 parents 23814ae + e11f75c commit 0f4b453
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Geometry/Surfaces/QuadSurfaces/cone_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ subroutine init(self, dict)
end if

if (hMin >= hMax) call fatalError(Here, 'hMin is greater than or equal to hMax.')
if (sign(hMin,hMax) /= hMin) call fatalError(Here, 'hMin and hMax have different signs.')
if ((sign(hMin,hMax) /= hMin) .and. hMin /= ZERO .and. hMax /= ZERO) then
call fatalError(Here, 'hMin and hMax have different signs.')
end if

! Load properties
self % vertex = vertex
Expand Down
12 changes: 8 additions & 4 deletions TransportOperator/transportOperatorHT_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,15 @@ subroutine tracking_selection(self, p, tally, thisCycle, nextCycle)
! Get majornat XS inverse: 1/Sigma_majorant
majorant_inv = ONE / self % xsData % getTrackingXS(p, p % matIdx(), MAJORANT_XS)

! Obtain the local cross-section
sigmaT = self % xsData % getTrackMatXS(p, p % matIdx())
! Obtain the local cross-section. Always choose ST in void
if (p % matIdx() == VOID_MAT) then
sigmaT = ZERO
else
sigmaT = self % xsData % getTrackMatXS(p, p % matIdx())
end if

! Calculate ratio between local cross-section and majorant
ratio = sigmaT*majorant_inv
ratio = sigmaT * majorant_inv

! Cut-off criterion to decide on tracking method
if (ratio > (ONE - self % cutoff)) then
Expand Down Expand Up @@ -104,7 +108,7 @@ subroutine deltaTracking(self, p, tally, thisCycle, nextCycle)
end if

! Check for void
if(p % matIdx() == VOID_MAT) then
if (p % matIdx() == VOID_MAT) then
call tally % reportInColl(p, .true.)
cycle DTLoop
end if
Expand Down

0 comments on commit 0f4b453

Please sign in to comment.