Actually, that would be a much clearer way to do it. The way it is now, the
IF block only tallies the score if it isnt the last n value to be scored,
if it is the last one, then it saves the result in score for line 329. So
its correct, but a CYCLE would be better.
I like your way better, I will switch it that way now.


On Fri, Jan 4, 2013 at 8:51 AM, Paul Romano <notifications@github.com>wrote:

> In src/tally.F90:
>
> > +            score_index = score_index - 1
> > +            ! Find the scattering order for a collection of requested moments
> > +            ! and store the moment contribution of each
> > +            do n = 0, t % scatt_order(j)
> > +              ! determine scoring bin index
> > +              score_index = score_index + 1
> > +              ! get the score and tally it
> > +              score = last_wgt * calc_pn(n, mu)
> > +              ! Do not do if its the last time through, the scores += at
> > +              ! the end of this select case will handle that one.
> > +              if (n < t % scatt_order(j)) then
> > +                t % results(score_index, filter_index) % value = &
> > +                  t % results(score_index, filter_index) % value + score
> > +              end if
> > +            end do
> > +            j = j + t % scatt_order(j)
>
> Should there be a cycle statement after this? Otherwise it seems like it
> would fall out of the select case clause and hit line 329 where the score
> is added to the tally again.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mit-crpg/openmc/pull/125/files#r2549648>.
>
>