Skip to content

Commit

Permalink
fix error message when using HLLC with sphericalpolar geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Jul 31, 2024
1 parent 6bb2b66 commit 1a6b0d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pyro/compressible/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,10 +888,6 @@ def riemann_hllc(idir, ng, coord_type,
Conserved flux
"""


if coord_type == 1:
msg.fail("ERROR: HLLC Riemann Solver is not supported for SphericalPolar Geometry")

qx, qy, nvar = U_l.shape

F = np.zeros((qx, qy, nvar))
Expand Down
6 changes: 6 additions & 0 deletions pyro/compressible/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ def initialize(self, extra_vars=None, ng=4):
my_grid = grid_setup(self.rp, ng=ng)
my_data = self.data_class(my_grid)

# Make sure we use CGF for riemann solver when we do SphericalPolar
riemann = self.rp.get_param("compressible.riemann")
if my_grid.coord_type == 1 and riemann == "HLLC":
msg.fail("ERROR: Only CGF Riemann Solver is supported " +
"with SphericalPolar Geometry")

# define solver specific boundary condition routines
bnd.define_bc("hse", BC.user, is_solid=False)
bnd.define_bc("ramp", BC.user, is_solid=False) # for double mach reflection problem
Expand Down

0 comments on commit 1a6b0d4

Please sign in to comment.