-
Notifications
You must be signed in to change notification settings - Fork 65
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
False positive for assignment of vacuum #805
Comments
Oh wow, I thought we squashed this bug a while back but I see how we didn't quite catch all the use cases. Looks like this is the difference between the current DAGMC used in OpenMC implementation and the version Shift implementation you are noticing @jbae11 I remembered not to call tags mat:vacuum. But I didn't recall the fix searched for the string vacuum in the entire material tag. Good to know, I can rename my tags. Plus one vote for searching for a string that is equal to =="mat: vacuum" instead of finding vacuum in the string. Material tags that would become a vacuum: 😀 mat:vacuum_vessel |
I tend to agree, @shimwell -- I vote we use an exact match for those assignments. @makeclean @gonuke any thoughts/feelings here? |
Seems like a regression that was fixed long ago, is the bug in dagmc proper or the alternative arrangements in OpenMC?
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Patrick Shriwise ***@***.***>
Sent: Wednesday, April 20, 2022 2:48:22 PM
To: svalinn/DAGMC ***@***.***>
Cc: Davis, Andrew ***@***.***>; Mention ***@***.***>
Subject: Re: [svalinn/DAGMC] False positive for assignment of vacuum (Issue #805)
I tend to agree, @shimwell<https://github.com/shimwell> -- I vote we use an exact match for those assignments.
@makeclean<https://github.com/makeclean> @gonuke<https://github.com/gonuke> any thoughts/feelings here?
—
Reply to this email directly, view it on GitHub<#805 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AASTUSTUYSJMUAQR2S43IC3VGADKNANCNFSM5T2U5QAA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
It's kind of a regression in that materials containing a lower-case "vacuum" trigger now also trigger this problem, yes, but I think the more general problem is that we're searching for "vacuum" instead of using an exact match. For example, use of the material name I'm confident that the problem is in DAGMC proper, not the OpenMC interface. I have a DAGMC branch to this issue where an exact match is used and it fixed the problem in @shimwell's OpenMC simulation. |
Looking back, this flaw has always been in this code. I'm all for the change you propose. Would it make sense to change |
I think |
I wasn't sure if the other uses were semantically different... ? or could deal with the redefined string. Also - similar code exists in the |
I think this is the bug that got you today @rherrero-pf |
Hmmm... Looking back on the conversation from 2.5 years ago, I guess I was hoping for a PR to be launched to address this. 😀 Anyone game to suggest a fix? Ideally one that is sufficiently backwards compatible with most models we expect to be out there. |
@shimwell recently sent me an input with material assignments like "lower_vaccum_vessel", which DAGMC interpreted as a vaccuum assignment. This is caused by the following lines:
DAGMC/src/dagmc/dagmcmetadata.cpp
Lines 209 to 212 in 50caabf
Prior to cc505bb, this would not have been a problem since only the presence of "Vacuum" (as opposed to "vacuum") in the material assignment would have triggered this behavior. This is still what I would call a bug, the corner case was just rarer.
I think we either need to document that "V/vacuum" should not be used in material names or only assign volumes a vacuum condition if the lowercase version of the name matches "mat:vacuum" exactly instead of searching for the presence of "vacuum", which is what happens in the lines linked above.
The word vacuum starts to look very strange after typing it so many times at this time of night.
The text was updated successfully, but these errors were encountered: