[cig-commits] r12763 - in long/3D/Gale/trunk: . src/StgFEM/plugins/StandardConditionFunctions

walter at geodynamics.org walter at geodynamics.org
Mon Sep 1 00:07:08 PDT 2008


Author: walter
Date: 2008-09-01 00:07:07 -0700 (Mon, 01 Sep 2008)
New Revision: 12763

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
Log:
 r2336 at earth:  boo | 2008-08-31 23:40:10 -0700
 Code reformatting



Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
   - 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2334
   + 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2336

Modified: long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c	2008-09-01 00:16:18 UTC (rev 12762)
+++ long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c	2008-09-01 07:07:07 UTC (rev 12763)
@@ -1606,6 +1606,7 @@
       *result=boundary_v;
     }      
   else if(fabs(tangent_stress)<yield_stress)
+/*   else if(fabs(tangent_stress)<yield_stress && v[tangent_dim]==boundary_v) */
     {
       *result=v[tangent_dim];
     }
@@ -1614,36 +1615,34 @@
       Node_LocalIndex temp_node;
       double *temp_coord, delta, v_off[3];
 
-        {
-          if(inds[normal_dim]==0)
-            ++inds[normal_dim];
-          else
-            --inds[normal_dim];
-          
-          node_gI=RegularMeshUtils_Node_3DTo1D(feMesh, inds);
-          Mesh_GlobalToDomain(feMesh, MT_VERTEX, node_gI, &temp_node);
-          
-          FeVariable_GetValueAtNode(velocityField,temp_node,v_off);
-          temp_coord=Mesh_GetVertex(feMesh, temp_node);
-          
-          delta=fabs(temp_coord[normal_dim]-coord[normal_dim]);
-
-          /* Make sure that we always make the velocity closer to the
-             boundary velocity */
-          if(v_off[tangent_dim]>boundary_v)
-            *result=v_off[tangent_dim]-delta*yield_stress/viscosity;
-          else
-            *result=v_off[tangent_dim]+delta*yield_stress/viscosity;
-          
-          /* If the yield stress is negative (e.g. the pressure is
-             negative), then the boundary moves in lockstep with the
-             element above it. */
-          if(yield_stress<0)
-            *result=v_off[tangent_dim];
-          
-          if((*result-boundary_v)*(v_off[tangent_dim]-boundary_v)<0)
-            *result=boundary_v;
-        }
+      if(inds[normal_dim]==0)
+        ++inds[normal_dim];
+      else
+        --inds[normal_dim];
+      
+      node_gI=RegularMeshUtils_Node_3DTo1D(feMesh, inds);
+      Mesh_GlobalToDomain(feMesh, MT_VERTEX, node_gI, &temp_node);
+      
+      FeVariable_GetValueAtNode(velocityField,temp_node,v_off);
+      temp_coord=Mesh_GetVertex(feMesh, temp_node);
+      
+      delta=fabs(temp_coord[normal_dim]-coord[normal_dim]);
+      
+      /* Make sure that we always make the velocity closer to the
+         boundary velocity */
+      if(v_off[tangent_dim]>boundary_v)
+        *result=v_off[tangent_dim]-delta*yield_stress/viscosity;
+      else
+        *result=v_off[tangent_dim]+delta*yield_stress/viscosity;
+      
+      /* If the yield stress is negative (e.g. the pressure is
+         negative), then the boundary moves in lockstep with the
+         element above it. */
+      if(yield_stress<0)
+        *result=v_off[tangent_dim];
+      
+      if((*result-boundary_v)*(v_off[tangent_dim]-boundary_v)<0)
+        *result=boundary_v;
     }
 }
 



More information about the cig-commits mailing list