[cig-commits] commit: Do not do the velocity correction at the end, and set vx and vy correctly
Mercurial
hg at geodynamics.org
Fri Feb 10 16:00:19 PST 2012
changeset: 21:ff2dd6947300
user: Walter Landry <wlandry at caltech.edu>
date: Sun Dec 04 15:17:42 2011 -0800
files: main.cxx
description:
Do not do the velocity correction at the end, and set vx and vy correctly
diff -r 83d2c60ea56b -r ff2dd6947300 main.cxx
--- a/main.cxx Sun Dec 04 14:12:07 2011 -0800
+++ b/main.cxx Sun Dec 04 15:17:42 2011 -0800
@@ -423,7 +423,7 @@ int main()
double dRx_dzx=-6/(h*h) + 2*dlog_etaxx + dlog_etayy;
- zx[i][j]+=(dp[i][j]-dp[i-1][j])/(h*dRx_dzx);
+ // zx[i][j]+=(dp[i][j]-dp[i-1][j])/(h*dRx_dzx);
max_x=std::max(std::fabs(Resid_x[i][j]),max_x);
}
@@ -442,7 +442,7 @@ int main()
double dRy_dzy=-6/(h*h) + 2*dlog_etayy + dlog_etaxx;
- zy[i][j]+=(dp[i][j]-dp[i][j-1])/(h*dRy_dzy);
+ // zy[i][j]+=(dp[i][j]-dp[i][j-1])/(h*dRy_dzy);
max_y=std::max(fabs(Resid_y[i][j]),max_y);
}
@@ -499,10 +499,10 @@ int main()
for(int i=0;i<N+1;++i)
for(int j=0;j<N+1;++j)
{
+ if(j<N)
+ zx[i][j]*=exp(-log_etax[i][j]);
if(i<N)
- zx[i][j]/=exp(log_etax[i][j]);
- if(j<N)
- zy[i][j]/=exp(log_etay[i][j]);
+ zy[i][j]*=exp(-log_etay[i][j]);
}
write_vtk("vx",N+1,N,zx);
write_vtk("vy",N,N,zy);
More information about the CIG-COMMITS
mailing list