[cig-commits] commit: Cleanup and set v0 and tau_0 to 1
Mercurial
hg at geodynamics.org
Fri Feb 10 16:00:15 PST 2012
changeset: 16:5a513d0f7ec3
user: Walter Landry <wlandry at caltech.edu>
date: Sun Dec 04 00:39:47 2011 -0800
files: initial.cxx main.cxx
description:
Cleanup and set v0 and tau_0 to 1
diff -r 98bf302c0eb9 -r 5a513d0f7ec3 initial.cxx
--- a/initial.cxx Sun Dec 04 00:32:52 2011 -0800
+++ b/initial.cxx Sun Dec 04 00:39:47 2011 -0800
@@ -11,7 +11,7 @@ void initial(const Model &model, double
{
const double A(min_eta*(max_eta-min_eta)/(max_eta+min_eta));
std::complex<double> phi, psi, dphi, v;
- const double v0(0.0), tau_0(0.0);
+ const double v0(1.0), tau_0(1.0);
for(int i=0;i<N+1;++i)
for(int j=0;j<N+1;++j)
@@ -34,12 +34,6 @@ void initial(const Model &model, double
const double kx=pi*x;
const double csh(std::cosh(kx)), cs(std::cos(kx)),
snh(std::sinh(kx)), sn(std::sin(kx));
-
- // double tau_xx=2*(csh*tau_0 - kx*snh*(v0+tau_0) - kx*snh/4);
- // double dux_x=csh*tau_0 - (v0+tau_0)*(csh + kx*snh)
- // - (csh + kx*snh - cs)/4;
- // p[i][j]=pi*(2*dux_x - tau_xx);
-
p[i][j]=-2*pi*((v0 + tau_0)*csh + (csh - cs)/4)*std::cos(pi*y);
}
break;
@@ -51,11 +45,8 @@ void initial(const Model &model, double
if(j<N)
{
double x(i*h), y((j+0.5)*h), r2(x*x+y*y);
-
zx[i][j]=0;
-
fx[i][j]=0;
- // fx[i][j]=pi*pi*cos(pi*y)*cos(pi*x);
switch(model)
{
case Model::solKz:
@@ -123,7 +114,6 @@ void initial(const Model &model, double
log_etay[i][j]=y*log_max_eta;
break;
case Model::solCx:
- // fy[i][j]=0;
fy[i][j]=pi*pi*sin(pi*y)*cos(pi*x);
if(x>middle)
{
diff -r 98bf302c0eb9 -r 5a513d0f7ec3 main.cxx
--- a/main.cxx Sun Dec 04 00:32:52 2011 -0800
+++ b/main.cxx Sun Dec 04 00:39:47 2011 -0800
@@ -204,8 +204,6 @@ int main()
double dRx_dzx=-6/(h*h) + 2*dlog_etaxx + dlog_etayy;
- // Resid_x[i][j]=dzx_xx + dzx_yy - dp_x -fx[i][j];
- // Resid_x[i][j]=fx[i][j];
Resid_x[i][j]=Rx;
// zx[i][j]-=theta_mom*Rx/dRx_dzx;
}
@@ -323,7 +321,6 @@ int main()
double dRy_dzy=-6/(h*h) + 2*dlog_etayy + dlog_etaxx;
Resid_y[i][j]=Ry;
- // Resid_y[i][j]=fy[i][j];
if(i==N-1)
Resid_y[i][j]=0;
// zy[i][j]-=theta_mom*Ry/dRy_dzy;
More information about the CIG-COMMITS
mailing list