[cig-commits] commit: Fix a scaling error in compute_dv_dtt that only shows up for inclined interfaces.
Mercurial
hg at geodynamics.org
Wed Mar 28 13:53:49 PDT 2012
changeset: 131:fbb0463fa3ed
tag: tip
user: Walter Landry <wlandry at caltech.edu>
date: Wed Mar 28 13:53:34 2012 -0700
files: compute_v_on_interface/compute_dv_dtt.cxx
description:
Fix a scaling error in compute_dv_dtt that only shows up for inclined interfaces.
diff -r 44124aed6828 -r fbb0463fa3ed compute_v_on_interface/compute_dv_dtt.cxx
--- a/compute_v_on_interface/compute_dv_dtt.cxx Wed Mar 28 07:10:11 2012 -0700
+++ b/compute_v_on_interface/compute_dv_dtt.cxx Wed Mar 28 13:53:34 2012 -0700
@@ -114,9 +114,10 @@ void compute_dv_dtt(const double zx[Nx+1
/* dv */
bool v_d;
- /* This bothers me a little. What if the interface
- lies between the point and the boundary? Shouldn't
- that make the derivative calculation invalid? */
+ /* TODO: This bothers me a little. What if the
+ interface lies between the point and the boundary?
+ Shouldn't that make the derivative calculation
+ invalid? */
if(i==max_x)
v_d=true;
else
@@ -375,9 +376,10 @@ void compute_dv_dtt(const double zx[Nx+1
FTensor::Tensor2_symmetric<int,2> ddel(0,1,0);
FTensor::Tensor1<double,2> ddz_nt_jump;
double eta_jump(eta_pm[1]-eta_pm[0]);
+ /* TODO: fix for curved surfaces */
ddz_nt_jump(a)=-eta_jump*ddv(b)*ddel(a,b);
- dv(a)-=h*h*ddz_nt_jump(a);
+ dv(a)-=h*length*ddz_nt_jump(a);
dv(a)/=(eta_pm[0]+eta_pm[1])*h;
/* v */
@@ -387,10 +389,11 @@ void compute_dv_dtt(const double zx[Nx+1
v(a)=nt_to_xy(b,a)*v_xy(b);
+ /* TODO: fix for curved surfaces */
FTensor::Tensor1<double,2> dz_n_jump;
dz_n_jump(a)=-eta_jump*dv(b)*ddel(a,b);
- v(a)-=2*h*dz_n_jump(a)/3;
+ v(a)-=2*length*dz_n_jump(a)/3;
v(a)/=(eta_pm[0] + eta_pm[1]);
}
More information about the CIG-COMMITS
mailing list