-
Notifications
You must be signed in to change notification settings - Fork 140
Do not check for riemann_solver when running IGR #1530
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -668,6 +668,10 @@ def check_riemann_solver(self): | |
| low_Mach = self.get("low_Mach", 0) | ||
| cyl_coord = self.get("cyl_coord", "F") == "T" | ||
| viscous = self.get("viscous", "F") == "T" | ||
| igr = self.get("igr", "F") == "T" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Design: IGR exemption should live in Every other IGR incompatibility is documented in Consider adding to riemann_solver = self.get("riemann_solver")
self.warn(riemann_solver is not None, "riemann_solver is set but ignored by IGR")and conditioning the |
||
|
|
||
| if igr: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Design: early return is broader than needed The fix's intent is to allow if not igr:
self.prohibit(riemann_solver is None, "riemann_solver must be specified ...")
if riemann_solver is None:
return
self.prohibit(riemann_solver not in [1, 2, 4, 5], ...)
# ... other riemann_solver-dependent checks ...
# These run unconditionally:
self.prohibit(low_Mach not in [0, 1, 2], "low_Mach must be 0, 1, or 2")
self.prohibit(wave_speeds is not None and wave_speeds not in [1, 2], ...)
self.prohibit(avg_state is not None and avg_state not in [1, 2], ...)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Design: early return is broader than the fix needs to be The stated goal is to allow if not igr:
self.prohibit(riemann_solver is None, "riemann_solver must be specified ...")
if riemann_solver is None:
return
self.prohibit(riemann_solver not in [1, 2, 4, 5], ...)
# ... other riemann_solver-dependent checks ...
# These run unconditionally:
self.prohibit(low_Mach not in [0, 1, 2], "low_Mach must be 0, 1, or 2")
self.prohibit(wave_speeds is not None and wave_speeds not in [1, 2], ...)
self.prohibit(avg_state is not None and avg_state not in [1, 2], ...) |
||
| return | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The early return skips the sole
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The early return skips the sole
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The early return also skips the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The early return skips the sole
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: invalid The early return also skips the |
||
|
|
||
| self.prohibit(riemann_solver is None, "riemann_solver must be specified (1=HLL, 2=HLLC, 4=HLLD, 5=Lax-Friedrichs)") | ||
| if riemann_solver is None: | ||
|
|
||
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.
Design: IGR exemption lives in the wrong function
Every other IGR incompatibility is documented in
check_igr_simulation()with an explicit message (15+prohibit()calls for ib, bubbles, MHD, cyl_coord, etc.). This exemption is invisible from there — a developer auditingcheck_igr_simulation()for IGR's full contract will miss thatriemann_solveris silently waived.Consider adding to
check_igr_simulation():and then conditioning the
prohibit(riemann_solver is None, ...)in this function onnot igrrather than using a full early return.