[cig-commits] r12347 - mc/3D/CitcomS/trunk/lib
becker at geodynamics.org
becker at geodynamics.org
Thu Jun 26 17:53:30 PDT 2008
Author: becker
Date: 2008-06-26 17:53:30 -0700 (Thu, 26 Jun 2008)
New Revision: 12347
Modified:
mc/3D/CitcomS/trunk/lib/Global_operations.c
Log:
Check in of proper version for elliptical net rotation correction.
Modified: mc/3D/CitcomS/trunk/lib/Global_operations.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Global_operations.c 2008-06-27 00:21:16 UTC (rev 12346)
+++ mc/3D/CitcomS/trunk/lib/Global_operations.c 2008-06-27 00:53:30 UTC (rev 12347)
@@ -873,9 +873,9 @@
}
wx = -r*vy[1];
wy = r*vx[1];
- exyz[1] += (wx*cos_t*cos_f-wy*sin_f) * E->eco[m][e].area;
- exyz[2] += (wx*cos_t*sin_f+wy*cos_f) * E->eco[m][e].area;
- exyz[3] -= (wx*sin_t ) * E->eco[m][e].area;
+ exyz[1] += (wx*cos_t*cos_f - wy*sin_f) * E->eco[m][e].area;
+ exyz[2] += (wx*cos_t*sin_f + wy*cos_f) * E->eco[m][e].area;
+ exyz[3] -= (wx*sin_t ) * E->eco[m][e].area;
}
} /* end cap */
@@ -896,9 +896,24 @@
/*
remove rigid rotation
*/
+#ifdef ALLOW_ELLIPTICAL
+ for (m=1;m<=E->sphere.caps_per_proc;m++) {
+ for (node=1;node<=nno;node++) {
+ /* cartesian velocity = omega \cross r */
+ vx[0] = fxyz[2]* E->x[m][3][node] - fxyz[3]*E->x[m][2][node];
+ vx[1] = fxyz[3]* E->x[m][1][node] - fxyz[1]*E->x[m][3][node];
+ vx[2] = fxyz[1]* E->x[m][2][node] - fxyz[2]*E->x[m][1][node];
+ /* project into theta, phi */
+ calc_cbase_at_node(m,node,cart_base,E);
+ v_theta = vx[0]*cart_base[3] + vx[1]*cart_base[4] + vx[2]*cart_base[5] ;
+ v_phi = vx[0]*cart_base[6] + vx[1]*cart_base[7];
+ E->sphere.cap[m].V[1][node] -= v_theta;
+ E->sphere.cap[m].V[2][node] -= v_phi;
+ }
+ }
+#else
sin_t = sin(tr) * rot;
cos_t = cos(tr) * rot;
-
for (m=1;m<=E->sphere.caps_per_proc;m++) {
for (node=1;node<=nno;node++) {
frd = fr - E->sx[m][2][node];
@@ -910,8 +925,8 @@
E->sphere.cap[m].V[2][node] -= v_phi;
}
}
+#endif
-
return;
}
More information about the cig-commits
mailing list