[cig-commits] r20666 - mc/3D/CitcomS/trunk/lib
becker at geodynamics.org
becker at geodynamics.org
Sat Sep 1 16:51:38 PDT 2012
Author: becker
Date: 2012-09-01 16:51:37 -0700 (Sat, 01 Sep 2012)
New Revision: 20666
Modified:
mc/3D/CitcomS/trunk/lib/Full_boundary_conditions.c
mc/3D/CitcomS/trunk/lib/Regional_boundary_conditions.c
Log:
Fixed ggrd velocity boundary condition weirdness, I hope.
This may go back to 16065 vs. 16067, and bug may have stuck through
20621.
Modified: mc/3D/CitcomS/trunk/lib/Full_boundary_conditions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Full_boundary_conditions.c 2012-09-01 23:41:33 UTC (rev 20665)
+++ mc/3D/CitcomS/trunk/lib/Full_boundary_conditions.c 2012-09-01 23:51:37 UTC (rev 20666)
@@ -64,6 +64,12 @@
horizontal_bc(E,E->sphere.cap[j].VB,noz,1,E->control.VBXtopval,SBX,1,lv,j);
horizontal_bc(E,E->sphere.cap[j].VB,noz,3,0.0,SBZ,0,lv,j);
horizontal_bc(E,E->sphere.cap[j].VB,noz,2,E->control.VBYtopval,SBY,1,lv,j);
+#ifdef USE_GGRD
+ /* Ggrd traction control */
+ if((lv==E->mesh.gridmax) && E->control.ggrd.vtop_control)
+ ggrd_read_vtop_from_file(E, 1);
+#endif
+
}
if(E->mesh.botvbc != 1) { /* free slip bottom */
horizontal_bc(E,E->sphere.cap[j].VB,1,1,0.0,VBX,0,lv,j);
@@ -82,6 +88,13 @@
horizontal_bc(E,E->sphere.cap[j].VB,noz,3,0.0,SBZ,0,lv,j);
horizontal_bc(E,E->sphere.cap[j].VB,noz,2,0.0,SBY,0,lv,j);
+#ifdef USE_GGRD
+ /* Ggrd velocity control */
+ if((lv==E->mesh.gridmax) && E->control.ggrd.vtop_control)
+ ggrd_read_vtop_from_file(E,1);
+#endif
+
+
if(E->control.vbcs_file){ /* this should either only be called
once, or the input routines need
to be told what to do for each
@@ -123,10 +136,7 @@
anything at present, if E->mesh.toplayerbc != 0
*/
assign_internal_bc(E);
-#ifdef USE_GGRD
- if(E->control.ggrd.vtop_control) /* assign stress or velocity BCs */
- ggrd_read_vtop_from_file(E,1);
-#endif
+
return; }
/* ========================================== */
Modified: mc/3D/CitcomS/trunk/lib/Regional_boundary_conditions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_boundary_conditions.c 2012-09-01 23:41:33 UTC (rev 20665)
+++ mc/3D/CitcomS/trunk/lib/Regional_boundary_conditions.c 2012-09-01 23:51:37 UTC (rev 20666)
@@ -66,6 +66,13 @@
horizontal_bc(E,E->sphere.cap[j].VB,noz,1,E->control.VBXtopval,SBX,1,lv,j);
horizontal_bc(E,E->sphere.cap[j].VB,noz,3,0.0,SBZ,0,lv,j);
horizontal_bc(E,E->sphere.cap[j].VB,noz,2,E->control.VBYtopval,SBY,1,lv,j);
+
+#ifdef USE_GGRD
+ /* Ggrd traction control */
+ if((lv==E->mesh.gridmax) && E->control.ggrd.vtop_control)
+ ggrd_read_vtop_from_file(E, 1);
+#endif
+
}
else if(E->mesh.topvbc == 1) {
horizontal_bc(E,E->sphere.cap[j].VB,noz,1,E->control.VBXtopval,VBX,1,lv,j);
@@ -74,7 +81,11 @@
horizontal_bc(E,E->sphere.cap[j].VB,noz,1,0.0,SBX,0,lv,j);
horizontal_bc(E,E->sphere.cap[j].VB,noz,3,0.0,SBZ,0,lv,j);
horizontal_bc(E,E->sphere.cap[j].VB,noz,2,0.0,SBY,0,lv,j);
-
+#ifdef USE_GGRD
+ /* Ggrd velocity control */
+ if((lv==E->mesh.gridmax) && E->control.ggrd.vtop_control)
+ ggrd_read_vtop_from_file(E, 1);
+#endif
if(E->control.vbcs_file) {
if((lv == E->mesh.gridmin) && (j == E->sphere.caps_per_proc))
read_velocity_boundary_from_file(E); /* read in the velocity boundary condition from file */
@@ -123,12 +134,9 @@
*/
assign_internal_bc(E);
-#ifdef USE_GGRD
- if(E->control.ggrd.vtop_control)
- ggrd_read_vtop_from_file(E,1);
-#endif
+
if(E->control.verbose) {
for (j=1;j<=E->sphere.caps_per_proc;j++)
for (node=1;node<=E->lmesh.nno;node++)
More information about the CIG-COMMITS
mailing list