[cig-commits] r12907 - in long/3D/Gale/trunk: . src/StgFEM/plugins/StandardConditionFunctions
walter at geodynamics.org
walter at geodynamics.org
Wed Sep 17 06:52:16 PDT 2008
Author: walter
Date: 2008-09-17 06:52:16 -0700 (Wed, 17 Sep 2008)
New Revision: 12907
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
Log:
r2347 at earth: boo | 2008-09-17 06:48:31 -0700
In friction, make detection of the first time step more robust, use the old solution as a guess on the first iteration, and average before fixing overshoots
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2346
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2347
Modified: long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c 2008-09-17 13:52:09 UTC (rev 12906)
+++ long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c 2008-09-17 13:52:16 UTC (rev 12907)
@@ -1601,15 +1601,16 @@
*result=boundary_upper_v;
}
else if(context->nonLinearIteration_I==NULL
- || *(context->nonLinearIteration_I)==0 || p==0)
+ || (context->timeStep < 2 && *(context->nonLinearIteration_I)==0)
+ || p==0)
{
*result=boundary_v;
}
-/* else if(fabs(tangent_stress)<yield_stress) */
- else if(fabs(tangent_stress)<yield_stress && v[tangent_dim]==boundary_v)
+ else if(*(context->nonLinearIteration_I)==0
+ || (fabs(tangent_stress)<yield_stress && v[tangent_dim]==boundary_v))
{
*result=v[tangent_dim];
- }
+ }
else
{
Node_LocalIndex temp_node;
@@ -1641,12 +1642,13 @@
if(yield_stress<0)
*result=v_off[tangent_dim];
+ /* Average the results so that we don't oscillate a lot, looking
+ for a solution. */
+ *result=(*result+v[tangent_dim])/2;
+
+ /* If we overshot, make the node stick */
if((*result-boundary_v)*(v_off[tangent_dim]-boundary_v)<0)
*result=boundary_v;
-
- /* Finally, average the results so that we don't oscillate a
- lot, looking for a solution. */
- *result=(*result+v[tangent_dim])/2;
}
}
More information about the cig-commits
mailing list