Commit 9402c402 authored by laura.gassner's avatar laura.gassner

Fix previous changes

parent 99111605
...@@ -106,7 +106,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float ** ...@@ -106,7 +106,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float **
/* updating components of the stress tensor, partially */ /* updating components of the stress tensor, partially */
sp[j][i] += (g[j][i]*(vxx+vyy))-(2.0*f[j][i]*vyy)+(dthalbe*sump); sp[j][i] += (g[j][i]*(vxx+vyy))+(dthalbe*sump);
// u[j][i] = ((g[j][i]/DT)*(vxx+vyy))-((2.0*f[j][i]/DT)*vyy)+(0.5*sump); // u[j][i] = ((g[j][i]/DT)*(vxx+vyy))-((2.0*f[j][i]/DT)*vyy)+(0.5*sump);
...@@ -114,7 +114,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float ** ...@@ -114,7 +114,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float **
/* now updating the memory-variables and sum them up*/ /* now updating the memory-variables and sum them up*/
sump=0.0; sump=0.0;
for (l=1;l<=L;l++){ for (l=1;l<=L;l++){
p[j][i][l] = bjm[l]*(p[j][i][l]*cjm[l]-(e[j][i][l]*(vxx+vyy))+(2.0*d[j][i][l]*vyy)); p[j][i][l] = bjm[l]*(p[j][i][l]*cjm[l]-(e[j][i][l]*(vxx+vyy));
sump += p[j][i][l]; sump += p[j][i][l];
} }
...@@ -179,7 +179,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float ** ...@@ -179,7 +179,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float **
/* updating components of the stress tensor, partially */ /* updating components of the stress tensor, partially */
sp[j][i] += (g[j][i]*(vxx+vyy))-(2.0*f[j][i]*vyy)+(dthalbe*sump); sp[j][i] += (g[j][i]*(vxx+vyy))+(dthalbe*sump);
// u[j][i] = ((g[j][i]/DT)*(vxx+vyy))-((2.0*f[j][i]/DT)*vyy)+(0.5*sump); // u[j][i] = ((g[j][i]/DT)*(vxx+vyy))-((2.0*f[j][i]/DT)*vyy)+(0.5*sump);
...@@ -187,7 +187,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float ** ...@@ -187,7 +187,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float **
/* now updating the memory-variables and sum them up*/ /* now updating the memory-variables and sum them up*/
sump=0.0; sump=0.0;
for (l=1;l<=L;l++){ for (l=1;l<=L;l++){
p[j][i][l] = bjm[l]*(p[j][i][l]*cjm[l]-(e[j][i][l]*(vxx+vyy))+(2.0*d[j][i][l]*vyy)); p[j][i][l] = bjm[l]*(p[j][i][l]*cjm[l]-(e[j][i][l]*(vxx+vyy));
sump += p[j][i][l]; sump += p[j][i][l];
} }
...@@ -254,7 +254,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float ** ...@@ -254,7 +254,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float **
} }
/* updating components of the stress tensor, partially */ /* updating components of the stress tensor, partially */
sp[j][i] += (g[j][i]*(vxx+vyy))-(2.0*f[j][i]*vyy)+(dthalbe*sump); sp[j][i] += (g[j][i]*(vxx+vyy))+(dthalbe*sump);
// u[j][i] = ((g[j][i]/DT)*(vxx+vyy))-((2.0*f[j][i]/DT)*vyy)+(0.5*sump); // u[j][i] = ((g[j][i]/DT)*(vxx+vyy))-((2.0*f[j][i]/DT)*vyy)+(0.5*sump);
...@@ -262,7 +262,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float ** ...@@ -262,7 +262,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float **
/* now updating the memory-variables and sum them up*/ /* now updating the memory-variables and sum them up*/
sump=0.0; sump=0.0;
for (l=1;l<=L;l++){ for (l=1;l<=L;l++){
p[j][i][l] = bjm[l]*(p[j][i][l]*cjm[l]-(e[j][i][l]*(vxx+vyy))+(2.0*d[j][i][l]*vyy)); p[j][i][l] = bjm[l]*(p[j][i][l]*cjm[l]-(e[j][i][l]*(vxx+vyy));
sump += p[j][i][l]; sump += p[j][i][l];
} }
...@@ -330,7 +330,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float ** ...@@ -330,7 +330,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float **
} }
/* updating components of the stress tensor, partially */ /* updating components of the stress tensor, partially */
sp[j][i] += (g[j][i]*(vxx+vyy))-(2.0*f[j][i]*vyy)+(dthalbe*sump); sp[j][i] += (g[j][i]*(vxx+vyy))+(dthalbe*sump);
// u[j][i] = ((g[j][i]/DT)*(vxx+vyy))-((2.0*f[j][i]/DT)*vyy)+(0.5*sump); // u[j][i] = ((g[j][i]/DT)*(vxx+vyy))-((2.0*f[j][i]/DT)*vyy)+(0.5*sump);
...@@ -338,7 +338,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float ** ...@@ -338,7 +338,7 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float **
/* now updating the memory-variables and sum them up*/ /* now updating the memory-variables and sum them up*/
sump=0.0; sump=0.0;
for (l=1;l<=L;l++){ for (l=1;l<=L;l++){
p[j][i][l] = bjm[l]*(p[j][i][l]*cjm[l]-(e[j][i][l]*(vxx+vyy))+(2.0*d[j][i][l]*vyy)); p[j][i][l] = bjm[l]*(p[j][i][l]*cjm[l]-(e[j][i][l]*(vxx+vyy));
sump += p[j][i][l]; sump += p[j][i][l];
} }
...@@ -357,18 +357,12 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float ** ...@@ -357,18 +357,12 @@ void update_p_visc_PML(int nx1, int nx2, int ny1, int ny2, float ** vx, float **
for (i=nx1;i<=nx2;i++){ for (i=nx1;i<=nx2;i++){
vxx = 0.0; vxx = 0.0;
vyy = 0.0; vyy = 0.0;
vyx = 0.0;
vxy = 0.0;
for (m=1; m<=fdoh; m++) { for (m=1; m<=fdoh; m++) {
vxx += hc[m]*(vx[j][i+m-1] -vx[j][i-m] ); vxx += hc[m]*(vx[j][i+m-1] -vx[j][i-m] );
vyy += hc[m]*(vy[j+m-1][i] -vy[j-m][i] ); vyy += hc[m]*(vy[j+m-1][i] -vy[j-m][i] );
vyx += hc[m]*(vy[j][i+m] -vy[j][i-m+1]);
vxy += hc[m]*(vx[j+m][i] -vx[j-m+1][i]);
} }
vxx *= dhi; vxx *= dhi;
vyy *= dhi; vyy *= dhi;
vyx *= dhi;
vxy *= dhi;
sump=0.0; sump=0.0;
for (l=1;l<=L;l++){ for (l=1;l<=L;l++){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment