Skip to content

Commit

Permalink
fix: Pass root-variance (instead of variance) to cosmologicalMassVari…
Browse files Browse the repository at this point in the history
…ance class mass() function

In excursion set solvers the variance was being passed to the cosmologicalMassVariance class mass() function instead of the root-variance. This patch causes root-variances to be passed instead.
  • Loading branch information
abensonca committed Aug 11, 2021
1 parent 57d73d0 commit 10c39b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -904,10 +904,10 @@ subroutine farahiRateTabulate(self,varianceProgenitor,time,node)
#endif
! Construct the barrier table.
do i=1,self%varianceTableCountRate
massProgenitor =+cosmologicalMassVariance_%mass (real(+varianceTableRateQuad(i)+varianceTableRateBaseQuad(iVariance),kind=8),self%timeTableRate(iTime) )
growthFactorEffective =+cosmologicalMassVariance_%rootVariance( massProgenitor ,self%timeTableRate(iTime) ) &
& /cosmologicalMassVariance_%rootVariance( massProgenitor , timeProgenitor )
barrierTableRateQuad(i)=+excursionSetBarrier_ %barrier (real(+varianceTableRateQuad(i)+varianceTableRateBaseQuad(iVariance),kind=8), timeProgenitor ,node,rateCompute=.true.) &
massProgenitor =+cosmologicalMassVariance_%mass (real(sqrt(+varianceTableRateQuad(i)+varianceTableRateBaseQuad(iVariance)),kind=8),self%timeTableRate(iTime) )
growthFactorEffective =+cosmologicalMassVariance_%rootVariance( massProgenitor ,self%timeTableRate(iTime) ) &
& /cosmologicalMassVariance_%rootVariance( massProgenitor , timeProgenitor )
barrierTableRateQuad(i)=+excursionSetBarrier_ %barrier (real( +varianceTableRateQuad(i)+varianceTableRateBaseQuad(iVariance) ,kind=8), timeProgenitor ,node,rateCompute=.true.) &
& *growthFactorEffective
end do
!$omp atomic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,15 +617,15 @@ subroutine farahiMidpointRateTabulate(self,varianceProgenitor,time,node)
loopCount=loopCount+1_c_size_t
! Construct the barrier table.
do i=1,self%varianceTableCountRate
massProgenitor =+cosmologicalMassVariance_%mass (real(+varianceTableRateQuad (i)+varianceTableRateBaseQuad(iVariance),kind=8),self%timeTableRate(iTime) )
growthFactorEffective =+cosmologicalMassVariance_%rootVariance( massProgenitor ,self%timeTableRate(iTime) ) &
& /cosmologicalMassVariance_%rootVariance( massProgenitor , timeProgenitor )
barrierTableRateQuad (i)=+excursionSetBarrier_ %barrier (real(+varianceTableRateQuad (i)+varianceTableRateBaseQuad(iVariance),kind=8), timeProgenitor ,node,rateCompute=.true.) &
massProgenitor =+cosmologicalMassVariance_%mass (real(sqrt(+varianceTableRateQuad (i)+varianceTableRateBaseQuad(iVariance)),kind=8),self%timeTableRate(iTime) )
growthFactorEffective =+cosmologicalMassVariance_%rootVariance( massProgenitor ,self%timeTableRate(iTime) ) &
& /cosmologicalMassVariance_%rootVariance( massProgenitor , timeProgenitor )
barrierTableRateQuad (i)=+excursionSetBarrier_ %barrier (real( +varianceTableRateQuad (i)+varianceTableRateBaseQuad(iVariance) ,kind=8), timeProgenitor ,node,rateCompute=.true.) &
& *growthFactorEffective
massProgenitor =+cosmologicalMassVariance_%mass (real(+varianceMidTableRateQuad(i)+varianceTableRateBaseQuad(iVariance),kind=8),self%timeTableRate(iTime) )
growthFactorEffective =+cosmologicalMassVariance_%rootVariance( massProgenitor ,self%timeTableRate(iTime) ) &
& /cosmologicalMassVariance_%rootVariance( massProgenitor , timeProgenitor )
barrierMidTableRateQuad(i)=+excursionSetBarrier_ %barrier (real(+varianceMidTableRateQuad(i)+varianceTableRateBaseQuad(iVariance),kind=8), timeProgenitor ,node,rateCompute=.true.) &
massProgenitor =+cosmologicalMassVariance_%mass (real(sqrt(+varianceMidTableRateQuad(i)+varianceTableRateBaseQuad(iVariance)),kind=8),self%timeTableRate(iTime) )
growthFactorEffective =+cosmologicalMassVariance_%rootVariance( massProgenitor ,self%timeTableRate(iTime) ) &
& /cosmologicalMassVariance_%rootVariance( massProgenitor , timeProgenitor )
barrierMidTableRateQuad(i)=+excursionSetBarrier_ %barrier (real( +varianceMidTableRateQuad(i)+varianceTableRateBaseQuad(iVariance),kind=8 ), timeProgenitor ,node,rateCompute=.true.) &
& *growthFactorEffective
end do
! For zero variance, the rate is initialized to zero.
Expand Down

0 comments on commit 10c39b5

Please sign in to comment.