-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible typo in grid interpolation #44
Labels
bug
Something isn't working
Comments
Thanks Ben. I agree with your assessment that this a bug in polintp. I also like your rewrite of each of these loops (one in polintp and one in radintp), which is more modern syntax that avoids goto statements.
-Tom
…------
Thomas D. Rognlien Email: ***@***.******@***.***>
L-440 (B3725) Tel: 925-422-9830
LLNL, 7000 East Ave, P.O. Box 808 Admin support: 925-422-7446
Livermore, CA 94551
From: Ben Dudson ***@***.***>
Reply-To: LLNL/UEDGE ***@***.***>
Date: Wednesday, July 19, 2023 at 2:32 PM
To: LLNL/UEDGE ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [LLNL/UEDGE] Possible typo in grid interpolation (Issue #44)
There is a suspicious line in this polintp poloidal interpolation function:
https://github.com/LLNL/UEDGE/blob/master/bbb/griddubl.m#L1169<https://urldefense.us/v3/__https:/github.com/LLNL/UEDGE/blob/master/bbb/griddubl.m*L1169__;Iw!!G2kpM7uM-TzIFchu!z0Nxy9U8Q0olqT9HEa2o9oL9WC13FnwPAJuYj-OEXFVCZiJyoFhbC9TkKtzblfAHlhwsch-jDcjPekO2Ptqg_SAVzQ$>
do 30 ixo = ixos, ixof
if(xo(ixo,iy).gt.xn(ix,iy) .or. ixo.eq.ixof) goto 25
ixl = ixo
20 continue
25 continue
The 30 label is shared with an outer loop, and the 20 label is not used in this function.
The corresponding lines in the radintp radial interpolation function
https://github.com/LLNL/UEDGE/blob/master/bbb/griddubl.m#L1108<https://urldefense.us/v3/__https:/github.com/LLNL/UEDGE/blob/master/bbb/griddubl.m*L1108__;Iw!!G2kpM7uM-TzIFchu!z0Nxy9U8Q0olqT9HEa2o9oL9WC13FnwPAJuYj-OEXFVCZiJyoFhbC9TkKtzblfAHlhwsch-jDcjPekO2PtpBH6fPFw$>
are:
do 20 iyo = iyos, iyof
if(yo(ix,iyo).gt.yn(ix,iy) .or. iyo.eq.iyof) goto 25
iyl = iyo
20 continue
25 continue
I suspect that the radintp version is correct, and the polintp do loop should use 20 rather than 30 or be rewritten as
do ixo = ixos, ixof
if(xo(ixo,iy).gt.xn(ix,iy) .or. ixo.eq.ixof) exit
ixl = ixo
end do
—
Reply to this email directly, view it on GitHub<https://urldefense.us/v3/__https:/github.com/LLNL/UEDGE/issues/44__;!!G2kpM7uM-TzIFchu!z0Nxy9U8Q0olqT9HEa2o9oL9WC13FnwPAJuYj-OEXFVCZiJyoFhbC9TkKtzblfAHlhwsch-jDcjPekO2PtpDSPSY2g$>, or unsubscribe<https://urldefense.us/v3/__https:/github.com/notifications/unsubscribe-auth/AAILAYSDJQ3E4R4FXKX4OT3XRBG7BANCNFSM6AAAAAA2QQHK2M__;!!G2kpM7uM-TzIFchu!z0Nxy9U8Q0olqT9HEa2o9oL9WC13FnwPAJuYj-OEXFVCZiJyoFhbC9TkKtzblfAHlhwsch-jDcjPekO2Pto2bL0aWg$>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a suspicious line in this
polintp
poloidal interpolation function:https://github.com/LLNL/UEDGE/blob/master/bbb/griddubl.m#L1169
The
30
label is shared with an outer loop, and the20
label is not used in this function.The corresponding lines in the
radintp
radial interpolation functionhttps://github.com/LLNL/UEDGE/blob/master/bbb/griddubl.m#L1108
are:
I suspect that the
radintp
version is correct, and thepolintp
do loop should use20
rather than30
or be rewritten asNote: I think this bug, if it is a bug, causes extra work to be done but doesn't affect the result: The interpolation is performed for every value of ixo (rather than just one), but the last result computed has the correct value of ixl.
The text was updated successfully, but these errors were encountered: