Skip to content

Commit

Permalink
fix unintentional extra pressure
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Aug 1, 2024
1 parent 1c491e0 commit 32cf030
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions pyro/compressible/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,13 +505,9 @@ def riemann_cons(idir, ng, coord_type,
if idir == 1:
U_out[i, j, ixmom] = rho_state * un_state
U_out[i, j, iymom] = rho_state * ut_state
if coord_type == 0:
U_out[i, j, ixmom] += p_state
else:
U_out[i, j, ixmom] = rho_state * ut_state
U_out[i, j, iymom] = rho_state * un_state
if coord_type == 0:
U_out[i, j, iymom] += p_state

U_out[i, j, iener] = rhoe_state + \
0.5 * rho_state * (un_state**2 + ut_state**2)
Expand Down
5 changes: 2 additions & 3 deletions pyro/compressible/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import pyro.mesh.array_indexer as ai
import pyro.mesh.boundary as bnd
from pyro.compressible import BC, derives, eos
from pyro.mesh.patch import SphericalPolar
from pyro.particles import particles
from pyro.simulation_null import NullSimulation, bc_setup, grid_setup
from pyro.util import msg, plot_tools
Expand Down Expand Up @@ -369,7 +368,7 @@ def dovis(self):
x = myg.scratch_array()
y = myg.scratch_array()

if isinstance(myg, SphericalPolar):
if myg.coord_type == 1:
x.v()[:, :] = myg.x2d.v()[:, :]*np.sin(myg.y2d.v()[:, :])
y.v()[:, :] = myg.x2d.v()[:, :]*np.cos(myg.y2d.v()[:, :])
else:
Expand Down Expand Up @@ -408,7 +407,7 @@ def dovis(self):
ax.scatter(particle_positions[:, 0],
particle_positions[:, 1], s=5, c=colors, alpha=0.8, cmap="Greys")

if isinstance(myg, SphericalPolar):
if myg.coord_type == 1:
ax.set_xlim([np.min(x), np.max(x)])
ax.set_ylim([np.min(y), np.max(y)])
else:
Expand Down

0 comments on commit 32cf030

Please sign in to comment.