We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8415d3 commit e9df7b2Copy full SHA for e9df7b2
pyro/compressible/problems/rt.py
@@ -59,8 +59,9 @@ def init_data(my_data, rp):
59
60
j += 1
61
62
- ymom[:, :] = amp*np.cos(2.0*np.pi*myg.x2d/(myg.xmax-myg.xmin))*np.exp(-(myg.y2d-ycenter)**2/sigma**2)
63
-
+ L = myg.xmax-myg.xmin
+ ymom[:, :] = amp * 0.5 * (np.cos(2.0*np.pi*myg.x2d/L) +
64
+ np.cos(2.0*np.pi*(L - myg.x2d)/L)) * np.exp(-(myg.y2d-ycenter)**2/sigma**2)
65
ymom *= dens
66
67
# set the energy (P = cs2*dens)
0 commit comments