Skip to content

Commit

Permalink
oriented wave equation
Browse files Browse the repository at this point in the history
  • Loading branch information
sfomel committed Apr 8, 2024
1 parent dc78f00 commit 0754801
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions system/seismic/Moway1.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,29 @@ int main(int argc, char* argv[])
sf_floatwrite (slice0[0][0],nx*np,out);

sx = sp = st = 0.;
/* loop through depth */
for (iz=0; iz < nz-1; iz++) {
sf_warning("depth %d of %d;",iz+1,nz);

/* get velocity and velocity gradient */
sf_floatread(vv,nx,vel);
sf_floatread(vg,nx,vgrad);

for (it=0; it < nt; it++) {
t = t0+it*dt;
t = t0+it*dt; /* time */

for (ip=0; ip < np; ip++) {
p = p0+ip*dp;
p = p0+ip*dp; /* slope */

for (ix=0; ix < nx; ix++) {
x = x0+ix*dx;
x = x0+ix*dx; /* location */

v = 0.5*vv[ix];
g = 0.5*vg[ix];
g = 0.5*vg[ix];

sq = 1./sqrt(1.-v*v*p*p);

if (lagrange) {
if (lagrange) { /* trace rays back to the suface */
sx -= sq*p*v;
sp += sq*g/(v*v);
st -= sq/v;
Expand All @@ -119,13 +121,15 @@ int main(int argc, char* argv[])
st = -sq/v;
}

/* coordinate transformation */
tstr[it][ip][ix] = t+st*dz;
pstr[it][ip][ix] = p+sp*dz;
xstr[it][ip][ix] = x+sx*dz;
}
}
}

/* mapping data */
warp3(slice0,xstr,pstr,tstr,slice);
sf_floatwrite (slice[0][0],nx*np,out); /* it=0 */
}
Expand Down

0 comments on commit 0754801

Please sign in to comment.