-
Notifications
You must be signed in to change notification settings - Fork 9
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
13 rfx tallies assume a homogeneous or layered tissue geometry #162
13 rfx tallies assume a homogeneous or layered tissue geometry #162
Conversation
…inhomogeneous tissue and ROfFx detector. Also performed code cleaned up on these two files. Since the ValidationResult.IsValid now returns true, simulation will proceed without interruption. This means that the ValidationRule set to "Warning: R(fx) theory assumes a homogeneous or layered tissue geometry" and the Remarks set to "User discretion advised" are not put to the screen since only results with IsValid=false put out these statements.
…ered-tissue-geometry
…ered-tissue-geometry
…ered-tissue-geometry and resolved conflicts: # src/Vts/MonteCarlo/DataStructuresValidation/SimulationInputValidation.cs
…ered-tissue-geometry
…ue and R(fx) detector specification to issue Warning and continue with simulation.
…ered-tissue-geometry
…the code, to issuing a warning and continuing on with the simulation.The philosophy here is that if combination of inputs is non-standard but the transport will not error, a warning is issued and the validation result remains true. This allows users to specify inconsistent combinations, e.g. angled source and cylindrical coordinate detectors, receive a warning and have the simulation proceed. If the combination of inputs will cause the transport to error, e.g. defining an embedded ellipsoid that overlaps with a tissue layer, then the input validation fails and the simulation stopped.
I also did some code cleanup since I was editing these files. So more changes shown than the ones required for this fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both files have an unused using.
@@ -166,24 +171,25 @@ private static ValidationResult ValidateCombinedInputParameters(SimulationInput | |||
{ | |||
case true when | |||
ellipsoid.Center.X != 0.0 && ellipsoid.Center.Y != 0.0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing an issue here with the floating point comparison, it suggests using a range:
https://www.jetbrains.com/help/resharper/CompareOfFloatsByEqualityOperator.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand jetbrains concern. In this particular case, I truly am comparing with 0.0 though. If it is slightly off, ellipsoid will be off center. Since it is a user input (not determined from code), I would prefer to keep this as is.
return new ValidationResult( | ||
true, | ||
"Warning: off center ellipsoid in tissue with cylindrical detector defined", | ||
"User discretion advised: change ellipsoid center to (0,0) or specify non-cylindrical type tally"); | ||
case true when ellipsoid.Dx != ellipsoid.Dy: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comparison issue as above:
https://www.jetbrains.com/help/resharper/CompareOfFloatsByEqualityOperator.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lmalenfant, thanks for your review. I can work on those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I agree (although still user input so shouldn't different), so have modified code.
@hayakawa16 I didn't request changes because I'm not sure that the 2 issues I mentioned are problematic. I can approve if it is working as expected. |
…r should not have a range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approved and then realized that the quality gate failed, I'm not sure how we can resolve, or why it didn't fail on the previous build.
I can try to fix on this branch. I'll take a closer look tomorrow. Also, my VS continued to act funny. The Test Explorer window wasn't working correctly until I Task Master closed VS and then opened and reloaded sln. Do you think it is possibly related to my VS problems I had today? |
…and floating point check.
…ck. Replaced Count() with Length and reduced long lines.
Thanks @lmalenfant! Still working on it though! |
…ies in method names because not just incapabiities being checked, consistencies being checked too.
Quality Gate passedIssues Measures |
No description provided.