micben
unread,May 7, 2012, 5:32:01 AM5/7/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to i3rc-monte-carlo-model
Hello,
If i don't miss something, IMHO, i identified 2 bugs in
monteCarloRadiativeTransfer.f95:
Integrators/monteCarloRadiativeTransfer.f95:
***1)
pure function makeDirectionCosines(mu, phi)
line 2045:
sinPhi = sqrt(1. - cosPhi**2)
should be:
sinPhi = sin(Phi)
explanation: sinPhi must not be restricted to be positive
***2)
pure function computeScatteringAngle(randomDeviate,
inversePhaseFunctionTable) result(scatteringAngle)
line 1392:
numIntervals = size(inversePhaseFunctionTable)
should be
numIntervals = size(inversePhaseFunctionTable) - 1
explanation: if randomDeviate is 1. - spacing(1.), angleIndex =
numIntervals = size(inversePhaseFunctionTable)
instead of size(inversePhaseFunctionTable) - 1
Best regards