njoy / NJOY2016

Nuclear data processing with legacy NJOY
https://www.njoy21.io/NJOY2016
Other
96 stars 86 forks source link

A Simple Bug in NJOY2016 and NJOY2012 #105

Closed jlconlin closed 5 years ago

jlconlin commented 6 years ago

This was reported via email by Dr. Chikara Konno:

I found a bug in acefc.f90 of NJOY2012 and NJOY2016 (NJOY99 has no problem).

line 9683 in acefc.f90 of NJOY2012.50 line 9790 in acefc.f90 of NJOY2016.40

                       xss(next+1+nx+ix)=&
                         sigfig(renorm*xss(next+1+2*nx+ix),7,0)

is not correct. The correct one is the following.

                       xss(next+1+nx+ix)=&
                         sigfig(renorm*xss(next+1+nx+ix),7,0)

This bug is very simple, but it took one week to find this bug.

jlconlin commented 6 years ago

I have asked Dr. Konno to provide some documentation why the "correct" version is, correct.

kahlerac commented 6 years ago

All, I agree with this correction. I see it in NJOY99.0's src file and while it was corrected in 99.28 but somehow reappeared in the NJOY2012.0 src file. Sigh. Skip

On Fri, Sep 21, 2018 at 10:11 AM Jeremy Lloyd Conlin < notifications@github.com> wrote:

I have asked Dr. Konno to provide some documentation why the "correct" version is, correct.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/njoy/NJOY2016/issues/105#issuecomment-423544440, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ6USc8wsc53aOxMSmITYSMY3efxlboIks5udPN0gaJpZM4W0O2n .

-- Dr. A. C. (Skip) Kahler Kahler Nuclear Data Services, LLC kahler3ac@gmail.com +1 321 368 3645

jlconlin commented 6 years ago

So this is an easy change to make, but how do we know it is doing the correct thing? It doesn't change any of the answers—at least not to a precision fo 1E-9.

jlconlin commented 6 years ago

@kahlerac pointed out that this only occurs for MF=6, LAW=7, laboratory angle-energy distribution. I went looking for this, but found no evaluations in ENDF/B-VIII.0 with these parameters. Two evaluations,

I generated an ACE file from both of these files. I compared the ACE files produced before and after the fix and found no difference.

I would like to add a test demonstrating this, but haven't found something that can reproduce this error.